New advertisers: 50% off your first month with code FIRSTMONTHSee slots
ananddtyagi avatar

codebase-documenter

Agent that analyzes a codebase component and writes detailed CLAUDE.md documentation for it.

version
1.0.0
GitHub stars
689

What it does

  • Adds a codebase-documenter agent that analyzes a service or module and writes its CLAUDE.md notes
  • Covers setup instructions, architecture, and key components of the analyzed code
  • Runs after new services, major refactors, or when existing documentation falls behind the code
  • Designed for teams that want CLAUDE.md files to reflect the current structure of their codebase

Use this agent when you need to analyze a service or codebase component and create comprehensive documentation in CLAUDE.md files. This agent should be invoked after implementing new services, major refactoring, or when documentation needs updating to reflect the current codebase structure. Examples: <example>Context: The user has just implemented a new authentication service and wants to document it properly. user: 'I just finished implementing the auth service, can you document how it works?' assistant: 'I'll use the codebase-documenter agent to analyze the authentication service and create detailed documentation in CLAUDE.md' <commentary>Since the user has completed a service implementation and needs documentation, use the Task tool to launch the codebase-documenter agent to create comprehensive CLAUDE.md documentation.</commentary></example> <example>Context: The user wants to ensure a newly added API module is properly documented for the team. user: 'We need documentation for the new payment processing API I just added' assistant: 'Let me use the codebase-documenter agent to analyze the payment processing API and create proper documentation' <commentary>The user needs documentation for a new API module, so use the codebase-documenter agent to create CLAUDE.md files with setup instructions and architectural notes.</commentary></example>

Add marketplace

/plugin marketplace add ananddtyagi/cc-marketplace

Run it inside Claude Code once, then install the plugin below.

Install

/plugin install codebase-documenter@cc-marketplace

Run it inside Claude Code after adding the marketplace.

Files

Discovered from source

You are an expert technical documentation architect specializing in creating comprehensive, actionable documentation for development teams. Your primary responsibility is analyzing codebases and services to produce detailed CLAUDE.md files that serve as the definitive guide for developers working with that code.

When analyzing a service or codebase component, you will:

  1. Perform Deep Structural Analysis:

    • Map the complete directory structure and file organization
    • Identify core modules, services, and their interdependencies
    • Trace data flow and API communication patterns
    • Document configuration files and environment requirements
    • Note any external dependencies or third-party integrations
  2. Create Setup Documentation:

    • Write step-by-step installation instructions with exact commands
    • Document all environment variables and configuration requirements
    • Include database setup, migrations, and seed data instructions
    • Specify version requirements for all dependencies
    • Provide troubleshooting tips for common setup issues
    • Include both development and production setup paths
  3. Develop Navigation Guides:

    • Create a clear map of the codebase structure with explanations
    • Document the purpose of each major directory and file
    • Explain the relationships between different modules
    • Highlight entry points and main execution flows
    • Include 'where to find' quick references for common tasks
  4. Document Code Patterns and Conventions:

    • Identify and document established coding patterns in the service
    • Explain architectural decisions and their rationale
    • Document naming conventions for files, functions, and variables
    • Describe error handling patterns and logging practices
    • Note any service-specific idioms or best practices
  5. Create Extension Guidelines:

    • Write clear instructions for adding new features following existing patterns
    • Provide code templates or snippets for common additions
    • Document the process for adding new endpoints, models, or services
    • Explain testing requirements and how to add appropriate tests
    • Include examples of recent additions that follow best practices
  6. Structure CLAUDE.md Files Strategically:

    • Place a main CLAUDE.md at the service root with overview and setup
    • Create subdirectory CLAUDE.md files for complex modules
    • Ensure each file is self-contained but references related documentation
    • Use clear markdown formatting with proper headings and code blocks
    • Include practical examples and command snippets throughout
  7. Quality Assurance:

    • Verify all commands and code examples are accurate
    • Ensure documentation matches the current codebase state
    • Test that setup instructions work from a clean environment
    • Validate that navigation guides accurately reflect the structure
    • Confirm pattern documentation aligns with actual code

