Guides a 3-cycle search loop to gather codebase context before making changes or spawning subagents. Use when starting in unfamiliar code, search missed a file, or task scope is unclear.
How this skill is triggered — by the user, by Claude, or both
Slash command
/codebase-intelligence:context-retrieval-loopThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Gather the right codebase context before making changes or spawning subagents. Prevents acting on incomplete information.
Gather the right codebase context before making changes or spawning subagents. Prevents acting on incomplete information.
Each cycle builds on the previous. Stop early when you have enough context. Do not exceed 3 cycles.
# Find files by keyword
rg "<primary-keyword>" --type ts --type js -l
rg "<primary-keyword>" --glob "*.py" -l
# Find by filename pattern
find . -name "*<keyword>*" -not -path "*/node_modules/*" -not -path "*/.git/*"
Collect: file paths, key terms, naming conventions seen.
Stop here if: 3 or more directly relevant files found with no critical gaps.
Read the most relevant files from Cycle 1 in full. Then:
# Find tests for those files
rg "<filename-stem>" --glob "*.test.*" --glob "*.spec.*" -l
rg "import.*<module-name>" -l
# Find call sites
rg "<function-name>|<class-name>" --type ts --type js -l
Collect: imports used, function signatures, test patterns, adjacent files referenced.
Stop here if: You can describe the change needed and its blast radius.
# Check project-specific docs
ls docs/ README.md AGENTS.md CLAUDE.md .claude/ 2>/dev/null
# Check config for feature flags, env vars, or schema
rg "<keyword>" .env.example *.config.* *.toml *.yaml -l 2>/dev/null
Collect: configuration constraints, environment requirements, anything that would block a change.
Stop the loop (whichever comes first):
After the loop, report:
Context gathered:
<file-path> — <one-line reason for relevance>
...
Missing context (if any):
<what is still unclear and why it matters>
If context is missing, state it explicitly. Do not proceed with guesses when a known gap exists.
When dispatching a subagent, pass only the gathered file list — not the full conversation context:
Relevant files for this task:
src/auth/tokens.ts — contains TokenService used by the bug
src/auth/session.ts — session state management
src/auth/tokens.test.ts — existing test patterns
npx claudepluginhub yeaight7/agent-powerups --plugin codebase-intelligenceGuides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.
Runs a structured interview session to sharpen plans or designs, producing ADRs and a glossary as output.
Applies curated color/font themes to slides, docs, and HTML artifacts. Includes 10 preset themes and can generate custom themes on demand.
2plugins reuse this skill
First indexed Jul 28, 2026