К основному содержанию
команда CX Codex

docs-gen — команда для Claude Code: документация и установка

Команда docs-gen анализирует кодовую базу и собирает API-документацию, руководства и справочные материалы. Подходит для генерации сайта документации и автодеплоя.

MIT ★ 788 обновлён 2026-07-03

Установить в Claude Code · Вручную: положить файлы Все способы и платформы ↓
.claude/commands/docs-gen.md
Открыть на GitHub

Что делает docs-gen

docs-gen анализирует структуру проекта, API и функции кода, затем собирает документацию в выбранном формате. Команда умеет готовить OpenAPI или Swagger, README, руководства, справочники, миграционные инструкции и документы по развёртыванию. Для пользовательских руководств и туториалов она подключает субагента @docs-writer.

Результатом может стать сайт на Docusaurus или VuePress с навигацией, поиском, примерами кода и диаграммами Mermaid. Доступны форматы markdown, html, pdf, openapi, swagger, gitbook, docusaurus и vuepress; флаг --auto-deploy задаёт публикацию на GitHub Pages, Netlify или Vercel. Если нужен PDF, формат нужно передать явно через --format pdf.

Какие задачи решает

  • собрать API-документацию из кода
  • создать README и руководство пользователя
  • подготовить OpenAPI или Swagger-спецификацию
  • сформировать сайт документации с диаграммами
  • настроить автодеплой документации

Примеры запросов агенту

  • Собери API-документацию в формате openapi и положи результат в docs/api.
  • Создай руководство с примерами и диаграммами из текущей кодовой базы.
  • Собери сайт документации в формате docusaurus и включи автодеплой.

Как установить docs-gen

Вручную: положить файлы

.claude/commands/docs-gen.md

Вызов — /docs-gen. Для всех проектов — ~/.claude/commands/

Вопросы о docs-gen

Как установить docs-gen в Claude Code?

Создайте файл .claude/commands/docs-gen.md и поместите в него содержимое команды.

Что делает docs-gen?

Команда читает кодовую базу и создаёт API-документы, руководства, справочники и сайт документации. Она также может подготовить спецификации OpenAPI и настроить публикацию.

Какие форматы поддерживает docs-gen?

Доступны markdown, html, pdf, openapi, swagger, gitbook, docusaurus и vuepress. Формат задаётся через --format.

Исходный текст

docs-gen.md · MIT
---
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
```yaml
# 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
```markdown
# Create user-focused documentation with:
- Getting started tutorials
- Step-by-step workflows
- Troubleshooting guides
- Best practices and tips
- Video tutorials integration
```

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

### Project Documentation
```markdown
# 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
```yaml
# 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
```yaml
# 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
- **Developer**: Code-focused layout with syntax highlighting

### Customization Options
- **Branding**: Custom logos, colors, and styling
- **Navigation**: Configurable menu structure and organization
- **Features**: Toggle search, comments, analytics, and social sharing
- **Content**: Custom landing pages, footers, and call-to-actions

Focus on creating documentation that serves users effectively, stays current with code changes, and provides an excellent developer experience.

© alirezarezvani · MIT · alirezarezvani/claude-code-tresor

Похожие слэш-команды

Все слэш-команды по теме «Тексты и документация» →
Branch Docs branch-docs MCP-сервер Branch Docs для поиска и чтения документации API Branch прямо в агенте. Достаёт эндпоинты, схемы, переменные серверов и страницы гайдов. CX Codex +1 1 760установок w-api-docs blockmatic-icebox Скилл w-api-docs для Claude Code обновляет API-документацию из исходной схемы или маршрутов. Он подключается к задаче, когда нужно изменить API и пересобрать его документацию. CX Codex +1 647установок coding-agent-docs-optimization Samuel Berthe Скилл coding-agent-docs-optimization для Claude Code проверяет, сможет ли агент подключить SDK или API только по документации. Запускается при запросах про agent-readable docs, llms.txt или выдуманные вызовы API. CX Codex +1 13 400установок api-docs ruvnet Скилл api-docs собирает документацию по исходникам на TypeScript и JavaScript: находит публичные экспорты, разбирает JSDoc, дописывает недостающие комментарии и выдаёт OpenAPI 3.0 для HTTP-эндпоинтов. CX Codex +1 893установок Octri API Docs OctriDev MCP-сервер Octri API Docs подключает документацию вашего API к ассистенту: поиск по эндпоинтам, готовые SDK-сниппеты и вызовы реальных запросов. CX Codex +1 ★ 4звёзд репо doc-gen SethGammon Скилл doc-gen создаёт комментарии к функциям, README для каталогов и справку по API, подстраиваясь под стиль проекта. Полезен, когда документацию нужно сверить с кодом, а не пересказать сигнатуры. CX Codex +1 ★ 937звёзд репо

Из того же набора27

Весь набор →
secret-scanner Скилл secret-scanner находит случайно вписанные пароли, токены и приватные ключи в коде до того, как они попадут в коммит или репозиторий. CX Codex +1 ★ 788звёзд репо api-documenter Скилл api-documenter для Claude Code собирает спецификации API по коду и комментариям. Формирует документацию при изменении маршрутов или подготовке OpenAPI-документа. CX Codex +1 ★ 788звёзд репо readme-updater Скилл readme-updater обновляет README автоматически, когда меняется структура проекта, добавляются зависимости или новые фичи. CX Codex +1 ★ 788звёзд репо test-generator Скилл test-generator генерирует базовые заготовки тестов для новых функций и React-компонентов под популярные тест-раннеры. CX Codex +1 ★ 788звёзд репо scaffold Команда scaffold генерирует каркас проекта или отдельного компонента: исходники, конфиги, тесты и документацию. Фреймворк и набор фич задаются флагами. CX Codex +1 ★ 788звёзд репо code-reviewer Скилл code-reviewer для Claude Code автоматически проверяет качество, стиль и типовые уязвимости при сохранении файлов или перед коммитом. CX Codex +1 ★ 788звёзд репо git-commit-helper Скилл git-commit-helper анализирует staged diff и предлагает сообщение коммита в формате Conventional Commits. Пригодится перед созданием коммита или когда сложно сформулировать его описание. CX Codex +1 ★ 788звёзд репо config-safety-reviewer Субагент config-safety-reviewer проверяет конфиги на захардкоженные значения, неверные таймауты и лимиты пулов; его включают перед изменениями конфигурации. CX Codex ★ 788звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой