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. It is especially useful for teams working in multi. Auto-generate JSDoc, docstrings, README files, and API documentation.
Auto-generate JSDoc, docstrings, README files, and API documentation.
Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.
Practical example
Example input
Use the "documentation-generator" skill to help with this workflow task. Context: Auto-generate JSDoc, docstrings, README files, and API documentation.
Example output
A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.
When to use this skill
- Use this skill when you want a reusable workflow rather than writing the same prompt again and again.
When not to use this skill
- Do not use this when you only need a one-off answer and do not need a reusable workflow.
- Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.
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.
Related Guides
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
game-test-case-generator
基于需求文档(xls/csv)生成专业游戏测试用例,支持完整用例和快速测试点两种模式。当用户提到"游戏测试"、"测试用例生成"、"需求转测试用例"、上传需求文档或原型时使用此技能。
viral-generator-builder
Expert in building shareable generator tools that go viral - name generators, quiz makers, avatar creators, personality tests, and calculator tools. Covers the psychology of sharing, viral mechanics, and building tools people can't resist sharing with friends. Use when: generator tool, quiz maker, name generator, avatar creator, viral tool.
k8s-manifest-generator
Create production-ready Kubernetes manifests for Deployments, Services, ConfigMaps, and Secrets following best practices and security standards. Use when generating Kubernetes YAML manifests, creating K8s resources, or implementing production-grade Kubernetes configurations.
documentation-templates
Documentation templates and structure guidelines. README, API docs, code comments, and AI-friendly documentation.
documentation-generation-doc-generate
You are a documentation expert specializing in creating comprehensive, maintainable documentation from code. Generate API docs, architecture diagrams, user guides, and technical references using AI-powered analysis and industry best practices.
code-documentation-doc-generate
You are a documentation expert specializing in creating comprehensive, maintainable documentation from code. Generate API docs, architecture diagrams, user guides, and technical references using AI-powered analysis and industry best practices.
code-documentation-code-explain
You are a code education expert specializing in explaining complex code through clear narratives, visual diagrams, and step-by-step breakdowns. Transform difficult concepts into understandable explanations.
run-nx-generator
Run Nx generators with prioritization for workspace-plugin generators. Use this when generating code, scaffolding new features, or automating repetitive tasks in the monorepo.
pptx-generator
Generate, edit, and read PowerPoint presentations. Create from scratch with PptxGenJS (cover, TOC, content, section divider, summary slides), edit existing PPTX via XML workflows, or extract text with markitdown. Triggers: PPT, PPTX, PowerPoint, presentation, slide, deck, slides.
nano-image-generator
Generate images using Nano Banana Pro (Gemini 3 Pro Preview). Use when creating app icons, logos, UI graphics, marketing banners, social media images, illustrations, diagrams, or any visual assets. Supports reference images for style transfer and character consistency. Triggers include phrases like 'generate an image', 'create a graphic', 'make an icon', 'design a logo', 'create a banner', 'same style as', 'keep the style', or any request needing visual content.
excalidraw-diagram-generator
Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.
tasks-generator
Generate structured task roadmaps from project specifications. Use when the user asks to create tasks, sprint plans, roadmaps, or work breakdowns based on PRD (Product Requirements Document), Tech Specs, or UI/UX specs. Triggers include requests like "generate tasks from PRD", "create sprint plan", "break down this spec into tasks", "create a roadmap", or "plan the implementation".