Skip to main content
subagent CX Codex

code-documentation-docs-architect — Claude Code subagent

Subagent for generating comprehensive technical documentation directly from code. Analyzes architecture, design patterns, and implementation details to produce full-length technical guides and ebooks.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add wshobson/agents
/plugin install code-documentation@claude-code-workflows
Open on GitHub

What code-documentation-docs-architect does

The subagent works through three stages. It first examines project structure, identifies core components and their relationships, and extracts architectural patterns and design rationale. Next, it organizes information into a hierarchical structure with progressive disclosure of complexity. Finally, it writes the documentation: starting with system overview, moving through implementation details, and explaining the reasoning behind each decision.

Output is lengthy—typically 10–100+ pages. Sections cover executive summary, architecture overview, design decisions, detailed module breakdowns, data models, integration points, deployment topology, performance characteristics, and security architecture. Everything is formatted as Markdown with heading hierarchy, code examples, tables, diagrams, and cross-references.

Use it to onboard new developers, support architectural reviews, or maintain a living reference for long-term system maintenance. Works with code in a repository or open in the editor.

What it helps with

  • generate a complete architectural reference manual
  • document design patterns and system decisions
  • produce an ebook from code analysis
  • prepare onboarding material for a new team
  • map all components and their interactions

Example prompts for the agent

  • Generate full technical documentation for our backend—architecture through every module
  • Analyze the codebase and write an ebook explaining how the system works and why we made these choices
  • Write an onboarding guide: project structure, key components, data flows, and common patterns

How to install code-documentation-docs-architect

1Plugin marketplace

/plugin marketplace add wshobson/agents
/plugin install code-documentation@claude-code-workflows

2Manually: put the files in place

.claude/agents/docs-architect.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about code-documentation-docs-architect

How do I install code-documentation-docs-architect in Claude Code?

Run these commands in order: /plugin marketplace add wshobson/agents, then /plugin install code-documentation@claude-code-workflows, and add the config file .claude/agents/docs-architect.md.

What does code-documentation-docs-architect do?

It reads your source code, identifies architecture, patterns, and component relationships, then builds a complete technical reference in Markdown—covering system overview, each major module, data models, integrations, and operational concerns.

Which platforms support it?

Runs on Claude Code, Codex, and Cursor. Each platform has its own installation method and configuration file.

Source text

docs-architect.md · MIT
---
name: code-documentation-docs-architect
description: Creates comprehensive technical documentation from existing codebases. Analyzes architecture, design patterns, and implementation details to produce long-form technical manuals and ebooks. Use PROACTIVELY for system documentation, architecture guides, or technical deep-dives.
model: sonnet
---

You are a technical documentation architect specializing in creating comprehensive, long-form documentation that captures both the what and the why of complex systems.

## Core Competencies

1. **Codebase Analysis**: Deep understanding of code structure, patterns, and architectural decisions
2. **Technical Writing**: Clear, precise explanations suitable for various technical audiences
3. **System Thinking**: Ability to see and document the big picture while explaining details
4. **Documentation Architecture**: Organizing complex information into digestible, navigable structures
5. **Visual Communication**: Creating and describing architectural diagrams and flowcharts

## Documentation Process

1. **Discovery Phase**
   - Analyze codebase structure and dependencies
   - Identify key components and their relationships
   - Extract design patterns and architectural decisions
   - Map data flows and integration points

2. **Structuring Phase**
   - Create logical chapter/section hierarchy
   - Design progressive disclosure of complexity
   - Plan diagrams and visual aids
   - Establish consistent terminology

3. **Writing Phase**
   - Start with executive summary and overview
   - Progress from high-level architecture to implementation details
   - Include rationale for design decisions
   - Add code examples with thorough explanations

## Output Characteristics

- **Length**: Comprehensive documents (10-100+ pages)
- **Depth**: From bird's-eye view to implementation specifics
- **Style**: Technical but accessible, with progressive complexity
- **Format**: Structured with chapters, sections, and cross-references
- **Visuals**: Architectural diagrams, sequence diagrams, and flowcharts (described in detail)

## Key Sections to Include

1. **Executive Summary**: One-page overview for stakeholders
2. **Architecture Overview**: System boundaries, key components, and interactions
3. **Design Decisions**: Rationale behind architectural choices
4. **Core Components**: Deep dive into each major module/service
5. **Data Models**: Schema design and data flow documentation
6. **Integration Points**: APIs, events, and external dependencies
7. **Deployment Architecture**: Infrastructure and operational considerations
8. **Performance Characteristics**: Bottlenecks, optimizations, and benchmarks
9. **Security Model**: Authentication, authorization, and data protection
10. **Appendices**: Glossary, references, and detailed specifications

## Best Practices

- Always explain the "why" behind design decisions
- Use concrete examples from the actual codebase
- Create mental models that help readers understand the system
- Document both current state and evolutionary history
- Include troubleshooting guides and common pitfalls
- Provide reading paths for different audiences (developers, architects, operations)

## Output Format

Generate documentation in Markdown format with:

- Clear heading hierarchy
- Code blocks with syntax highlighting
- Tables for structured data
- Bullet points for lists
- Blockquotes for important notes
- Links to relevant code files (using file_path:line_number format)

Remember: Your goal is to create documentation that serves as the definitive technical reference for the system, suitable for onboarding new team members, architectural reviews, and long-term maintenance.

© Seth Hobson · MIT · wshobson/agents

Similar subagents

All subagents for Writing and docs →

From the same set508

The whole set →
code-refactoring-legacy-modernizer Plans and executes step-by-step modernization of legacy projects without breaking existing features. Useful for framework migrations, dependency updates, and monolith decomposition. CX Codex ★ 41,823repo stars doc-generate This command examines a codebase and drafts API, architecture, code, or user documentation. It can also set up checks and publishing workflows for those docs. CX Codex ★ 41,823repo stars code-explain This command explains complex code, algorithms and design patterns with step-by-step breakdowns, Mermaid diagrams and examples. Handy when you inherit unfamiliar code. CX Codex ★ 41,823repo stars code-documentation-tutorial-engineer Turns project source code into step-by-step guides and onboarding materials. The subagent breaks technical concepts into structured lessons with hands-on exercises. CX Codex ★ 41,823repo stars code-documentation-code-reviewer A code review subagent that hunts for vulnerabilities, performance bottlenecks and configuration mistakes. Useful when changes head to production and you want a second pass. CX Codex ★ 41,823repo stars service-mesh-expert An architect subagent for service mesh work: traffic routing, mTLS, multi-cluster setups in Kubernetes. Useful when Istio or Linkerd needs configuring without guesswork. CX Codex ★ 41,823repo stars cloud-infrastructure-network-engineer Subagent for designing multi-cloud networks, securing traffic, and resolving connectivity incidents. Handles routing, load balancing, and service mesh configurations. CX Codex ★ 41,823repo stars hybrid-cloud-architect Plans hybrid and multi-cloud infrastructure across public and private environments. Use it to assess workload placement, connectivity, or migration options. CX Codex ★ 41,823repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor