# Codebase exploration loop

> Codebase exploration loop is an open-source agent skill for developer tools. Builds a mental model of an unfamiliar codebase through read-only subagent mapping rounds. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/ivy00johns/Skill-Madness/tree/main/skills/loops/codebase-exploration-loop
- **Repository:** https://github.com/ivy00johns/skill-madness
- **GitHub stars:** 12
- **License:** MIT
- **Skill name:** codebase-exploration-loop
- **Collection:** https://github.com/ivy00johns/Skill-Madness
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

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".

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/ivy00johns/Skill-Madness/tree/HEAD/skills/loops/codebase-exploration-loop)
- [Asks for: Read, Write, Grep, Glob, Bash, Agent, Workflow](https://github.com/ivy00johns/Skill-Madness/blob/HEAD/skills/loops/codebase-exploration-loop/SKILL.md)
- [License: MIT](https://github.com/ivy00johns/Skill-Madness/tree/HEAD/skills/loops/codebase-exploration-loop)

## Features

- **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

## Install

### Claude Code

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

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

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

```sh
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.

### Codex

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

```sh
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.

### Cursor

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

```sh
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.

### Gemini CLI

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

```sh
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.

### VS Code

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

```sh
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.

### Other agents

Get the folder:

```sh
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.

## 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.

## Alternatives

- [How](https://ai-powered.com/skills/how): How is an open-source agent skill for developer tools.
- [Codebase onboarding](https://ai-powered.com/skills/codebase-onboarding): Codebase onboarding is an open-source agent skill for developer tools.
- [Deep research](https://ai-powered.com/skills/deep-research-tonyghiani): Deep research is an open-source agent skill for developer tools.
- [Explore code](https://ai-powered.com/skills/explore-code): Explore code is an open-source agent skill for developer tools.
- [Improve codebase architecture](https://ai-powered.com/skills/improve-codebase-architecture): Improve codebase architecture is an open-source agent skill for developer tools.
- [Codebase index](https://ai-powered.com/skills/codebase-index): Codebase index is an open-source agent skill for developer tools.
- [Deepening review](https://ai-powered.com/skills/deepening-review): Deepening review is an open-source agent skill for developer tools.
- [Ask](https://ai-powered.com/skills/ask-tjmonsi): Ask is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/codebase-exploration-loop
