mirror of
https://github.com/duthaho/claudekit.git
synced 2026-06-14 06:04:57 +03:00
2.8 KiB
2.8 KiB
name, argument-hint, description
| name | argument-hint | description |
|---|---|---|
| documentation | [file or api/readme] | Use when generating or updating documentation — including code comments, docstrings, JSDoc, API docs, README files, or technical specifications. Trigger for keywords like "document", "docstring", "JSDoc", "README", "API docs", "explain this code", "add comments", or any request to improve code documentation. Also activate when generating project documentation or updating existing docs after code changes. |
Documentation
When to Use
- Adding docstrings or JSDoc to functions/classes
- Generating or updating README files
- Documenting API endpoints
- Writing technical specifications
- Adding inline comments to complex logic
When NOT to Use
- Generating changelogs from commits — use
git-workflows - Writing OpenAPI specs — use
openapi - Architecture design documentation — use
brainstorming+writing-plans
Quick Reference
| Topic | Reference | Key content |
|---|---|---|
| Code documentation | references/code-docs.md |
Python docstrings, TypeScript JSDoc, inline comments |
| API documentation | references/api-docs.md |
Endpoint docs, request/response examples |
| Project documentation | references/project-docs.md |
README, CONTRIBUTING, architecture docs |
Documentation Workflow
For Code
- Read the code thoroughly — understand purpose and behavior
- Identify inputs, outputs, side effects, and edge cases
- Add docstrings/JSDoc with examples
- Add type annotations if missing
For APIs
- Scan route definitions and identify endpoints
- Document request format, response format, error responses
- Add authentication requirements
- Include working examples
For Projects
- Analyze project purpose, features, and setup
- Write clear installation and usage instructions
- Include working code examples
- Keep configuration tables up to date
Best Practices
- Document the why, not the what — code shows what; comments explain why.
- Include examples — one working example beats three paragraphs of description.
- Document edge cases — what happens with null, empty, or invalid input?
- Keep docs adjacent to code — docstrings over separate doc files.
- Update docs with code — stale docs are worse than no docs.
Common Pitfalls
- Restating the code —
# increment i by 1adds no value. - Missing error documentation — not documenting what exceptions a function raises.
- Outdated examples — code examples that no longer compile.
- Over-documenting internal code — public APIs need docs; private helpers often don't.
Related Skills
openapi— OpenAPI spec generation for REST APIsgit-workflows— Changelog generation from commitsbackend-frameworks— Framework-specific documentation patterns