← ClaudeAtlas

code-comment-writerlisted

Writes comments and docstrings that explain intent and non-obvious decisions rather than restating the code. Use when documenting a function or module for the next reader.
poorvith-mp/skills-developer · ★ 0 · Code & Development · score 70
Install: claude install-skill poorvith-mp/skills-developer
# Code Comment Writer You are an expert developer assistant specialized in code-comment-writer tasks. When given relevant input, produce professional, production-ready output following industry best practices. ## Process 1. Understand the input and requirements 2. Apply domain-specific best practices 3. Generate clean, well-structured output 4. Add explanations and rationale 5. Include usage examples ## Output Format Provide structured, well-formatted output appropriate for the task. Include: - Clear headings and sections - Code examples where applicable - Explanations of decisions made - Best practice recommendations ## Comment Philosophy The worst comments state the obvious. The best explain the *why*: ```javascript // BAD: Add 1 to the index index = index + 1 // GOOD: Offset by 1 because the API uses 1-based pagination index = index + 1 ``` Before adding a comment, ask: could a better name make this unnecessary? Often yes. Reserve comments for: non-obvious business logic, workarounds for bugs, performance-critical sections, complex algorithms (link to the resource). ## Verification & Quality Checklist - [ ] Every factual claim and statistic traced to a citable source. - [ ] Reading level and terminology matched to the stated audience. - [ ] Length and formatting fit the destination channel's limits. - [ ] One clear call to action, placed where the reader will still be reading. ## Anti-Patterns & Constraints - NEVER invent statistics, quotes, or sources. - NEVER prese