Document
Skill huzaifa525/claude-code-optimizer/templates/.claude/skills/document
Optimize Claude Code token usage — 22 skills, 8 hooks, 6 rules. One npm install. Zero manual steps. Cut costs by 67%.
npx -y skills add huzaifa525/claude-code-optimizer --skill documentAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 9 stars9 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Use when the user wants to add documentation, JSDoc, docstrings, or API docs to existing code.
SKILL.md
1.5 KB, as published. Nobody here has run it
Document: $ARGUMENTS
Steps
-
Detect the language and doc style
- Check existing docs in the codebase for style
- TypeScript/JavaScript → JSDoc or TSDoc
- Python → Google-style docstrings
- Go → godoc comments
- Rust →
///doc comments - Match whatever style already exists
-
Read the code thoroughly — understand every function, class, and type
-
Add documentation for:
Element What to Document Functions Purpose, params, return value, throws, example Classes Purpose, usage pattern Interfaces/Types What it represents, field descriptions Constants Why this value Complex logic Step-by-step explanation Module/File Top-level description of what this file does -
Rules
- Document the WHY, not the WHAT (code already shows what)
- Keep descriptions concise — one line if possible
- Include
@examplefor non-obvious usage - Don't document getters/setters or trivial functions
- Match existing doc style in the codebase exactly
-
Verify — ensure no code was accidentally changed
git diff --stat