skills/coding/code-comment-writer/SKILL.md
Writes precise, reader-oriented code comments explaining "why" not "what". Covers onboarding, refactoring, algorithm explanation, tech debt marking, and API integration scenarios. Should be used when the user mentions adding comments, documenting code, explaining code logic, improving code readability, or needs help understanding code during handoff. Distinguished from refactoring skills which focus on code structure changes.
npx skillsauth add ImaginerLabs/skill-manager code-comment-writerInstall 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.
Write precise, targeted code comments that explain the "why" behind code, not the "what". Comments should help future readers (including yourself) understand intent, edge cases, pitfalls, and migration context.
// increment i for i++)This skill supports multiple reading scenarios:
| Scenario | Focus | Example | |----------|-------|---------| | Onboarding | Why this code exists, what's tricky | "This cache has a 5min TTL because..." | | Refactoring | Migration notes, what to watch for | "TODO: remove after users migrate to V2" | | Algorithm | Why this approach was chosen | "Using binary search because data is sorted" | | Tech Debt | Why it's a problem, how to fix | "Slow because no index; add index in V2" | | API Integration | Quirks, error handling | "Throws on 400, caller must handle" |
Explain why the code does what it does.
// Using batch insert because single insert causes
// lock contention at high concurrency.
// TODO: switch to streaming after DB upgrade.
async function saveBatch(items: Item[]) { ... }
Document known boundaries.
// Handles empty string as valid input (matches legacy behavior).
// Max length: 10000 chars (DB constraint).
function normalize(input: string) { ... }
Warn about surprising behavior.
// WARNING: This mutates the original array.
// Use clone() first if that's not intended.
function process(items) { ... }
Track transition state.
// DEPRECATED: Use v2 API instead.
// Will remove after Q3 2024 deprecation deadline.
// TODO(team-backend): remove in V3.0
async function legacyFetch(id: string) { ... }
Use when logic flows are complex — see references/diagram-guide.md.
/*
* Payment flow
*
* User clicks pay
* │
* ▼
* Validate inventory ──fail──▶ Show error
* │ success
* ▼
* Create order ──...
*/
const handlePay = async () => { ... };
// retry up to 3 times is better than // retry logic// See JIRA-1234| Anti-Pattern | Why It's Bad |
|-------------|--------------|
| // increment i | Restates what code does |
| // check if null | Obvious from code |
| // TODO: fix this later | Not actionable |
| Commented-out code | Just delete it |
references/diagram-guide.md — When and how to use ASCII diagrams in commentsdevelopment
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.
devops
Create a new implementation plan file for new features, refactoring existing code or upgrading packages, design, architecture or infrastructure.
tools
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
documentation
Generates standardized porting documentation from completed feature changes. Analyzes commit diffs or file contents, extracts change intent, and outputs Markdown documentation for cross-team understanding. Should be used when the user needs to document a change for cross-team or cross-project consumption. Distinguished from cross-branch-fix-porter which actively re-implements fixes, this skill documents changes.