.agents/skills/rule-code-comments/SKILL.md
Rule mapping for code-comments
npx skillsauth add carrot-foundation/methodology-rules rule-code-commentsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Apply this rule whenever work touches:
*.ts*.tsxComments should add information that the code cannot express on its own. If the code can be made clear enough without a comment, prefer that approach.
Write a comment when:
TODO marks future work that is tracked and assigned.Do not write a comment when:
Exported symbols may use TSDoc when additional guidance helps consumers:
/**
* Computes the carbon credit score based on the mass balance and
* methodology-specific weighting factors.
*
* Returns zero if the input document has no valid mass entries.
*/
export function computeCarbonCreditScore(input: MassBalance): number { ... }
Avoid boilerplate TSDoc that adds no value:
// Bad - repeats the signature
/**
* @param input - the input
* @returns the result
*/
export function computeCarbonCreditScore(input: MassBalance): number { ... }
Never commit commented-out code. If the code is no longer needed, delete it. Git history preserves everything. If you need to temporarily disable logic during development, remove it before committing.
When modifying a function or behavior, review any adjacent comments. If a comment no longer matches reality, update or remove it in the same commit.
databases
Create and modify Zod schemas for runtime validation with proper type inference.
testing
Write Vitest unit tests following project conventions with proper stubs and assertions.
tools
Autonomously implement a task following project conventions with iterative verification.
testing
Analyze a pull request diff and provide structured feedback on correctness, conventions, and quality.