document-touched-code
Document touched code with JSDoc, method comments, and focused section comments as the default behavior whenever implementing a new feature, refactoring…
Skill by werlang
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/werlang-document-touched-code
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/document-touched-code
What's inside
- Skill name
document-touched-code- Description
- Document touched code with JSDoc, method comments, and focused section comments as the default behavior whenever implementing a new feature, refactoring, changing a body of code, writing tests, or improving maintainability. Apply this by default for all code-writing tasks; if the user explicitly requests no comments, respect that. For non-JavaScript code, use the ecosystem's native doc-comment format with the same standard.
- License
- MIT
- Instructions
- 61 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- comment-patterns.md · references/
SKILL.md (first lines)
# Document Touched Code Treat documentation as part of the implementation, not a later cleanup step. When you add or materially change code, leave the touched area easier to understand than you found it: accurate doc comments on the touched methods/functions and focused local comments where the reasoning would otherwise be expensive to re-derive. ## Default Standard 1. Add or update doc comments on every touched exported function, class method, constructor, and materially changed private method. 2. In JavaScript or TypeScript, use JSDoc. In other languages, use the closest native doc-comment format. 3. Add short section comments near non-trivial logic you added or materially changed. 4. Keep comments focused on intent, assumptions, invariants, ordering, edge cases, and decision points. 5. Rewrite or remove stale comments when behavior changes. 6. Do not leave touched code less documented than the surrounding codebase standard. ## Workflow 1. Identify every method, function, or class member you touched. 2. Update doc comments so the signature, parameter meaning, return value, side effects, and important invariants still match reality. 3. Scan the changed logic for the places where a future maintainer would have to stop and mentally simulate the code. 4. Add one focused comment at those points, close to the code it explains. 5. Re-read the result and delete any comment that only repeats the next line instead of explaining why it exists. ## Where Comments Usually Matter - Fallback ordering, cache precedence, and orchestration steps - Dense predicates, validation branches, or conflict/rule evaluation - Data normalization, identity matching, and shape conversion - State transitions, DOM synchronization, and multi-step UI flows - Code that preserves invariants or protects a revert baseline - Places where the implementation intentionally does something non-obvious ## Comment Quality Rules Do: - Explain why the block exists or why the order matters. - Call out assumptions, constraints, and edge-case handling. - Use section comments to break long methods into meaningful phases. - Keep wording specific enough that future edits can validate whether the comment is still true. Do not: - Narrate obvious line-by-line behavior. - Add boilerplate doc comments that merely rename parameters. - Leave outdated comments in place after changing behavior. - Add comments everywhere indiscriminately; add them where comprehension would otherwise slow down. ## Quick Heuristics - If a method signature changed, its doc comment probably needs an update. - If a block took more than a quick glance to understand, it probably deserves a short local comment. - If the code is already obvious from names and structure, prefer no comment. - If a comment would be valid in almost any project, make it more specific. ## Reference See [references/comment-patterns.md](references/comment-patterns.md) for short examples of strong doc comments and section comments. Pair with [`clean-code-and-oop`](../clean-code-and-oop/SKILL.md) to keep function interfaces, class contracts, and types clean and self-describing.
From werlang/user-skills, MIT.
More from werlang/user-skills
- 0.570score
css-standards
werlang
Enforce reusable, brand-aware CSS architecture for public web apps by owning shared tokens in a common stylesheet, importing page entrypoints first, keeping…
SkillAFreshness: AClaude Code +9 - 0.570score
clean-code-and-oop
werlang
Authoritative engineering standards for writing Clean Code, Object-Oriented Programming (OOP) architectures, SOLID design principles, and safe refactoring.
SkillAFreshness: AClaude Code +9 - 0.570score
code-review
werlang
Review changes since a fixed point (commit, branch, tag, or merge-base) along a risk-calibrated gradient (Trunk vs Leaf code) across Standards, Spec, and…
SkillAFreshness: AClaude Code +9 - 0.570score
api-building
werlang
Build or refactor reusable Node.js APIs using Express, express.Router, ESM imports, named exports, entity classes in model/, helpers for non-endpoint logic…
SkillAFreshness: AClaude Code +9 - 0.570score
git-change-workflow
werlang
Choose and apply a Git branching, worktree, and commit workflow for implementation, refactor, bug-fix, documentation, and configuration work.
SkillAFreshness: AClaude Code +9 - 0.570score
entity-models
werlang
Model API entities as classes inside model/, including base model inheritance, relation helpers, model-to-model composition, and route-to-model instance flows.
SkillAFreshness: AClaude Code +9 - 0.544score
frontend-design
werlang
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one.
SkillAFreshness: AClaude Code +9 - 0.479score
audit-project-context
werlang
Audit, verify, update, or clean docs, prompts, skills, agents, instructions, README files, and other markdown/MD files against the current project codebase.
SkillCFreshness: CClaude Code +9 - 0.474score
documentation-maintenance
werlang
Keep project documentation, agent guidance, comments, and validation instructions synchronized with the real implementation.
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 30, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/werlang/user-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from werlang
- 0.570score
css-standards
werlang
Enforce reusable, brand-aware CSS architecture for public web apps by owning shared tokens in a common stylesheet, importing page entrypoints first, keeping…
SkillAFreshness: AClaude Code +9 - 0.570score
clean-code-and-oop
werlang
Authoritative engineering standards for writing Clean Code, Object-Oriented Programming (OOP) architectures, SOLID design principles, and safe refactoring.
SkillAFreshness: AClaude Code +9 - 0.570score
code-review
werlang
Review changes since a fixed point (commit, branch, tag, or merge-base) along a risk-calibrated gradient (Trunk vs Leaf code) across Standards, Spec, and…
SkillAFreshness: AClaude Code +9 - 0.570score
api-building
werlang
Build or refactor reusable Node.js APIs using Express, express.Router, ESM imports, named exports, entity classes in model/, helpers for non-endpoint logic…
SkillAFreshness: AClaude Code +9 - 0.570score
git-change-workflow
werlang
Choose and apply a Git branching, worktree, and commit workflow for implementation, refactor, bug-fix, documentation, and configuration work.
SkillAFreshness: AClaude Code +9 - 0.570score
entity-models
werlang
Model API entities as classes inside model/, including base model inheritance, relation helpers, model-to-model composition, and route-to-model instance flows.
SkillAFreshness: AClaude Code +9
Cite this page
document-touched-code skill. Agent Mart. https://agentmart.dev/skills/werlang-document-touched-code (last updated 2026-10-24)