About writing-no-comments
A coding skill for agents that sets rules against adding code comments, while preserving existing comments outside edited lines. It emphasizes expressing intent through names, types, assertions, or tests.
Key features
- 01Avoid comments in new or edited code
- 02Express rationale through code structure
- 03Preserve comments on untouched lines
- 04Pass the rule to code-writing subagents
- 05Allow comments requested by the user
Use cases
- 01Editing code while minimizing commentary
- 02Guiding subagents that write code
- 03Reviewing diffs for comment changes
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ bostonaholic/ skills --skill writing-no-commentsAfter installing, type/writing-no-commentsin Claude Code to confirm it loaded.
Bundled filesagents/openai.yamlshared/code-comments.md
Details
From the project READMEWriting no comments
- Add no comment to code you write or edit unless the code comments rules keep it. When unsure, add none.
- Put the reason in a name, a type, an assertion, or a test. If none can hold it, give it in the commit message or the reply.
- Tests and scripts get no step or phase narration.
- Leave comments on lines you do not change. Fix or delete a comment your change makes false.
- Give this rule to a subagent that writes code for you, and check its diff before you accept it.
- Add a comment the user asks for, as asked.
Comments
Markdown supported