create-architecture-documentation — команда для Claude Code
Слэш-команда для Claude, которая собирает документацию по архитектуре проекта: диаграммы, ADR и описание компонентов.
npx claude-code-templates@latest --command documentation/create-architecture-documentationЧто делает create-architecture-documentation
Команда проходит по репозиторию и собирает контекст сама: ищет конфиги (*.json, *.yaml, *.toml), файлы с именами вроде *architecture* или *design*, docker-compose.yml, манифесты k8s/, описания API (*openapi*, *swagger*). Дальше на этой основе предлагает разложить систему по слоям — контекст, контейнеры, компоненты, код.
Формат документации выбирается аргументом: --c4-model, --arc42, --adr, --plantuml или --full-suite. Можно передать название фреймворка первым аргументом. Инструменты у команды ограничены чтением, записью, правкой файлов и Bash, поэтому диаграммы она делает как код, а не картинками.
Список того, что она пытается задокументировать, широкий: границы сервисов, потоки данных, схемы БД, безопасность, наблюдаемость, решения с обоснованием. Если в проекте нет ни docker-compose.yml, ни k8s/, ни описаний API, контекст будет куцым — команда всё равно отработает, но часть разделов останется на общих словах. Это повод сначала проверить, что в репозитории вообще есть чем её накормить.
Какие задачи решает
- описать существующую систему по слоям C4
- зафиксировать архитектурные решения и их обоснование
- собрать диаграммы как код, а не рисовать их руками
- разложить сервисы и их зависимости по карте
- подготовить документацию к передаче команде или заказчику
Примеры запросов агенту
- /create-architecture-documentation --c4-model
- /create-architecture-documentation --adr
- /create-architecture-documentation --full-suite
Как установить create-architecture-documentation
1Через claude-code-templates
npx claude-code-templates@latest --command documentation/create-architecture-documentation2Вручную: положить файлы
.claude/commands/create-architecture-documentation.mdВызов — /create-architecture-documentation. Для всех проектов — ~/.claude/commands/
Вручную: положить файлы
~/.codex/prompts/create-architecture-documentation.mdВызов — /prompts:create-architecture-documentation. В Codex этот формат помечен устаревшим, замена — скиллы
Вручную: положить файлы
.github/prompts/create-architecture-documentation.prompt.mdВручную: положить файлы
.gemini/commands/create-architecture-documentation.tomlGemini хранит команды в TOML: текст запроса — в поле prompt
Из того же набора205
Весь набор →Похожие
Рядом в каталоге
Все слэш-команды по теме «Тексты и документация» →Вопросы о create-architecture-documentation
Как установить create-architecture-documentation в Claude?
Через шаблоны: npx claude-code-templates@latest --command documentation/create-architecture-documentation. После этого файл команды лежит в .claude/commands/create-architecture-documentation.md.
Что делает create-architecture-documentation?
Анализирует структуру проекта и генерирует документацию по архитектуре: диаграммы, описание компонентов и записей о решениях. Формат задаётся аргументом вроде --c4-model или --arc42.
Какие форматы документации поддерживаются?
C4 Model, Arc42, ADR, PlantUML и режим --full-suite, который собирает всё сразу. Выбор передаётся аргументом при вызове команды.
Исходный текст
create-architecture-documentation.md · MIT
---
allowed-tools: Read, Write, Edit, Bash
argument-hint: "[framework] | --c4-model | --arc42 | --adr | --plantuml | --full-suite"
description: Generate comprehensive architecture documentation with diagrams, ADRs, and interactive visualization
---
# Architecture Documentation Generator
Generate comprehensive architecture documentation: $ARGUMENTS
## Current Architecture Context
- Project structure: !`find . -type f -name "*.json" -o -name "*.yaml" -o -name "*.toml" | head -5`
- Documentation exists: @docs/ or @README.md (if exists)
- Architecture files: !`find . -name "*architecture*" -o -name "*design*" -o -name "*.puml" | head -3`
- Services/containers: @docker-compose.yml or @k8s/ (if exists)
- API definitions: !`find . -name "*api*" -o -name "*openapi*" -o -name "*swagger*" | head -3`
## Task
Generate comprehensive architecture documentation with modern tooling and best practices:
1. **Architecture Analysis and Discovery**
- Analyze current system architecture and component relationships
- Identify key architectural patterns and design decisions
- Document system boundaries, interfaces, and dependencies
- Assess data flow and communication patterns
- Identify architectural debt and improvement opportunities
2. **Architecture Documentation Framework**
- Choose appropriate documentation framework and tools:
- **C4 Model**: Context, Containers, Components, Code diagrams
- **Arc42**: Comprehensive architecture documentation template
- **Architecture Decision Records (ADRs)**: Decision documentation
- **PlantUML/Mermaid**: Diagram-as-code documentation
- **Structurizr**: C4 model tooling and visualization
- **Draw.io/Lucidchart**: Visual diagramming tools
3. **System Context Documentation**
- Create high-level system context diagrams
- Document external systems and integrations
- Define system boundaries and responsibilities
- Document user personas and stakeholders
- Create system landscape and ecosystem overview
4. **Container and Service Architecture**
- Document container/service architecture and deployment view
- Create service dependency maps and communication patterns
- Document deployment architecture and infrastructure
- Define service boundaries and API contracts
- Document data persistence and storage architecture
5. **Component and Module Documentation**
- Create detailed component architecture diagrams
- Document internal module structure and relationships
- Define component responsibilities and interfaces
- Document design patterns and architectural styles
- Create code organization and package structure documentation
6. **Data Architecture Documentation**
- Document data models and database schemas
- Create data flow diagrams and processing pipelines
- Document data storage strategies and technologies
- Define data governance and lifecycle management
- Create data integration and synchronization documentation
7. **Security and Compliance Architecture**
- Document security architecture and threat model
- Create authentication and authorization flow diagrams
- Document compliance requirements and controls
- Define security boundaries and trust zones
- Create incident response and security monitoring documentation
8. **Quality Attributes and Cross-Cutting Concerns**
- Document performance characteristics and scalability patterns
- Create reliability and availability architecture documentation
- Document monitoring and observability architecture
- Define maintainability and evolution strategies
- Create disaster recovery and business continuity documentation
9. **Architecture Decision Records (ADRs)**
- Create comprehensive ADR template and process
- Document historical architectural decisions and rationale
- Create decision tracking and review process
- Document trade-offs and alternatives considered
- Set up ADR maintenance and evolution procedures
10. **Documentation Automation and Maintenance**
- Set up automated diagram generation from code annotations
- Configure documentation pipeline and publishing automation
- Set up documentation validation and consistency checking
- Create documentation review and approval process
- Train team on architecture documentation practices and tools
- Set up documentation versioning and change management
© davila7 · MIT · davila7/claude-code-templates