Guide for writing effective code documentation, including docstrings, JSDoc, dartdoc, and implementation comments. Use this skill when writing new code, adding features, or improving existing documentation in Dart, Python, or TypeScript to ensure clarity and maintainability.
3k tokens
context cost
the whole folder, loaded on every use
4
files
instructions only
0
copies elsewhere
how many repositories repackaged it
2776
stars on the repo
on the repository, not the skill itself
Install
one command, takes just this skill from the repository
Noun Phrases: Start variable/property docs with a noun phrase.
_Examples_: "The current color.", "A list of active users.".
Booleans: Always start with "Whether" (or similar clear indicator).
_Good_: "Whether this widget is enabled."
_Bad_: "If this widget is enabled...", "True if...", "Flag to indicate...".
Avoid Jargon: Use plain English unless the term is a widely accepted standard (e.g., "HTTP", "URL").
Formatting
Sparingly: Use Markdown features (bold, lists) sparingly.
No HTML: Avoid HTML unless strictly necessary and supported by the documentation tool.
Parameters/Returns/Exceptions: Use prose to describe parameters, return values, and thrown exceptions. Do not rely solely on tags like @param unless mandated by the language standard (e.g., Javadoc).
4. Implementation Comments
Ensure implementation comments (//) are accurate, relevant, factual, and provide information that is not readily understandable from the code. Remove or reword comments that do not meet these criteria. If an implementation comment provides information useful to an API consumer that is not already in the documentation comments, move it to the documentation comments.
5. Review Checklist
Use this checklist to verify your documentation:
[ ] Summary: Ensure every public member starts with a one-sentence summary ending in a period.
[ ] Brevity: Remove "This class..." or "This function..." fluff.
[ ] Completeness: Document strict constraints (e.g., "must not be null") and exceptions.
[ ] Examples: Consider adding a code sample for complex widgets or methods.
6. Language Specific Instructions
Refer to the language guides for detailed instructions on structure, linking, and framework-specific patterns:
Dart / Flutter: references/dart.md
TypeScript / JavaScript: references/typescript.md
Python: references/python.md
How to use it
Copy the folder
Take flutter/code-documentation from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
Check the name does not clash
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.