Agent skill

Codebase Summary

by mikeyobrien in mikeyobrien/rho

Analyze a repository and generate comprehensive architecture and workflow documentation.

MITAuto-check passedBusiness, Finance & HR

Install Codebase Summary

skills CLI
$ npx skills add mikeyobrien/rho --skill codebase-summary -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mikeyobrien/rho codebase-summary --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mikeyobrien/rho.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/codebase-summary .claude/skills/codebase-summary && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
codebase-summary
GitHub stars
372
Token cost
~3.7k tokens
SKILL.md length
1,449 words
Files
1
Skills in repo
35
Repo updated
First seen
Licence
MIT

At a glance

Analyze a repository and generate comprehensive architecture and workflow documentation.

  • Works in 6 steps: Setup and Directory Structure → Analyze Codebase Structure → Generate Documentation Files → …
  • Tasks that involve Operations and SOPs
  • SKILL.md covers Overview, Parameters, Steps and Examples, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Codebase Summary is an agent skill from mikeyobrien/rho. Analyze a repository and generate comprehensive architecture and workflow documentation.

Its SKILL.md is about 3.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Business, Finance & HR, covering Operations and SOPs. The repository describes itself as: An AI agent that stays running, remembers across sessions, and checks in on its own. macOS, Linux, Android. Built on Pi. The licence is MIT.

When your agent uses it

  • Tasks that involve Operations and SOPs

Example prompts

  • “/codebase-summary”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Setup and Directory Structure
  2. Analyze Codebase Structure
  3. Generate Documentation Files
  4. Review Documentation
  5. Consolidate Documentation
  6. Summary and Next Steps

What it can do on your machine

Read from SKILL.md and the folder at commit 073a3ee. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are mermaid).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Codebase Summary loads about 3.7k tokens when it runs. Until then it costs about 26 tokens; SKILL.md has 1,449 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~26
When it runs · the whole SKILL.md, loaded when a task matches
~3.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from mikeyobrien/rho at commit 073a3ee, republished under its MIT licence (© mikeyobrien). 1,449 words, ~3,706 tokens.

