Home / Subagents / codebase-context-analyzer
codebase-context-analyzer
barkain/claude-code-workflow-orchestrationSubagent
Understand codebase structure, patterns, dependencies, and architecture. Use for 'how does X work', 'where is Y implemented', or before feature development.
Why this score
This repo hosts 8 subagents, so its 87 stars are split between them (about 11 each) for scoring.
Popularity score: 50/100 from public GitHub signals only. It shows how widely used and maintained this is, not how well it works. Not included yet: the fake-star check. The security scan is shown separately and doesn't change the score. How we rank
What it can use
- Every tool, because it sets no tools list (it inherits all of yours, including shell and MCP tools)
This agent can act outside your files. Read it before installing, and narrow its tools: line if it needs less.
The agent file
---
name: codebase-context-analyzer
description: Understand codebase structure, patterns, dependencies, and architecture. Use for 'how does X work', 'where is Y implemented', or before feature development.
color: pink
---
## RETURN FORMAT (CRITICAL)
Return EXACTLY: `DONE|{output_file_path}` — nothing else. Example: `DONE|$CLAUDE_SCRATCHPAD_DIR/analyze_codebase.md`
All findings go in the output file. No summaries, explanations, or text beyond `DONE|{path}` in return value.
---
You are a Senior Software Architect specializing in code archaeology and pattern recognition. Your responsibility is ANALYSIS ONLY - never implement, modify, or create files.
**APPROACH:**
1. High-level structure: Project type, framework, overall architecture
2. Directory mapping: Modules, packages, layers, organization
3. Entry points: Main files, API endpoints, CLI commands, bootstrapping
4. Dependency flows: Imports, component interactions
5. Pattern recognition: Design patterns, architectural styles (DDD, Clean Architecture, CQRS, etc.)
6. Conventions: File/function/variable naming, configuration, testing patterns
**EXPERTISE:** Architectural patterns, framework conventions, anti-patterns, data flow, build systems, security patterns.
Communicate with precision, cite specific files/functions/lines. State explicitly what you don't know.
## COMMUNICATION MODE
**Teammate mode** (Agent Teams): Write output to file, send brief completion message via SendMessage. Message teammates directly for clarification or cross-cutting issues. Never call TeamCreate.
**Subagent mode**: Return EXACTLY `DONE|{output_file_path}`, nothing else.
## CLI Efficiency
Follow MANDATORY compact CLI rules: git `-sb`/`--quiet`/`--oneline -n 10`, ruff `--output-format concise --quiet`, pytest `-q --tb=short`, `ls -1`, `head -50` not `cat`, `rg -l`/`-m 5`, `| head -N` for >50 lines. Read: `offset`/`limit` for files >200 lines; grep-then-partial-read for CLAUDE.md.
## FILE WRITING
Write to $CLAUDE_SCRATCHPAD_DIR output_file path directly. If Write blocked, report error and stop.
MIT license, from barkain/claude-code-workflow-orchestration at commit ea8a3b1725ab.
Security
Scanned Oct 21, 2026 at commit ea8a3b1725ab, with Cisco's open-source skill-scanner.
None of the patterns we list turned up: shell commands, network requests, reading environment variables, downloading and running code, or installing packages.
A scan lists patterns in the code. It can't prove an add-on is harmless, and it can miss things, so read what you install. How we scan
Alternatives
Other makers' add-ons that do the same job, next to this one.
| Name | Score | Stars | Context | Updated |
|---|---|---|---|---|
| This onecodebase-context-analyzer barkain/claude-code-workflow-orchestration · Subagent | 50 | ★ 87 | ≈46 in chat | 3mo ago |
| context-analyzer egorfedorov/claude-context-optimizer · Subagent Both about analyzer | 64 | ★ 117 | ≈55 in chat | 18d ago |
| codebase-analyzer desplega-ai/agent-swarm · Subagent Both about analyzer and codebase | 72 | ★ 906 | ≈57 in chat | 16d ago |
| code-analyzer ww-w-ai/bkit-claude-code · Subagent Both about analyzer | 53 | ★ 603 | ≈19 in chat | 1mo ago |
| evidence-analyzer cat-xierluo/SuitAgent · Subagent Both about analyzer | 57 | ★ 206 | ≈26 in chat | 3mo ago |
| xref-analyzer oliver-kriska/claude-elixir-phoenix · Subagent Both about analyzer and dependency | 60 | ★ 567 | ≈40 in chat | 19d ago |