with one click
mc-improve-code-style
提升用户指定文件的代码风格,使其更优雅、复用性更高,并且符合项目规范和最佳实践。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
提升用户指定文件的代码风格,使其更优雅、复用性更高,并且符合项目规范和最佳实践。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
为用户指定的代码范围增加性能追踪宏(Perfetto + Tracy 双轨)
运行测试,认领并收敛项目代码中的一个测试错误
认领并收敛项目代码中的一个TODO
基于测试驱动的开发(TDD),将当前项目的代码与 Minecraft 原版代码对齐,确保功能和逻辑都能准确复刻 Minecraft。
审查用户指定范围内的所有文件,列出架构重构计划并执行
参照mc源码,列出高质量计划,为项目实现新功能
| name | mc-improve-code-style |
| description | 提升用户指定文件的代码风格,使其更优雅、复用性更高,并且符合项目规范和最佳实践。 |
提升用户指定文件的代码风格,使其更优雅、复用性更高,并且符合项目规范和最佳实践。用户指定的文件范围中可能有文件不存在,忽略不存在的文件即可。
先阅读:
/docs/CODE_CONVENTIONS.md /docs/PROJECT_CONVENTIONS.md
TODO,便于全文搜索),如果对应逻辑缺少TODO注释则需要补上TODO注释,以便未来的开发者知道哪里需要完善实现。需注意,你的更改尽量不要改动原有逻辑
最后,必须使用clang-format对你修改的文件进行格式化:
clang-format -i src\common\xxx\Foo.cpp
clang-format -i src\common\xxx\Foo.hpp
不要提交代码、不要编译。
注意:你被要求审查的文件可能没有上述这些问题,这种情况下你直接放行即可,你不一定必须修改代码。
你只允许修改指定的文件,如果你的修改超出了指定文件的范围(比如修了指定文件的代码,但是这个修改同时影响了其他文件(待修改代码对应的测试文件不算)),此时你必须放弃修改、直接放行,并在相应代码处添加TODO注释,说明这个地方可能需要提升,但由于修改会影响其他文件,所以暂时不修改。
参考:版权头:
/*
* Copyright (c) 2026 Guo Yi
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/