Generates inline JSDoc/docstrings, README sections, or API reference docs for specified code files, directories, or symbols.
Ships in recipe-commands. Installing the plugin adds it to Claude Code.
Generate documentation for the code specified in $ARGUMENTS. The argument may be a file path, a directory, a function name, or a keyword like "readme" or "api".
Parse $ARGUMENTS to figure out what kind of documentation is needed:
| Argument contains | Action |
|---|---|
A file path (e.g., src/auth.ts) | Add inline JSDoc/docstrings to that file |
A directory (e.g., src/utils/) | Document all exported members in that directory |
readme or README | Generate or update the project README |
api | Generate API reference documentation |
| A function/class name | Find and document that specific symbol |
| Nothing | Ask the user what they want documented |
For each exported function, class, method, type, and constant in the target file(s):
JavaScript/TypeScript -- JSDoc:
/**
* Brief one-line description of what this function does.
*
* Longer explanation if the behavior is non-obvious, including
* algorithm notes, performance characteristics, or caveats.
*
* @param name - Description of the parameter
* @returns Description of the return value
* @throws {ErrorType} When and why this error is thrown
* @example
* const result = myFunction("input");
* // result === "expected output"
*/
Python -- Docstrings (Google style):
def my_function(name: str) -> str:
"""Brief one-line description.
Longer explanation if needed.
Args:
name: Description of the parameter.
Returns:
Description of the return value.
Raises:
ValueError: When and why this error is raised.
Example:
>>> my_function("input")
'expected output'
"""
Rules:
@param id - The id is useless. Write @param id - Unique identifier used to look up the user record.@example for public API functions.If generating a README, include these sections:
Detect real values from the codebase (package name, scripts, entry points). Do not invent placeholder values.
If generating API documentation:
Format as a Markdown document with a table of contents.
Apply the documentation using the Edit tool for inline docs (to preserve surrounding code) or the Write tool for standalone doc files.
List all files modified or created and the number of documentation blocks added. If any functions were skipped (e.g., trivial one-liners or private internals), note them and explain why.
What the command file sets; muted values are Claude Code's defaults
haiku7-day visitors to each command page
15 commands in this plugin
/api-genStep 1 -- Understand the RequirementsGenerate REST API endpoints with routes, validation, error handling, and tests/audit-reposStep 1 -- List the ReposAudit all your GitHub repos for CI health, hygiene, security alerts, and staleness/check-all-prsStep 1 -- Find the PRsCheck all your open PRs across GitHub repos for CI, reviews, and merge readiness/recipe-commands:doc-genfrom recipe-commands
npx claudepluginhub sagargupta16/claude-code-recipes --plugin recipe-commandsOther plugins' commands for the same job