Download SKILL.mdSave it as .claude/skills/codebase-summary/SKILL.md (or your agent's skills folder).
name
codebase-summary
description
Analyze a repository and generate comprehensive architecture and workflow documentation.
kind
sop

Codebase Summary

Overview

This sop analyzes a codebase and generates comprehensive documentation including structured metadata files that describe the system architecture, components, interfaces, and workflows. It can create targeted documentation files like AGENTS.md (README for AI agents), README.md, CONTRIBUTING.md, or generate a complete documentation ecosystem. The documentation is organized to make it easy for AI assistants to understand the system and help with development tasks.

Parameters

  • output_dir (optional, default: ".agents/summary"): Directory where documentation will be stored
  • consolidate (optional, default: true): Whether to create consolidated documentation files
  • consolidate_targets (optional, default: "AGENTS.md"): Target files for consolidation, comma-separated (e.g., "AGENTS.md, README.md, CONTRIBUTING.md"). Only used if consolidate is true
  • consolidate_prompt (optional): Description of how to structure the consolidated content for the target file type (e.g., Reference the AGENTS.md example below for the default "consolidate_prompt"). Only used if consolidate is true
  • check_consistency (optional, default: true): Whether to check for inconsistencies across documents
  • check_completeness (optional, default: true): Whether to identify areas lacking sufficient detail
  • update_mode (optional, default: false): Whether to update existing documentation based on recent changes
  • codebase_path (optional, default: current directory): Path to the codebase to analyze

Constraints for parameter acquisition:

  • You MUST ask for all parameters upfront in a single prompt rather than one at a time
  • You MUST support multiple input methods including:
    • Direct input: Text provided directly in the conversation
    • File path: Path to a local file containing codebase information
    • Directory path: Path to the codebase to analyze
    • Other methods: You SHOULD be open to other ways the user might want to specify the codebase
  • You MUST use appropriate tools to access content based on the input method
  • You MUST confirm successful acquisition of all parameters before proceeding
  • You MUST validate that the codebase_path exists and is accessible
  • If consolidate is false, you MUST inform the user that consolidate_targets and consolidate_prompt will be ignored

Steps

1. Setup and Directory Structure

Initialize the analysis environment and create necessary directory structure.

Constraints:

  • You MUST validate that the codebase_path exists and is accessible
  • You MUST create the output_dir if it doesn't exist
  • You MUST inform the user about the directory structure being created
  • If update_mode is true, you MUST:
    • Check if {output_dir}/.last_commit exists to determine the baseline commit
    • Use git commands to review commits since the baseline and identify changes
  • If update_mode is false or no previous documentation exists, you MUST inform the user that full analysis will be performed
  • You MUST create subdirectories for organizing different types of documentation artifacts
2. Analyze Codebase Structure

Perform comprehensive analysis of the codebase to understand its structure, components, and relationships.

Constraints:

  • You MUST use appropriate tools to gather information about the codebase structure
  • You MUST identify all packages, modules, and major components in the codebase
  • You MUST analyze file organization, directory structure, and architectural patterns
  • You MUST identify supported and unsupported programming languages
  • You MUST document the technology stack and dependencies
  • You MUST create a hierarchical map of the codebase structure using Mermaid diagrams
  • You MUST identify key interfaces, APIs, and integration points
  • You MUST analyze code patterns and design principles used throughout the codebase
  • You MUST use Mermaid diagrams for all visual representations instead of ASCII art
  • You MUST document basic codebase information in {output_dir}/codebase_info.md
  • If update_mode is true, you MUST:
    • Analyze which packages and files were modified in recent commits
    • Prioritize analysis of modified components
    • Create a change summary document listing all relevant changes since last update
3. Generate Documentation Files

Create comprehensive documentation files for different aspects of the system.

Constraints:

  • You MUST create a comprehensive knowledge base index file ({output_dir}/index.md) that:
    • Provides explicit instructions for AI assistants on how to use the documentation
    • Contains rich metadata about each file's purpose and content
    • Includes a table of contents with descriptive summaries for each document
    • Explains relationships between different documentation files
    • Guides AI assistants on which files to consult for specific types of questions
    • Contains brief summaries of each file's content to help determine relevance
    • Is designed to be the primary file needed in context for AI assistants to effectively answer questions
  • You MUST create documentation files for different aspects of the system:
    • {output_dir}/architecture.md (system architecture and design patterns)
    • {output_dir}/components.md (major components and their responsibilities)
    • {output_dir}/interfaces.md (APIs, interfaces, and integration points)
    • {output_dir}/data_models.md (data structures and models)
    • {output_dir}/workflows.md (key processes and workflows)
    • {output_dir}/dependencies.md (external dependencies and their usage)
  • You MUST ensure each documentation file contains relevant information from the codebase analysis
  • You MUST use Mermaid diagrams for all visual representations throughout the documentation
  • You MUST NOT use ASCII art for any visual elements
  • If update_mode is true, you MUST:
    • Preserve existing documentation structure where possible
    • Only update sections related to modified components
4. Review Documentation

Review the documentation for consistency and completeness.

Constraints:

  • If check_consistency is true, you MUST check for inconsistencies across documents
  • If check_completeness is true, you MUST identify areas lacking sufficient detail
  • You MUST document any inconsistencies or gaps found in {output_dir}/review_notes.md
  • You MUST specifically identify gaps resulting from language support limitations
  • You SHOULD use insights from the codebase analysis to identify areas needing more detail
  • You MUST provide recommendations for improving documentation quality
Show full SKILL.md (608 more words)Show less
5. Consolidate Documentation

Create consolidated documentation files if requested.

Constraints:

  • If consolidate is true, you MUST create consolidated documentation files for each target in consolidate_targets
  • For each consolidate_target file that already exists, You MUST merge the new content with existing content rather than overwriting because this preserves valuable manually-curated content
  • You MUST place consolidated files in the codebase root directory (outside of the output_dir)
  • If consolidate_prompt is provided, you MUST use it to guide the structure and content of the consolidated files
  • You MUST tailor the consolidated content to each target file type:
    • AGENTS.md: Focus on AI assistant context, project and directory structure, development patterns, and assistant-specific instructions
    • README.md: Focus on project overview, installation, usage, and getting started information
    • CONTRIBUTING.md: Focus on development setup, coding standards, contribution workflow, and guidelines
    • Other files: Adapt content based on filename and consolidate_prompt
  • You MUST organize the consolidated content in a coherent structure appropriate for the target audience
  • You MUST include a comprehensive table of contents with descriptive summaries
  • You MUST add metadata tags to each section to facilitate targeted information retrieval
  • You MUST include cross-references between related sections
  • You MUST include information from all relevant documentation files
  • If consolidate is false, you MUST skip this step and inform the user that no consolidated files will be created
6. Summary and Next Steps

Provide a summary of the documentation process and suggest next steps.

Constraints:

  • You MUST save the current git HEAD commit hash to {output_dir}/.last_commit to enable future update_mode runs
  • You MUST summarize what has been accomplished
  • You MUST suggest next steps for using the documentation
  • You MUST provide guidance on maintaining and updating the documentation
  • You MUST include specific instructions for adding the documentation to AI assistant context:
    • Recommend using the index.md file as the primary context file
    • Explain how AI assistants can leverage the index.md file as a knowledge base to find relevant information
    • Emphasize that the index.md contains sufficient metadata for assistants to understand which files contain detailed information
    • Provide example queries that demonstrate how to effectively use the documentation
  • If consolidate is true, you MUST provide guidance on using the consolidated files
  • If update_mode was used, you MUST:
    • Summarize what changes were detected and updated in the documentation
    • Highlight any significant architectural changes
    • Recommend areas that might need further manual review

Examples

Example Input (Default AGENTS.md)
output_dir: ".agents/summary"
consolidate: true
consolidate_targets: "AGENTS.md"
consolidate_prompt: "Create a comprehensive AGENTS.md file optimized for AI coding assistants. You MUST focus on information that is not already present in other documentation sources like README.md or CONTRIBUTING.md. Useful information for this file includes: File purpose, directory structure, Coding style patterns, file organization patterns, instructions on how to write and run tests, documentation guidelines, and package specific guidance."
codebase_path: "/path/to/project"
Example Output (Generate Mode)
Setting up directory structure...
✅ Created directory .agents/summary/
✅ Created subdirectories for documentation artifacts

Analyzing codebase structure...
✅ Found 15 packages across 3 programming languages
✅ Identified 45 major components and 12 key interfaces
✅ Codebase information saved to .agents/summary/codebase_info.md

Generating documentation files...
✅ Created index.md with knowledge base metadata
✅ Generated architecture.md, components.md, interfaces.md
✅ Generated data_models.md, workflows.md, dependencies.md

Reviewing documentation...
✅ Consistency check complete
✅ Completeness check complete
✅ Review notes saved to .agents/summary/review_notes.md

Consolidating documentation...
✅ Created AGENTS.md optimized for AI coding assistants
✅ Included comprehensive project context and development guidance

Summary and Next Steps:
✅ Documentation generation complete!
✅ To use with AI assistants, add .agents/summary/index.md to context
✅ AGENTS.md provides comprehensive guidance for AI coding assistance
Example Input (README.md)
consolidate_targets: "README.md"
consolidate_prompt: "Create a user-friendly README that explains the project purpose, installation, and usage"
Example Input (No Consolidation)
consolidate: false
check_consistency: true
check_completeness: true
Example Output (Update Mode)
Update mode detected - checking for changes...
✅ Found existing documentation
✅ Identified 8 commits since last update affecting 3 packages

Analyzing recent changes...
✅ Updated components: AuthService, DataProcessor, APIGateway
✅ Change summary saved to .agents/summary/recent_changes.md

Updating documentation...
✅ Updated architecture.md with new AuthService patterns
✅ Updated components.md with DataProcessor changes
✅ Updated interfaces.md with new API endpoints

Consolidating updated documentation...
✅ Updated AGENTS.md with recent changes
✅ Added "Recent Changes" section highlighting updates

Summary:
✅ Documentation updated based on 8 recent commits
✅ 3 major components updated in documentation
✅ Review .agents/summary/recent_changes.md for detailed change summary
Example Output Structure
AGENTS.md (consolidated file in root directory)
.agents/summary/
├── .last_commit (git commit hash for update_mode baseline)
├── index.md (knowledge base index)
├── codebase_info.md
├── architecture.md
├── components.md
├── interfaces.md
├── data_models.md
├── workflows.md
├── dependencies.md
├── review_notes.md
└── recent_changes.md (if update_mode)
Example Mermaid Diagram Types

The documentation will include various Mermaid diagram types:

Architecture Overview:

mermaid
graph TB
    A[Frontend] --> B[API Gateway]
    B --> C[Auth Service]
    B --> D[Business Logic]
    D --> E[Database]

Component Relationships:

mermaid
classDiagram
    class UserService {
        +authenticate()
        +authorize()
    }
    class DataService {
        +getData()
        +saveData()
    }
    UserService --> DataService

API Workflows:

mermaid
sequenceDiagram
    Client->>API: Request
    API->>Auth: Validate
    Auth-->>API: Token Valid
    API->>Service: Process
    Service-->>API: Response
    API-->>Client: Result

Troubleshooting

Large Codebase Performance

For very large codebases that take significant time to analyze:

  • You SHOULD provide progress updates during analysis
  • You SHOULD suggest focusing on specific directories or components if performance becomes an issue
  • Consider running with consolidate=false to generate individual files faster
Update Mode Issues

If update mode fails to detect changes correctly:

  • Check if git history is available and accessible
  • Try running with update_mode=false to generate fresh documentation
Consolidation Issues

If consolidation fails or produces poor results:

  • Check that consolidate_prompt provides clear guidance for the target file type
  • Verify that all source documentation files were generated successfully
  • Consider using a more specific consolidate_prompt for better results
Missing Documentation Sections

If certain aspects of the codebase are not well documented:

  • Check the review_notes.md file for identified gaps
  • Consider running with check_completeness=true to identify missing areas
  • Review the codebase analysis to ensure all components were properly identified
Git Integration Problems

If git commands fail during update mode:

  • Ensure the codebase_path is within a valid git repository
  • Check that git is installed and accessible
  • Verify that the user has appropriate permissions to read git history

© mikeyobrien, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/codebase-summary of mikeyobrien/rho.

Open the folder on GitHubat commit 073a3ee

Compare with similar skills

Codebase Summary next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Codebase Summary compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Codebase Summary this skillmikeyobrien/rho372—~3.7kAutomated safety check: PassMIT
Cc Sdd New Agentgotalab/cc-sdd3.7k—~1.1kAutomated safety check: PassMIT
DBS Business Toolkit Entrydontbesilent2025/dbskill11k—~2kAutomated safety check: PassCustom licence
Agent Sop Authorstrands-agents/agent-sop1.2k—~3.5kAutomated safety check: PassApache-2.0
Diffusion Narrative Denouncingcanwhite/Krebs1k—~831Automated safety check: PassMIT
Polanyi Perspective0xenzyme/polanyi-skill137—~1.3kAutomated safety check: PassMIT

Similar skills

  • Cc Sdd New Agent

    gotalab/cc-sdd

    Add or extend coding-agent support in cc-sdd by executing the SOP in docs/cc-sdd/sop-new-agent.md end-to-end.

    3.7k GitHub stars~1.1k tokensUpdated 15 days ago
    Business, Finance & HRAuto-check passed
  • DBS Business Toolkit Entry

    dontbesilent2025/dbskill

    Chinese-language entry skill for the dontbesilent business toolkit: onboards new users, orchestrates tasks across sub-skills, runs numbered prompts and lists hidden ones.

    11k GitHub stars~2k tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Agent Sop Author

    strands-agents/agent-sop

    Create (or update) and validate Agent SOPs (Standard Operating Procedures) - markdown-based workflows that guide AI agents through complex, multi-step tasks with RFC 2119 constraints.

    1.2k GitHub stars~3.5k tokensUpdated today
    Business, Finance & HRAuto-check passed
  • 基于"扩散模型叙事去噪流"的小说写作 SOP。将 AI 视为去杂质机器,通过锁定全局信号、预测叙事噪声、精准去噪、随机修正四个步骤,解决 AI 翻译腔、逻辑断层和故事平淡的问题。

    1k GitHub stars~831 tokensUpdated 1 mo ago
    Business, Finance & HRAuto-check passed
  • Polanyi Perspective

    0xenzyme/polanyi-skill

    Michael Polanyi 的思维框架。用 Polanyi 视角分析隐性知识、技能习得、经验传承、师徒制、 知识管理、学习方法、AI/工具替代边界、科学共同体与后批判哲学问题。

    137 GitHub stars~1.3k tokensUpdated 3 mo ago
    Business, Finance & HRAuto-check passed

More from mikeyobrien/rho

All 35 skills in this repo
  • Rho Cloud Onboard

    mikeyobrien/rho

    Register an agent email address on Rhobot Mail (name@rhobot.dev).

    372 GitHub stars~1.4k tokensUpdated 7 days ago
    Auto-check passed
  • Install Rho

    mikeyobrien/rho

    Install and configure Rho from scratch (Doom-style init.toml + sync).

    372 GitHub stars~1.6k tokensUpdated 7 days ago
    Auto-check: notes
  • Open URL

    mikeyobrien/rho

    Open URLs and launch apps on Android. An agent skill from mikeyobrien/rho.

    372 GitHub stars~480 tokensUpdated 7 days ago
    Auto-check passed
  • Release Changelog

    mikeyobrien/rho

    Keep CHANGELOG.md idiomatic (Keep a Changelog) and cut a tag-based GitHub release that triggers npm publish CI.

    372 GitHub stars~1.4k tokensUpdated 7 days ago
    Auto-check passed
  • Rho Cloud Email

    mikeyobrien/rho

    Manage agent email at name@rhobot.dev via the Rhobot Mail API.

    372 GitHub stars~2.6k tokensUpdated 7 days ago
    Auto-check passed
  • Tasker XML

    mikeyobrien/rho

    Create Tasker profiles and tasks via XML for Android automation.

    372 GitHub stars~3.1k tokensUpdated 7 days ago
    Auto-check passed

Questions about Codebase Summary

What does Codebase Summary do?

Analyze a repository and generate comprehensive architecture and workflow documentation. Codebase Summary is an agent skill from mikeyobrien/rho. Analyze a repository and generate comprehensive architecture and workflow documentation.

When should I use Codebase Summary?

Codebase Summary fits situations like: tasks that involve Operations and SOPs.

How do I install Codebase Summary in Claude Code?

Run `npx skills add mikeyobrien/rho --skill codebase-summary -a claude-code`. Or copy the skill folder (skills/codebase-summary in mikeyobrien/rho) into .claude/skills/codebase-summary in your project. Claude Code loads it when a task matches its description.

How do I install Codebase Summary in Codex?

Run `npx skills add mikeyobrien/rho --skill codebase-summary -a codex`. Or copy the skill folder (skills/codebase-summary in mikeyobrien/rho) into .agents/skills/codebase-summary in your project. Codex loads it when a task matches its description.

Can I use Codebase Summary in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mikeyobrien/rho --skill codebase-summary -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/codebase-summary, .gemini/skills/codebase-summary, .github/skills/codebase-summary and .opencode/skills/codebase-summary in your project.

What does Codebase Summary need to run?

SKILL.md names no scripts, command-line tools or credentials: Codebase Summary is instructions for the agent only.

Does Codebase Summary access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Codebase Summary safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Codebase Summary use?

Codebase Summary is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Codebase Summary use?

About 3.7k tokens (SKILL.md is roughly 15k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Codebase Summary?

Skills that share tags, products or a category with Codebase Summary: Cc Sdd New Agent (gotalab/cc-sdd, 3.7k stars), DBS Business Toolkit Entry (dontbesilent2025/dbskill, 11k stars), Agent Sop Author (strands-agents/agent-sop, 1.2k stars) and Diffusion Narrative Denouncing (canwhite/Krebs, 1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Codebase Summary?

mikeyobrien (a GitHub user) maintains it in mikeyobrien/rho, which has 372 GitHub stars. The repository holds 35 skills in this directory. The repository was last updated on October 1, 2026.

Source: mikeyobrien/rho on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.