
Layered analysis loop
Guides an agent through layered passes that deepen an analysis one question at a time
Layered analysis loop is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 227
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Layered analysis loop
This skill tells the agent to analyze a target in distinct layers instead of one open-ended read. Before each layer it fixes a single question, then runs a structure pass, a behavior pass that follows primary paths in order, an edge-case pass covering error paths, boundary inputs and unenforced assumptions, and a contradiction pass that tries to break the model built so far.
Each layer closes with a written delta describing what changed in the model, and only evidence-backed findings carry forward. The agent stops when a full layer yields no change, or when an explicit budget limit is reached, and reports which layers ran and where convergence happened.
The skill is a method rather than a script: it runs no code and uses no external tools, and it works on whatever target the user names, such as a codebase, document or system.
When your agent uses it
Use when analyzing a target deeply enough to require distinct structural, behavioral, edge-case, and contradiction passes rather than one undirected read—fix a question for each layer, record its evidence-backed delta, and stop only at a no-delta layer or an explicit budget cutoff.
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 1 file (2 KB) on GitHub on 3 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
Copy the skill folder to ~/.claude/skills/layered-analysis-loop to use it in all your projects:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/layered-analysis-loop &&
cp -R "$tmp/.agents/skills/layered-analysis-loop" ~/.claude/skills/layered-analysis-loop &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/layered-analysis-loop inside it instead.
Copy the skill folder to ~/.agents/skills/layered-analysis-loop to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/layered-analysis-loop &&
cp -R "$tmp/.agents/skills/layered-analysis-loop" ~/.agents/skills/layered-analysis-loop &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/layered-analysis-loop inside it instead.
Copy the skill folder to ~/.cursor/skills/layered-analysis-loop to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/layered-analysis-loop &&
cp -R "$tmp/.agents/skills/layered-analysis-loop" ~/.cursor/skills/layered-analysis-loop &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/layered-analysis-loop inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/mtarcure/claude-vibe-squad.git --path .agents/skills/layered-analysis-loopOr copy the folder to ~/.gemini/skills/layered-analysis-loop yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/layered-analysis-loop:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/layered-analysis-loop &&
cp -R "$tmp/.agents/skills/layered-analysis-loop" ~/.copilot/skills/layered-analysis-loop &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/layered-analysis-loop inside it instead.
Get the folder:
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.gitThen copy claude-vibe-squad/.agents/skills/layered-analysis-loop into your agent's skills folder as layered-analysis-loop. Agents that support SKILL.md read one folder per skill.
What it does
- Question-per-layer structure
- Each analysis pass is bound to one written question that is set before the pass begins.
- Structural and behavioral passes
- The first two layers map how a target is organized and trace its primary paths step by step.
- Edge-case review
- A dedicated layer examines error paths, boundary inputs, concurrency and assumed but unenforced states.
- Contradiction testing
- A final layer deliberately looks for cases that would falsify the model built by earlier layers.
- Convergence stopping rule
- Analysis ends at a layer with no delta or at an explicit budget cutoff, and the stop point is reported.
Good for
- Analyze an unfamiliar codebase in structured passes before proposing changes
- Trace primary execution paths and then list their error and boundary cases
- Stress-test an existing design model by hunting for inputs that break it
- Review a system's assumptions and document where they are not enforced
Layered analysis loop FAQ
What does the skill need to run?
It needs no scripts or external tools. It is a set of written instructions the agent follows on whatever target is being analyzed.
When does Layered analysis loop trigger?
It is meant for analysis deep enough to need separate structural, behavioral, edge-case and contradiction passes rather than a single read.
How does Layered analysis loop decide when to stop?
It stops when a full layer produces no delta, or when an explicit budget cutoff is reached, and it reports the layers run and the convergence point.
How do I install Layered analysis loop in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/layered-analysis-loop to use it in all your projects, or to .claude/skills/layered-analysis-loop in one project.
Does Layered analysis 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 Layered analysis loop?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Layered analysis loop?
The closest alternatives to Layered analysis loop are Meta cognition parallel, Agent architecture audit, Deep discuss, Continuous agent loop and Gap analysis.
Where this comes from
- Description: from the skill's own SKILL.md.
More from mtarcure/claude-vibe-squad

Writes alt text, timed captions and transcripts for images, footage and audio
- Open source
- 227 GitHub stars
- Design and media

Guides building product agent system prompts with eval-backed boundaries and output
- Open source
- 227 GitHub stars
- AI models and LLM tooling

Guides authorized adversarial testing of autonomous LLM agents for injection and approval
- Open source
- 227 GitHub stars
- Security

Writes a typed game-event to audio-cue map that hands adaptive audio designs to engines
- Open source
- 227 GitHub stars
- Developer tools

Generates missing README, CHANGELOG, LICENSE and agent-context files at project delivery
- Open source
- 227 GitHub stars
- Developer tools

Builds and proves multi-step exploit chains from weak bug-bounty findings
- Open source
- 227 GitHub stars
- Security




