Skip to content
Development
Skill

/codebase-analyzer

Analyzes codebase using adaptive parallel Explore subagents based on task complexity. Selects agent roles from a pool, launches Explore agents, then delegates report generation to codebase-analysis-reporter subagent.

From plugin
maister
27217 skills25 agents6 commands1 MCP

Claude Code

$ npx -y skills add SkillPanel/maister --skill codebase-analyzer --agent claude-code

SKILL.md

codebase-analyzer.SKILL.md
name: codebase-analyzer
description: Analyzes codebase using adaptive parallel Explore subagents based on task complexity. Selects agent roles from a pool, launches Explore agents, then delegates report generation to codebase-analysis-reporter subagent.
user-invocable: false

Codebase Analyzer Skill

Orchestrates parallel codebase analysis using built-in Explore subagents. Adaptively selects which agent roles to activate based on task complexity, then delegates report synthesis to a specialized subagent.

Core Principles

1. **Adaptive Agent Selection**: Select roles from a pool based on task complexity — no fixed count 2. **Task-Type Awareness**: Adapt prompts and focus based on task type 3. **Delegated Reporting**: Raw findings go to `codebase-analysis-reporter` subagent for synthesis

---

Input Parameters

| Parameter | Required | Description | |-----------|----------|-------------| | `task_description` | Yes | Description of the development task | | `description` | Yes | Task description from user | | `task_path` | Yes | Path to task directory | | `artifact_name` | No | Override output filename (default: `codebase-analysis.md`) |

---

Execution Workflow

Step 1: Parse Input and Determine Focus

Extract keywords, component names, file hints, domain, and technology hints from the description.

Determine primary focus from the task description:

| Signal in Description | Primary Focus | Key Questions | |----------------------|---------------|---------------| | Error/crash/broken language | Find buggy code path | Where does the issue occur? What's the execution flow? | | Improve/enhance/existing | Find existing feature | What files implement this feature? How does it work? | | Add/new/create | Find patterns/integration points | What similar patterns exist? Where should this integrate? |

Step 2: Select Agent Roles

Choose which roles to activate from the pool. Each role is a distinct analysis concern.

| Role | Purpose | When Needed | |------|---------|-------------| | **File Discovery** | Find relevant files by patterns, keywords, naming | Almost always | | **Code Analysis** | Analyze code structure, patterns, execution flow | When understanding existing behavior matters | | **Context Discovery** | Find tests, consumers, dependencies | When understanding impact/coverage matters | | **Pattern Mining** | Find similar implementations as templates | New features following existing patterns | | **Migration Target** | Analyze target technology/compatibility | Migrations comparing current vs target |

**Decision signals:**

  • **Specificity** (exact files mentioned → fewer agents)
  • **Scope breadth** (multiple domains → more agents)
  • **Uncertainty** (unclear location → more agents)
  • **Task type** (bugs tend focused, features broad, migrations broadest)

**Examples:**

| Task Description | Roles Selected | Count | |------------------|---------------|-------| | "Fix null check in `utils/parser.ts`" | File Discovery + Code Analysis (combined) | 1 | | "Add sorting to user table" | File Discovery, Code Analysis | 2 | | "Fix login timeout" | File Discovery + Code Analysis (combined), Context Discovery | 2 | | "Add OAuth authentication system" | File Discovery, Code Analysis, Context Discovery | 3 | | "Add export feature similar to import" | File Discovery, Code Analysis, Pattern Mining | 3 | | "Migrate from REST to GraphQL" | File Discovery, Code Analysis, Context Discovery, Migration Target | 4 |

When selecting fewer agents, merge related concerns into a single prompt — don't drop concerns.

State which roles you selected and why (1 sentence).

Step 3: Read Prompt Templates and Launch Agents

Read the template file for each selected role before launching — the templates hold the task-type-specific focus lists and the no-write constraint, which prompts written from memory drop.

**3a. Read templates** — Use the Read tool to load ONLY the files for your selected roles:

| Role | Read This File | |------|--------------| | File Discovery | `references/file-discovery.md` | | Code Analysis | `references/code-analysis.md` | | Context Discovery | `references/context-discovery.md` | | Pattern Mining | `references/pattern-mining.md` | | Migration Target | `references/migration-target.md` |

If combining roles into one agent, also read `references/combined.md` for merging guidance.

**3b. Adapt templates** — Replace `[description]` with the actual task description. Select the correct task-type section (Bug / Enhancement / Feature).

**3c. Launch agents** — Use the Task tool with `subagent_type="Explore"` — one call per selected role, all in ONE message.

**IMPORTANT**: Every Explore agent prompt MUST include this instruction: > IMPORTANT: Do NOT create, write, or modify any files. Output all findings as text in your response only.

Step 4: Delegate Report Generation

After all Explore agents complete, delegate to `codebase-analysis-reporter` subagent via Task tool:

Task tool:
  subagent_type: "maister-codebase-analysis-reporter"
  description: "Merge findings into analysis report"
  prompt: |
    You are the codebase-analysis-reporter. Merge these raw findings into a structured analysis report.

    Task description: [description]
    Agent roles used: [list of roles]
    Agent count: [N]
    Output path: [task_path]/analysis/[artifact_name]

    ## Raw Findings

    ### [Role 1 Name]
    [paste raw output from agent 1]

    ### [Role 2 Name]
    [paste raw output from agent 2]

    [... for each agent]

The subagent produces the final report at `{task_path}/analysis/{artifact_name}` and returns structured results.

Step 5: Return Results to Orchestrator

Pass through the subagent's structured output:

status: success|partial|failed
report_path: analysis/[artifact_name]
summary: "[1-2 sentence summary]"
files_found: [count]
complexity: simple|moderate|complex
risk_level: low|low-medium|medium|medium-high|high

---

Error Handling

  • **No files
Read more
@skillpanel
Ships withmaister

Structured, standards-aware development workflows for Claude Code Describe what you want to build, and the plugin handles the rest - from specification through implementation to verification - while enforcing your project's coding standards at every step.

27217 skills25 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
272
Star history of SkillPanel/maister on GitHub, a chart by star-history.com

Other skills on maister.

development

development

Unified orchestrator for all development tasks. ALWAYS execute when invoked — never skip for 'straightforward' tasks. Phases…

@skillpanel@skillpanelInstall Skill
docs-manager

docs-manager

Internal engine for managing project documentation and technical standards in .maister/docs/. Handles file operations, INDEX.md…

@skillpanel@skillpanelInstall Skill
implementation-verifier

implementation-verifie…

Verify completed implementations for quality assurance. Delegates all verification work to specialized subagents - completeness…

@skillpanel@skillpanelInstall Skill
init

init

Initialize Maister framework with intelligent project analysis and documentation generation

@skillpanel@skillpanelInstall Skill
migration

migration

Orchestrates the complete migration workflow from current state analysis through implementation to compatibility verification.…

@skillpanel@skillpanelInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills3w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc3w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react13d252k
@facebook@facebookInstall Skill

Questions about codebase-analyzer.

Which coding agents can use codebase-analyzer?
codebase-analyzer installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.