代码注释精简与依据核对
原名:lean-comments
只保留维护者无法从代码直接看出的约束、原因和接口契约。
中文 Skills 技能说明
项目注释很多却不能帮助理解时,可让技术文档工程师与开发岗位员工使用。提供获准代码、项目规范和可核实的设计依据,技能检查注释、文档字符串与 TODO,交付保留、删减和改写建议。重点是解释非显然的原因,不是把代码逐行翻译,也不能编造性能、安全或历史理由。方法可由 Hermes 学习,实际修改需要项目权限;生成代码和公共接口文档遵守原规则,先保留用户改动,删除或改写后核对语义和必要测试。
上游能力依据
上游原始适用说明:Audits, writes, and refines maintained first-party source-code comments and declaration-level documentation across languages. Use when adding, editing, reviewing, cleaning up, or auditing comments, doc comments, docstrings, TODO, FIXME, NOTE, suppressions, or other source commentary, including while modifying code and deciding whether a comment is warranted at all. Defaults to no comment unless it preserves meaningful, non-obvious information that cannot reasonably be recovered from the code or nearby repository context.
上游 SKILL.md 主要章节(保留原文标题):
- Goal
- Reader model
- Authority and evidence
- Core decision rule
- Decision order
- What deserves an implementation comment
- Remove low-value commentary
- Prefer self-explanatory code
- Comment and documentation forms
- Implementation comments
使用边界
先读取项目约定、依赖版本和现有测试,再提出最小改动。写文件、运行脚本、提交代码或发布前应检查差异并保留回退路径。
作者、翻译与许可证
- 原作者
- GitHub, Inc. 与 awesome-copilot contributors
- 中文翻译
- CEOFans翻译
- 许可证
- MIT
- 上游来源
- https://github.com/github/awesome-copilot/tree/82701c24b99488536ca399ff4789a458b7a05db7/skills/lean-comments
适用范围
平台:linux、macos、windows;标签:代码协作、代码注释精简与依据核对、开源技能
安全提示
基础静态扫描不等于绝对安全。技能可能调用命令、浏览器、云服务或本地文件,请在最小权限环境中使用,高风险操作必须人工确认。
如发现侵权、许可证或安全问题,可在本页前台提交投诉,管理员复核后可立即下架。