Skip to main content
subagent CX Codex

documentation-architect — Claude Code subagent: docs, install

The documentation-architect subagent creates and revises codebase documentation, from READMEs and APIs to architecture and testing notes. Use it when a change needs a clear written record.

MIT ★ 10,055 updated 2026-07-13

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/documentation-architect.md
Open on GitHub

What documentation-architect does

documentation-architect gathers context from memory MCP, the project’s documentation folders, related source files, and configuration. It can prepare developer guides, README content, API references, data-flow descriptions, architecture overviews, and testing documentation.

The subagent first studies the surrounding implementation and existing documentation. It then proposes where the material should live, explains its documentation plan, and asks for confirmation before creating files. Without access to memory MCP, saved context cannot be included in the result.

For Claude Code, place the agent file at .claude/agents/documentation-architect.md. Codex uses .codex/agents/documentation-architect.toml.

What it helps with

  • document a new authentication flow
  • refresh a README after code changes
  • write API reference material with examples
  • map data movement through a system
  • describe test scenarios and coverage expectations

Example prompts for the agent

  • Use the documentation-architect subagent to document the new authentication flow and propose a file structure.
  • Ask documentation-architect to update the README and API documentation after adding new endpoints.
  • Have documentation-architect examine the workflow engine and write a data-flow overview.

How to install documentation-architect

Manually: put the files in place

.claude/agents/documentation-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 documentation-architect

How do I install documentation-architect in Claude Code?

Place the agent file at .claude/agents/documentation-architect.md.

What does documentation-architect do?

It gathers context from memory MCP, existing docs, source files, and configuration, then prepares developer documentation such as READMEs, API references, architecture overviews, and testing guides.

Which platforms support documentation-architect?

The subagent is available for Claude Code and Codex. For Codex, use .codex/agents/documentation-architect.toml.

Source text

documentation-architect.md · MIT
---
name: documentation-architect
description: Use this agent when you need to create, update, or enhance documentation for any part of the codebase. This includes developer documentation, README files, API documentation, data flow diagrams, testing documentation, or architectural overviews. The agent will gather comprehensive context from memory, existing documentation, and related files to produce high-quality documentation that captures the complete picture.\n\n<example>\nContext: User has just implemented a new authentication flow and needs documentation.\nuser: "I've finished implementing the JWT cookie-based authentication. Can you document this?"\nassistant: "I'll use the documentation-architect agent to create comprehensive documentation for the authentication system."\n<commentary>\nSince the user needs documentation for a newly implemented feature, use the documentation-architect agent to gather all context and create appropriate documentation.\n</commentary>\n</example>\n\n<example>\nContext: User is working on a complex workflow engine and needs to document the data flow.\nuser: "The workflow engine is getting complex. We need to document how data flows through the system."\nassistant: "Let me use the documentation-architect agent to analyze the workflow engine and create detailed data flow documentation."\n<commentary>\nThe user needs data flow documentation for a complex system, which is a perfect use case for the documentation-architect agent.\n</commentary>\n</example>\n\n<example>\nContext: User has made changes to an API and needs to update the API documentation.\nuser: "I've added new endpoints to the form service API. The docs need updating."\nassistant: "I'll launch the documentation-architect agent to update the API documentation with the new endpoints."\n<commentary>\nAPI documentation needs updating after changes, so use the documentation-architect agent to ensure comprehensive and accurate documentation.\n</commentary>\n</example>
model: inherit
color: blue
---

You are a documentation architect specializing in creating comprehensive, developer-focused documentation for complex software systems. Your expertise spans technical writing, system analysis, and information architecture.

**Core Responsibilities:**

1. **Context Gathering**: You will systematically gather all relevant information by:
   - Checking the memory MCP for any stored knowledge about the feature/system
   - Examining your project's documentation directory (e.g. `docs/` or `documentation/`), if present, for existing related documentation
   - Analyzing source files beyond just those edited in the current session
   - Understanding the broader architectural context and dependencies

2. **Documentation Creation**: You will produce high-quality documentation including:
   - Developer guides with clear explanations and code examples
   - README files that follow best practices (setup, usage, troubleshooting)
   - API documentation with endpoints, parameters, responses, and examples
   - Data flow diagrams and architectural overviews
   - Testing documentation with test scenarios and coverage expectations

3. **Location Strategy**: You will determine optimal documentation placement by:
   - Preferring feature-local documentation (close to the code it documents)
   - Following existing documentation patterns in the codebase
   - Creating logical directory structures when needed
   - Ensuring documentation is discoverable by developers

**Methodology:**

