Generate architecture overview documentation from codebase analysis
Analyze your codebase and generate comprehensive architecture documentation with module diagrams, dependency maps, and project statistics. Use it when onboarding to a new project, preparing technical documentation, or after major refactoring to keep docs current.
/plugin marketplace add thkt/claude-config/plugin install complete-workflow-system@thkt-development-workflowsdocs/Analyzes codebase and automatically generates architecture overview documentation.
# Analyze current directory
/docs:architecture
# Analyze specific directory
/docs:architecture src/
# Specify output destination
/docs:architecture --output docs/ARCHITECTURE.md
| Option | Description | Default |
|---|---|---|
path | Target directory to analyze | Current directory |
--output | Output file path | .claude/workspace/docs/architecture.md |
--format | Output format | markdown |
# Package manager and config file check
ls package.json pubspec.yaml Cargo.toml go.mod pyproject.toml 2>/dev/null
~/.claude/skills/documenting-architecture/scripts/analyze-structure.sh {path}
~/.claude/skills/documenting-architecture/scripts/extract-modules.sh {path}
# Module relationship diagram
~/.claude/skills/documenting-architecture/scripts/generate-mermaid.sh {path} module
# Dependency diagram
~/.claude/skills/documenting-architecture/scripts/generate-mermaid.sh {path} dependency
Embed analysis results into template (~/.claude/skills/documenting-architecture/assets/architecture-template.md)
and generate Markdown documentation.
~/.claude/skills/scripts/validate-markdown.sh {output-file}
Validates generated Markdown for formatting issues. Non-blocking (warnings only).
# Project Name - Architecture Overview
## Technology Stack
| Category | Technology |
|----------|------------|
| Language | TypeScript |
| Framework | React |
| Build Tool | Vite |
## Directory Structure
├── src/
│ ├── components/
│ ├── hooks/
│ └── utils/
## Module Structure
(Mermaid diagram)
## Statistics
- Total files: 150
- Total lines: 12,000
| Tool | Purpose | Installation |
|---|---|---|
| tree-sitter-analyzer | Code structure analysis | uv tool install "tree-sitter-analyzer[popular]" |
| tree | Directory structure | brew install tree |
| jq | JSON processing | brew install jq |
| Error | Action |
|---|---|
| tree-sitter-analyzer not installed | Execute fallback analysis |
| Target directory not found | Display error message |
| Only unsupported languages | Output statistics only |
architecture-analyzer