general
一般开发指南将可读性置于性能之上,并提供有意义的评论规则。在此项目中编写任何代码时使用。
📖 中文导读:一般开发指南将可读性置于性能之上,并提供有意义的评论规则。在此项目中编写任何代码时使用。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: general description: General development guidelines prioritizing readability over performance, with rules for meaningful comments. Use when writing any code in this project.
General Development Guidelines
Apply these general guidelines to all code.
Priorities
Focus 80% on readability and 20% on performance.
In order of importance:
- Correctness and functionality
- Readability & Maintainability
- Performance
Comments
Add comments only when they explain WHY, not WHAT. The code itself should be readable enough to show WHAT it does.
DO NOT comment obvious operations
// Bad
// increment counter
counter++;
DO comment
- Business logic reasoning
- Non-obvious decisions
- Workarounds or edge cases
- Complex algorithms (brief summary of approach)
Example of a good comment
// Using ceil() here because partial units must be charged as full units per billing policy
const billableUnits = Math.ceil(usage / unitSize);