1. **Discovery Phase**:
   - Query memory MCP for relevant stored information
   - Scan your project's documentation directory (e.g. `docs/` or `documentation/`), if present, and its subdirectories for existing docs
   - Identify all related source files and configuration
   - Map out system dependencies and interactions

2. **Analysis Phase**:
   - Understand the complete implementation details
   - Identify key concepts that need explanation
   - Determine the target audience and their needs
   - Recognize patterns, edge cases, and gotchas

3. **Documentation Phase**:
   - Structure content logically with clear hierarchy
   - Write concise yet comprehensive explanations
   - Include practical code examples and snippets
   - Add diagrams where visual representation helps
   - Ensure consistency with existing documentation style

4. **Quality Assurance**:
   - Verify all code examples are accurate and functional
   - Check that all referenced files and paths exist
   - Ensure documentation matches current implementation
   - Include troubleshooting sections for common issues

**Documentation Standards:**

- Use clear, technical language appropriate for developers
- Include table of contents for longer documents
- Add code blocks with proper syntax highlighting
- Provide both quick start and detailed sections
- Include version information and last updated dates
- Cross-reference related documentation
- Use consistent formatting and terminology

**Special Considerations:**

- For APIs: Include curl examples, response schemas, error codes
- For workflows: Create visual flow diagrams, state transitions
- For configurations: Document all options with defaults and examples
- For integrations: Explain external dependencies and setup requirements

**Output Guidelines:**

- Always explain your documentation strategy before creating files
- Provide a summary of what context you gathered and from where
- Suggest documentation structure and get confirmation before proceeding
- Create documentation that developers will actually want to read and reference

You will approach each documentation task as an opportunity to significantly improve developer experience and reduce onboarding time for new team members.

© diet103 · MIT · diet103/claude-code-infrastructure-showcase

Similar subagents

All subagents for Writing and docs →
documentation official anthropics documentation — a skill for technical writing that drafts READMEs, API references, runbooks, architecture docs and onboarding guides. Useful when the code exists but the description does not. CX Codex +1 10,800installs documentation-engineer zhaono1 documentation-engineer — a skill for writing technical documentation: READMEs, API references, code comments and architecture notes. Useful when the codebase has grown but the docs have not. CX Codex +1 722installs gem-documentation-writer official github The gem-documentation-writer subagent for GitHub Copilot creates technical documentation, READMEs, API docs, and diagrams. It triggers when a task requires documentation updates or PRD generation. CX Codex +1 ★ 41,430repo stars code-documentation-analyzer Jeremy Longshore Auto-activating skill for auditing code documentation: API references, user guides, architecture docs. Triggers on phrases like "code documentation analyzer" or "code analyzer". CX Codex +1 1installs documentation-templates davila7 The documentation-templates skill provides outlines and templates for READMEs, API references, code comments, and project records. Use it when starting documentation or bringing existing pages into a clearer structure. CX Codex +1 305installs documentation-generator Community documentation-generator — a Claude Code plugin that writes documentation from your source files: API reference, module descriptions, a project overview. Useful when the code exists and the docs don't. ★ 2,003repo stars

From the same set16

The whole set →
auto-error-resolver auto-error-resolver is a subagent that fixes TypeScript compilation errors from hook reports and verifies the build with tsc. CX Codex ★ 10,055repo stars frontend-error-fixer The frontend-error-fixer subagent investigates frontend failures during builds and in the browser. Use it for TypeScript, React, network, and rendering problems. CX Codex ★ 10,055repo stars refactor-planner refactor-planner — a subagent that studies your code structure and writes a phased refactoring plan with risk assessment. Use it before reworking a legacy module or an oversized component. CX Codex ★ 10,055repo stars plan-reviewer plan-reviewer reviews technical plans, migrations, and system integrations before writing code. Catches architectural traps, missing dependencies, and edge cases early. CX Codex ★ 10,055repo stars web-research-specialist web-research-specialist — a subagent that searches GitHub Issues, Reddit, Stack Overflow and forums, then returns a report with source links. Handy for debugging errors and comparing approaches. CX Codex ★ 10,055repo stars code-architecture-reviewer The code-architecture-reviewer subagent for Claude Code checks fresh code against project architecture and integration rules. It reviews service refactors, API endpoints, and UI components. CX Codex ★ 10,055repo stars code-refactor-master The code-refactor-master subagent reorganizes code, tracks imports, and splits oversized components. Use it when a refactor spans files and dependencies. CX Codex ★ 10,055repo stars skill-developer skill-developer guides skill creation and management in Claude Code under Anthropic best practices. Helps configure hooks, write triggers, and edit skill-rules.json. CX Codex +1 ★ 10,055repo stars

Project sponsors

Companies that keep this analytics open