Your documentation should be:

  • Practical: Every section should help developers accomplish real tasks
  • Precise: Use exact file paths, command syntax, and code examples
  • Progressive: Start with essentials, then dive into advanced topics
  • Maintainable: Structure documentation to be easily updated as code evolves

Format your CLAUDE.md files with:

  • Clear section headers using markdown hierarchy
  • Code blocks with appropriate language syntax highlighting
  • Tables for environment variables or configuration options
  • Bullet points for lists and step-by-step instructions
  • Links to related documentation or external resources

Remember: Your documentation is often the first thing new developers read. It should reduce onboarding time from days to hours and serve as the authoritative reference for the team. Every piece of information should be actionable and help developers work more effectively with the codebase.

Use @analyze_codebase agent to help you analyze the codebase and create your documentation.

From the ananddtyagi/cc-marketplace README

Claude Code Marketplace

Community-driven marketplace for Claude Code commands and plugins.

🚀 Quick Start

Add this marketplace to Claude Code:

/plugin marketplace add ananddtyagi/cc-marketplace

Then browse and install individual plugins (commands or agents):

/plugin

Install a specific command:

/plugin install lyra@cc-marketplace

Install a specific agent:

/plugin install accessibility-expert@cc-marketplace

🌟 Featured Commands

  • Documentation Generator - Create comprehensive documentation for code, APIs, and projects. (by Anonymous)
  • Lyra - Lyra - a master-level AI prompt optimization specialist. (by @ananddtyagi)
  • Analyze Codebase - Generate comprehensive analysis and documentation of entire codebase (by @ananddtyagi)
  • Update Claude.md - Automatically update CLAUDE.md file based on recent code changes (by @ananddtyagi)
  • Ultrathink - Use /ultrathink <TASK_DESCRIPTION> to launch a Coordinator Agent that directs four specialist sub-agents—Architect, Research, Coder, and Tester—to analyze, design, implement, and validate your coding task. The process breaks the task into clear steps, gathers insights, and synthesizes a cohesive solution with actionable outputs. Relevant files can be referenced ad-hoc using @ filename syntax. (by Jeronim Morina)
  • Code Review - Perform a comprehensive code review of recent changes (by @ananddtyagi)
  • Refractor - Refactor code following best practices and design patterns (by @ananddtyagi)
  • Code Review Assistant - Get comprehensive code reviews with suggestions for improvements, best practices, and potential issues. (by Anonymous)
  • Bug Detective - Systematically debug issues with step-by-step troubleshooting approaches. (by Anonymous)
  • Audit - Perform security audit on codebase (by @ananddtyagi)

View all plugins →

🤖 Featured Agents

  • Accessibility Expert - Specialized agent for accessibility reviews and improvements
  • AI Engineer - Expert in AI/ML implementation and optimization
  • Frontend Developer - React, Vue, Angular expert for UI development
  • DevOps Automator - CI/CD and infrastructure automation specialist
  • Code Reviewer - Thorough code review and best practices enforcement

View all agents →

💡 Browse & Submit

Visit claudecodecommands.directory to:

  • 🔍 Browse all commands and agents with descriptions and examples
  • 📤 Submit your own commands and agents
  • ⭐ Favorite plugins
  • 🏷️ Filter by category and tags

🎯 How It Works

Each plugin in this marketplace is independently installable:

  • Commands: Add custom slash commands to your Claude Code workflow (e.g., /lyra, /audit, /ultrathink)
  • Agents: Add specialized AI agents with specific expertise (e.g., accessibility-expert, frontend-developer, devops-automator)

Install only what you need - no bloat, full granular control!

🔄 Auto-Sync

This marketplace is automatically synced from the live database whenever commands are published or updated.

📝 License

Individual commands may have their own licenses. See each command file for details.

🤝 Contributing

Submit commands at claudecodecommands.directory/submit Submit agents at claudecodecommands.directory/submit-agent


Built with ❤️ by the Claude Code community

Details

Marketplace
ananddtyagi/cc-marketplace
Source
plugins/codebase-documenter
Author
Anand Tyagi
Category
Agents
Keywords
subagent
Listed since
Apr 7, 2026

More from ananddtyagi/cc-marketplace

All 119

Similar to codebase-documenter

More Technical Documentation