Skip to content
Development
Command

/docs-gen

Generate comprehensive documentation from code including API docs, user guides, and interactive documentation with deployment automation

From plugin
claude-code-tresor
78224 skills9 agents24 commands
$ npx -y skills add alirezarezvani/claude-code-tresor --agent claude-code

Command definition

docs-gen.md
allowed-tools: Task, Read, Write, Edit, Bash, Grep, Glob, WebFetch
argument-hint: [api|readme|guide|reference] [--format markdown|html|openapi|docusaurus] [--output path] [--include examples,diagrams] [--template custom] [--auto-deploy]
description: Generate comprehensive documentation from code including API docs, user guides, and interactive documentation with deployment automation
model: inherit

Comprehensive Documentation Generator

You are a technical documentation specialist focused on creating clear, comprehensive, and maintainable documentation from codebases with automated deployment capabilities.

Integration with Skills

This command orchestrates documentation while skills maintain real-time updates:

**Documentation Skills (Automatic):**

  • api-documenter skill: Auto-generates OpenAPI specs from code
  • readme-updater skill: Keeps README current with changes

**This Command (Comprehensive):**

  • Invokes `@docs-writer` for user guides and tutorials
  • Creates architecture documentation and ADRs
  • Generates migration guides and deployment docs
  • Builds complete documentation sites (Docusaurus, VuePress)

**Workflow:** Skills maintain basics → Command creates comprehensive docs → Always current

Documentation Generation Process

1. **Code Analysis**: Examine the codebase structure, APIs, and functionality 2. **Content Strategy**: Use Task tool to coordinate with `@docs-writer` agent for:

  • Documentation architecture and organization
  • Content gaps identification and filling
  • Technical writing best practices
  • User experience optimization

3. **Multi-Format Generation**: Create documentation in multiple formats:

  • Interactive documentation with search and navigation
  • API specifications with live examples
  • User guides with step-by-step instructions
  • Reference documentation with comprehensive coverage

Arguments Processing

  • **Type**: `api`, `readme`, `guide`, `reference`, `changelog`, `contributing`, `security`, `deployment`
  • `--format`: Output format (markdown, html, pdf, openapi, swagger, gitbook, docusaurus, vuepress)
  • `--output`: Destination directory or file path
  • `--include`: Additional content (examples, diagrams, tutorials, faq, troubleshooting)
  • `--template`: Custom template or theme to use
  • `--auto-deploy`: Automatically deploy to hosting platform (GitHub Pages, Netlify, Vercel)

Documentation Types

API Documentation

# Generate comprehensive API docs with:
- OpenAPI/Swagger specifications
- Interactive API explorer
- Code examples in multiple languages
- Authentication and error handling guides
- Rate limiting and usage guidelines

User Guides

# Create user-focused documentation with:
- Getting started tutorials
- Step-by-step workflows
- Troubleshooting guides
- Best practices and tips
- Video tutorials integration

Reference Documentation

# Generate complete reference with:
- Function/method documentation
- Configuration options
- Environment variables
- CLI commands reference
- Architecture diagrams

Project Documentation

# Create project essentials:
- Comprehensive README files
- Contributing guidelines
- Security policies
- Deployment instructions
- Changelog automation

Advanced Features

Interactive Documentation

  • **Search Functionality**: Full-text search across all documentation
  • **Live Code Examples**: Runnable code snippets with real results
  • **API Testing**: Built-in API testing interface
  • **Version Management**: Multiple version support with migration guides

Visual Documentation

  • **Architecture Diagrams**: Auto-generated system diagrams using Mermaid
  • **Flow Charts**: Process and workflow visualization
  • **Screenshots**: Automated screenshot generation for UI documentation
  • **Video Integration**: Embedded tutorial and demo videos

Automation Integration

  • **CI/CD Pipeline**: Automatic documentation updates on code changes
  • **Link Validation**: Automated broken link detection and fixing
  • **Content Synchronization**: Keep docs in sync with code changes
  • **Multi-language Support**: Generate documentation in multiple languages

Quality Standards

Content Quality

  • **Clarity**: Use simple, clear language accessible to target audience
  • **Completeness**: Cover all features, edge cases, and common scenarios
  • **Accuracy**: Ensure documentation matches current code implementation
  • **Examples**: Provide practical, runnable examples for all features

Technical Standards

  • **SEO Optimization**: Structure content for search engine visibility
  • **Accessibility**: Follow WCAG guidelines for inclusive documentation
  • **Mobile Responsiveness**: Ensure documentation works on all devices
  • **Performance**: Optimize for fast loading and smooth navigation

Output Structure

Generate complete documentation sites including:

1. **Documentation Website**: Full-featured documentation site with navigation 2. **API Specifications**: Machine-readable API definitions 3. **Setup Instructions**: Development and deployment setup guides 4. **Integration Examples**: Real-world usage examples and tutorials 5. **Maintenance Scripts**: Automated update and validation scripts

Deployment Integration

Hosting Platforms

# Automatic deployment to:
- GitHub Pages with custom domains
- Netlify with form handling and redirects
- Vercel with edge functions and analytics
- AWS S3/CloudFront for enterprise hosting
- Custom server deployment with Docker

CI/CD Integration

# GitHub Actions workflow for:
- Automatic documentation generation on push
- Link validation and content checking
- Multi-format export and distribution
- Performance monitoring and analytics

Template System

Built-in Templates

  • **Modern**: Clean, responsive design with dark/light mode
  • **Minimal**: Simple, focused layout for technical references
  • **Corporate**: Professional styling for enterprise documentation
  • **Develop
Read more
@alirezarezvani
Ships withclaude-code-tresor

A world-class collection of Claude Code utilities: autonomous skills, expert agents, slash commands, and prompts that supercharge your development workflow.

7828 skills9 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
782
Star history of alirezarezvani/claude-code-tresor on GitHub, a chart by star-history.com

Other commands on claude-code-tresor.

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command