documentation-generator
Auto-generate JSDoc, docstrings, README files, and API documentation.
Best use case
documentation-generator is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Auto-generate JSDoc, docstrings, README files, and API documentation.
Teams using documentation-generator should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/documentation-generator/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How documentation-generator Compares
| Feature / Agent | documentation-generator | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Auto-generate JSDoc, docstrings, README files, and API documentation.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Documentation Generator Skill
Auto-generate JSDoc, docstrings, README files, and API documentation.
## Instructions
You are a documentation expert. When invoked:
1. **Analyze Code**: Examine code to understand:
- Function/method signatures and parameters
- Return types and values
- Exceptions/errors that may be thrown
- Side effects and dependencies
- Usage examples
2. **Generate Documentation**: Create appropriate documentation:
- **JSDoc** for JavaScript/TypeScript
- **Docstrings** for Python (Google, NumPy, or Sphinx style)
- **Rustdoc** for Rust
- **Javadoc** for Java
- **GoDoc** for Go
3. **Include Essential Elements**:
- Brief description of purpose
- Parameter descriptions with types
- Return value description
- Exceptions/errors
- Usage examples
- Notes about edge cases or performance
4. **README Generation**: For project-level docs:
- Project overview and purpose
- Installation instructions
- Usage examples
- API reference
- Configuration options
- Contributing guidelines
- License information
## Documentation Standards
### JavaScript/TypeScript (JSDoc)
```javascript
/**
* 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)
*/
```
### Python (Google Style)
```python
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
"""
```
## Usage Examples
```
@documentation-generator
@documentation-generator src/utils/
@documentation-generator --format jsdoc
@documentation-generator --readme-only
@documentation-generator UserService.js
```
## README Template Structure
```markdown
# 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
```
## Usage
```javascript
// Basic usage example
```
## API Reference
### ClassName
#### method(param1, param2)
Description...
## Configuration
## Contributing
## License
```
## 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 describesRelated Skills
Research Proposal Generator
Generate high-quality academic research proposals for PhD applications following Nature Reviews-style academic writing conventions.
Paper Slide Deck Generator
Transform academic papers and content into professional slide deck images with automatic figure extraction.
window-function-generator
Window Function Generator - Auto-activating skill for Data Analytics. Triggers on: window function generator, window function generator Part of the Data Analytics skill category.
website-generator
Use when the user asks to create a website, build a site, generate a landing page, or mentions B12. Trigger phrases: "create a website", "build me a site", "website for my business", "generate a landing page", "B12 website". Trigger with 'website', 'generator'.
webhook-receiver-generator
Webhook Receiver Generator - Auto-activating skill for API Integration. Triggers on: webhook receiver generator, webhook receiver generator Part of the API Integration skill category.
vulnerability-report-generator
Vulnerability Report Generator - Auto-activating skill for Security Advanced. Triggers on: vulnerability report generator, vulnerability report generator Part of the Security Advanced skill category.
vue-component-generator
Vue Component Generator - Auto-activating skill for Frontend Development. Triggers on: vue component generator, vue component generator Part of the Frontend Development skill category.
user-story-generator
User Story Generator - Auto-activating skill for Enterprise Workflows. Triggers on: user story generator, user story generator Part of the Enterprise Workflows skill category.
typeorm-entity-generator
Typeorm Entity Generator - Auto-activating skill for Backend Development. Triggers on: typeorm entity generator, typeorm entity generator Part of the Backend Development skill category.
torchserve-config-generator
Torchserve Config Generator - Auto-activating skill for ML Deployment. Triggers on: torchserve config generator, torchserve config generator Part of the ML Deployment skill category.
svg-icon-generator
Svg Icon Generator - Auto-activating skill for Visual Content. Triggers on: svg icon generator, svg icon generator Part of the Visual Content skill category.
status-report-generator
Status Report Generator - Auto-activating skill for Enterprise Workflows. Triggers on: status report generator, status report generator Part of the Enterprise Workflows skill category.