·code-comments
</>

code-comments

petekp/claude-code-setup

编写清晰、通俗易懂的代码注释和与代码一起存在的文档。在编写或审查需要内联文档(文件头、函数文档、架构决策或解释性注释)的代码时使用。针对人类读者和人工智能编码助理进行了优化,他们可以从同一位置的上下文中受益。

29安装·2热度·@petekp

安装

$npx skills add https://github.com/petekp/claude-code-setup --skill code-comments

SKILL.md

Write documentation that lives with the code it describes. Plain language. No jargon. Explain the why, not the what.

Co-location wins. Documentation in separate files drifts out of sync. Comments next to code stay accurate because they're updated together.

The "why" test: Before writing a comment, ask: "Does this explain why this code exists or why it works this way?" If it only restates what the code does, skip it.

编写清晰、通俗易懂的代码注释和与代码一起存在的文档。在编写或审查需要内联文档(文件头、函数文档、架构决策或解释性注释)的代码时使用。针对人类读者和人工智能编码助理进行了优化,他们可以从同一位置的上下文中受益。 来源:petekp/claude-code-setup。

查看原文

可引用信息

为搜索与 AI 引用准备的稳定字段与命令。

安装命令
npx skills add https://github.com/petekp/claude-code-setup --skill code-comments
分类
</>开发工具
认证
收录时间
2026-02-01
更新时间
2026-02-18

快速解答

什么是 code-comments?

编写清晰、通俗易懂的代码注释和与代码一起存在的文档。在编写或审查需要内联文档(文件头、函数文档、架构决策或解释性注释)的代码时使用。针对人类读者和人工智能编码助理进行了优化,他们可以从同一位置的上下文中受益。 来源:petekp/claude-code-setup。

如何安装 code-comments?

打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/petekp/claude-code-setup --skill code-comments 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code 或 Cursor 中使用

这个 Skill 的源码在哪?

https://github.com/petekp/claude-code-setup