Skip to content
Skill

Codebase exploration loop

Builds a mental model of an unfamiliar codebase through read-only subagent mapping rounds

Codebase exploration loop is an open-source agent skill for developer tools. It is available on Claude Code.

Scripts
None
Platforms
Claude Code
GitHub stars
12
Last commit
License
MIT
Listing updated

Similar skills

About Codebase exploration loop

This skill runs an iterative loop over a local repository to answer a list of seed questions. Each round, read-only subagents map individual subsystems in parallel, using only read and search tools, and report findings with file and line citations. The main agent then merges those findings into a running architecture summary, marks questions as answered only when a code citation backs them, and adds new gaps it uncovers.

Progress is tracked in two files the loop keeps: a seed-questions JSON list where every question starts unanswered, and a growing architecture summary document. The loop stops once every question has a citation, when a round yields no new answers or gaps, or when a round or budget cap is reached. Questions that survive two rounds without a new citation are flagged for a human to resolve.

The skill is meant for onboarding to a repo or reviewing code before changing it. It is invoked by the user and requires Claude Code. It leans on a companion loop-control skill for guardrails and points to other skills in the same collection for full reference documentation or profile generation.

When your agent uses it

Build a mental model of an unfamiliar codebase by looping: read-only subagents map subsystems, you synthesize and find gaps, and repeat until a written architecture summary answers every seed question with code citations. Use when onboarding to a repo or before touching code you don't understand. Trigger on "help me understand this codebase", "onboard me to this repo", "map this codebase".

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 2 files (15 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the skill-madness plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add ivy00johns/Skill-Madness
/plugin install skill-madness@skill-madness

Or copy only this skill to ~/.claude/skills/codebase-exploration-loop:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/codebase-exploration-loop &&
cp -R "$tmp/skills/loops/codebase-exploration-loop" ~/.claude/skills/codebase-exploration-loop &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/codebase-exploration-loop inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/codebase-exploration-loop to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/codebase-exploration-loop &&
cp -R "$tmp/skills/loops/codebase-exploration-loop" ~/.agents/skills/codebase-exploration-loop &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/codebase-exploration-loop inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/codebase-exploration-loop to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/codebase-exploration-loop &&
cp -R "$tmp/skills/loops/codebase-exploration-loop" ~/.cursor/skills/codebase-exploration-loop &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/codebase-exploration-loop inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/ivy00johns/Skill-Madness.git --path skills/loops/codebase-exploration-loop

Or copy the folder to ~/.gemini/skills/codebase-exploration-loop yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/codebase-exploration-loop:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/codebase-exploration-loop &&
cp -R "$tmp/skills/loops/codebase-exploration-loop" ~/.copilot/skills/codebase-exploration-loop &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/codebase-exploration-loop inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git

Then copy Skill-Madness/skills/loops/codebase-exploration-loop into your agent's skills folder as codebase-exploration-loop. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Seed question tracking
Keeps a list of your questions, each unanswered until a code citation supports the answer.
Parallel read-only mapping
Fans out subagents across subsystems that can read and search but not edit files.
Architecture summary synthesis
Merges subagent findings into a running document with file and line references.
Gap discovery between rounds
Identifies new open questions after each round and adds them to the list.
Iteration and budget limits
Stops on round caps, no-progress detection, or a token budget ceiling.

Good for

  • Get oriented in a new repository before making a first change
  • Ask how a request flows through an unfamiliar codebase
  • Map the authentication or data model of an inherited project
  • Understand build configuration before touching a module

Codebase exploration loop FAQ

What does Codebase exploration loop need to run?

It requires Claude Code, and its allowed tools are Read, Write, Grep, Glob, Bash, Agent and Workflow.

Does Codebase exploration loop modify my code?

No. Mapper subagents are restricted to read-only tools with no write, edit or web access. The loop only studies code.

When does Codebase exploration loop trigger?

It is user-invoked only, through the slash command or phrases like help me understand this codebase or onboard me to this repo.

How does Codebase exploration loop know a question is answered?

A question is marked answered only when the summary cites a specific file path and line or symbol backing the answer.

How do I install Codebase exploration loop in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/codebase-exploration-loop to use it in all your projects, or to .claude/skills/codebase-exploration-loop in one project. Or install the skill-madness plugin, which includes it: /plugin marketplace add ivy00johns/Skill-Madness, then /plugin install skill-madness@skill-madness.

Does Codebase exploration loop run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Codebase exploration loop?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

What are the best alternatives to Codebase exploration loop?

The closest alternatives to Codebase exploration loop are How, Codebase onboarding, Deep research, Explore code and Improve codebase architecture.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from ivy00johns/Skill-Madness

  1. Finds merged and stale git branches, then deletes them only after your confirmation

    • Open source
    • 12 GitHub stars
    • Developer tools
  2. Finds and removes git worktrees whose changes are already merged into main

    • Open source
    • 12 GitHub stars
    • Developer tools
  3. Bulk-scans a skill ecosystem for consistency, quality gaps and ownership conflicts

    • Open source
    • 12 GitHub stars
    • Developer tools
  4. Runs a single-skill quality review covering structure, triggering and output checks

    • Open source
    • 12 GitHub stars
    • Developer tools
  5. Turns skill review or audit reports into a prioritized list of concrete SKILL.md fixes

    • Open source
    • 12 GitHub stars
    • Developer tools
  6. Applies planned edits to SKILL.md files, validates them, and offers to sync

    • Open source
    • 12 GitHub stars
    • Developer tools