Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add yeaight7/agent-powerups --skill context-retrieval-loopgit clone --depth 1 https://github.com/yeaight7/agent-powerupsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/yeaight7/agent-powerups/context-retrieval-loop)<a href="https://agentmods.dev/skills/yeaight7/agent-powerups/context-retrieval-loop"><img src="https://agentmods.dev/badge/skills/yeaight7/agent-powerups/context-retrieval-loop/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/yeaight7/agent-powerups/context-retrieval-loop"><img src="https://agentmods.dev/badge/skills/yeaight7/agent-powerups/context-retrieval-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00048 | $0.00825 |
| Opus 5.5 | $0.00019 | $0.00330 |
| Sonnet 5.5 | $0.00010 | $0.00165 |
| Haiku 4.5 | $0.00005 | $0.00082 |
Grade A, and why
context-retrieval-loop scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 112 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context Retrieval Loop
Gather the right codebase context before making changes or spawning subagents. Prevents acting on incomplete information.
When to Use
- Starting work on an unfamiliar area of a codebase
- Spawning a subagent that needs targeted file context
- Failing to find a relevant file on the first search pass
- Unsure which files are in scope for a task
The 3-Cycle Loop
Each cycle builds on the previous. Stop early when you have enough context. Do not exceed 3 cycles.
Cycle 1 — Broad Search
# 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.
Cycle 2 — Exact Source and Tests
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.
Cycle 3 — Docs and Setup
# 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.
Stopping Conditions
Stop the loop (whichever comes first):
- You have 3+ high-relevance files and understand the change scope
- Cycle 3 complete
- Each new cycle returns only files already seen
Output
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>
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 112 lines · 48 tokens per session scan A 359642778e73
context-retrieval-loop is a skill published in the GitHub repository yeaight7/agent-powerups (10 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 48 tokens to every session and 825 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
context-retrieval-loop compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| context-retrieval-loopyeaight7/agent-powerups | Skill | 10 | 2mo ago | Apache-2.0 | A | 48 | Claude Code |
| systematic-debuggingHezaoHezao/poirot | Skill | 262 | 4mo ago | MIT | A | 16 | Claude Code |
| simplify-codeHezaoHezao/poirot | Skill | 262 | 4mo ago | MIT | A | 15 | Claude Code |
| python-debugpyHezaoHezao/poirot | Skill | 262 | 4mo ago | MIT | A | 17 | Claude Code |
| node-inspect-debuggerHezaoHezao/poirot | Skill | 262 | 4mo ago | MIT | A | 18 | Claude Code |
| hqespearchucker667/Skill-HQE | Skill | 4 | 3mo ago | Apache-2.0 | A | 29 | Claude Code, Codex |
| debug-gatewaykirodotdev/KiroCrew | Skill | 5.1k | today | Apache-2.0 | A | 63 | Claude Code, Codex |