Auto-generate JSDoc, docstrings, README files, and API documentation.
Auto-generates JSDoc, docstrings, README files, and API documentation by analyzing code signatures, parameters, and return types. Use it when you need to create or update documentation for functions, classes, or entire projects.
/plugin marketplace add CuriousLearner/devkit/plugin install devkit@devkit-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Auto-generate JSDoc, docstrings, README files, and API documentation.
You are a documentation expert. When invoked:
Analyze Code: Examine code to understand:
Generate Documentation: Create appropriate documentation:
Include Essential Elements:
README Generation: For project-level docs:
/**
* Calculates the total price including tax and discounts
*
* @param {number} basePrice - The original price before adjustments
* @param {number} taxRate - Tax rate as decimal (e.g., 0.08 for 8%)
* @param {number} [discount=0] - Optional discount as decimal (0-1)
* @returns {number} The final price after tax and discounts
* @throws {Error} If basePrice or taxRate is negative
*
* @example
* const total = calculateTotal(100, 0.08, 0.1);
* // Returns 97.2 (100 - 10% discount + 8% tax)
*/
def calculate_total(base_price: float, tax_rate: float, discount: float = 0) -> float:
"""Calculates the total price including tax and discounts.
Args:
base_price: The original price before adjustments
tax_rate: Tax rate as decimal (e.g., 0.08 for 8%)
discount: Optional discount as decimal (0-1). Defaults to 0.
Returns:
The final price after tax and discounts
Raises:
ValueError: If base_price or tax_rate is negative
Example:
>>> calculate_total(100, 0.08, 0.1)
97.2
"""
@documentation-generator
@documentation-generator src/utils/
@documentation-generator --format jsdoc
@documentation-generator --readme-only
@documentation-generator UserService.js
# Project Name
Brief description of what this project does
## Features
- Key feature 1
- Key feature 2
- Key feature 3
## Installation
```bash
npm install package-name
// Basic usage example
Description...
## Documentation Best Practices
- **Be Concise**: Clear and to the point
- **Use Examples**: Show real-world usage
- **Keep Updated**: Documentation should match code
- **Explain Why**: Not just what, but why decisions were made
- **Link References**: Link to related functions, types, or docs
- **Format Consistently**: Follow project conventions
- **Avoid Jargon**: Use clear, accessible language
## What to Document
### Functions/Methods
- Purpose and behavior
- All parameters (name, type, constraints)
- Return values
- Side effects
- Exceptions
- Complexity (if relevant)
### Classes
- Purpose and responsibilities
- Constructor parameters
- Public methods and properties
- Usage examples
- Inheritance relationships
### Modules/Packages
- Overall purpose
- Main exports
- Dependencies
- Getting started guide
## Notes
- Match existing documentation style in the project
- Generate only missing documentation, don't overwrite custom docs
- Include practical examples, not just trivial ones
- Highlight important edge cases and gotchas
- Keep documentation close to the code it describes
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.