Skip to content
Development
Skill

/codebase-explore

Explore the codebase to map conventions, reusable utilities, analogous features, and data flows relevant to a planned change. Returns raw findings (file paths, patterns, code snippets), does NOT produce a plan. Used by /flagrare:atdd-plan as its codebase understanding step.

From plugin
agent-skills
1240 skills

Claude Code

$ npx -y skills add Flagrare/agent-skills --skill codebase-explore --agent claude-code

SKILL.md

codebase-explore.SKILL.md
name: codebase-explore
description: "Explore the codebase to map conventions, reusable utilities, analogous features, and data flows relevant to a planned change. Returns raw findings (file paths, patterns, code snippets), does NOT produce a plan. Used by /flagrare:atdd-plan as its codebase understanding step."

Codebase Explore

Return raw exploration findings for a planned change. No plan, no tests, no implementation steps. Just facts about the codebase that a planning skill needs to make informed decisions.

---

When to Use

  • Called by `/flagrare:atdd-plan` before it writes acceptance tests
  • Called directly when you need to understand a codebase area before making decisions
  • User says "explore the codebase for X", "what exists for X", "find patterns for X"

---

Inputs

Receive one of:

  • A context brief (from `/flagrare:intake`)
  • A ticket summary describing what will be built
  • A plain-text description of the change

---

Step 1: Check for prior attempts

Search for branches, PRs, and commits related to this work:

git branch -a | grep -i "<ticket-key-or-keyword>"
git log --all --oneline | grep -i "<ticket-key-or-keyword>"
gh pr list --search "<ticket-key-or-keyword>" --state all

If found, read them. They reveal: abandoned approaches, partial implementations, reviewer feedback, constraints discovered during prior attempts.

---

Step 2: Identify the feature area

From the context brief or description, determine which directories and files the change will touch. Start broad, narrow fast:

1. Search for the main entry point (component, route, controller, endpoint) 2. Trace one level out: what calls it, what it calls 3. Map the data flow: where does data come from, how is it transformed, where does it go

---

Step 3: Find analogous features

The strongest predictor of how new code should look is how the codebase already solved a similar problem.

Search for:

  • Features with similar UI patterns (if frontend)
  • Endpoints with similar request/response shapes (if backend)
  • Services with similar responsibilities
  • Components with similar conditional logic

Read 1-2 complete analogous files. These become the template.

---

Step 4: Map conventions

For the feature area, identify:

| Convention | How to find it | |---|---| | File organization | `ls` the directories where changes will live | | Naming patterns | Read 2-3 files in the same directory | | Testing style | Read the closest existing test file | | State management | How do sibling features manage state? | | Error handling | How do sibling features handle failures? | | i18n / messaging | What pattern do message definitions follow? | | Imports / dependencies | What shared utilities are imported? |

---

Step 5: Inventory reusable pieces

Find utilities, helpers, shared components, and abstractions that the implementation should use instead of creating from scratch:

  • Shared component libraries
  • Path/route generators
  • API client wrappers
  • Validation utilities
  • State selectors
  • Test helpers and factories

For each, note the import path and a one-line description of what it does.

---

Step 6: Check constraints

  • **Linting / formatting:** Read `.eslintrc`, `prettier.config`, or equivalent
  • **Type system:** What type definitions exist for this area?
  • **Build / bundling:** Any special considerations (lazy loading, code splitting)?
  • **Feature flags / gating:** How are features gated in this codebase?
  • **CLAUDE.md / DEVELOPMENT_GUIDELINES.md:** Read project-level guidance if it exists

---

Output Format

Return findings in this structure (no headers beyond these, no plan, no steps):

## Prior Attempts
[branches, PRs, commits found, or "none found"]

## Feature Area Map
[entry point → data flow → dependencies, with file paths]

## Analogous Features
[1-2 similar features with file paths and what makes them analogous]

## Conventions
[table of conventions observed in this area]

## Reusable Utilities
[list: import path + one-line description]

## Constraints
[lint rules, type system requirements, gating, project guidelines]

---

Anti-patterns

  • Don't write a plan. Return findings only.
  • Don't write tests or implementation steps. That's atdd-plan's job.
  • Don't summarize or interpret beyond what you directly observed in the code.
  • Don't read entire codebases. Focus on the feature area and one level out.
  • Don't guess file paths. Verify they exist before reporting them.
  • Don't skip Step 1 (prior attempts). Abandoned PRs contain critical context.

---

Flow position

/flagrare:intake              ← context brief produced
     ↓
/flagrare:atdd-plan
     ├── /flagrare:codebase-explore   ← THIS SKILL (returns raw findings)
     ├── writes acceptance tests
     ├── names design patterns
     ├── SOLID audit
     └── gap review
Read more
@flagrare
Ships withagent-skills

Thirty-eight skills that wrap around your development cycle in Claude Code. They turn tickets into ATDD plans, smoke-test features against a running app or service, hunt down bugs with runtime evidence, guard commits against doc drift, run seven-axis code

Stars on GitHub

Momentum

stars in total
12
Star history of Flagrare/agent-skills on GitHub, a chart by star-history.com

Other skills on agent-skills.

atdd-plan

atdd-plan

Produce an ATDD-first implementation plan in Claude Code's native plan mode, with named design patterns called out where they…

brag-doc

brag-doc

Generate a comprehensive, impact-framed brag-doc entry for a chosen time window (day, week, biweek, month, or custom). Pulls…

bug-bash

bug-bash

Programmatic bug bashing, ingest a prescribed test plan (Notion, markdown, pasted spec), drive a real running system (browser via…

career

career

Run the career skills that are due, in one pass, and return one short combined digest plus an updated board. It reads timestamps…

daily-code-review

daily-code-review

Generate a daily code review report showing stale PRs, items needing your attention, and active work for your team. Use whenever…

debug-hunt

debug-hunt

Evidence-first debugging for bugs that are hard to reproduce, intermittent, performance-related, or where previous…

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.

skills10d309k
@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,…

ecc12d293k
@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…

react1d252k
@facebook@facebookInstall Skill

Questions about codebase-explore.

Which coding agents can use codebase-explore?
codebase-explore 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.