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 oyi77/1ai-skills --skill agent-debug-loopgit clone --depth 1 https://github.com/oyi77/1ai-skillsWrote 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/oyi77/1ai-skills/agent-debug-loop)<a href="https://agentmods.dev/skills/oyi77/1ai-skills/agent-debug-loop"><img src="https://agentmods.dev/badge/skills/oyi77/1ai-skills/agent-debug-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/oyi77/1ai-skills/agent-debug-loop"><img src="https://agentmods.dev/badge/skills/oyi77/1ai-skills/agent-debug-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.00050 | $0.01096 |
| Opus 5.5 | $0.00020 | $0.00438 |
| Sonnet 5.5 | $0.00010 | $0.00219 |
| Haiku 4.5 | $0.00005 | $0.00110 |
Grade A, and why
agent-debug-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 3d 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 — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent Debug Loop (Introspection)
Overview
Systematic self-debugging for AI agent failures. Captures state before retrying blindly, diagnoses against known failure patterns, applies contained recovery actions, and produces a structured human-readable report. This is a workflow skill, not a hidden runtime—it teaches the agent to debug itself before escalating to a human.
When to Use
Trigger phrases:
- "agent loop", "agent stuck", "agent failing", "debug agent"
- "tool call limit", "context overflow", "repeated retries"
Use directly when:
- Maximum tool-call / loop-limit failures reached.
- Repeated retries produce no forward progress.
- Context growth or prompt drift degrades output quality.
- File-system or environment state mismatches expectations.
- Tool failures are likely recoverable via diagnosis + smaller corrective action.
When NOT to Use
- Feature verification after code changes → use
test-agentorverification-looppattern. - Framework-specific bugs where a narrower skill already exists.
- Runtime promises the current harness cannot enforce automatically.
Anti-Rationalization Table
| Rationalization | Reality |
|---|---|
| "I'll just retry the same approach harder." | Blind retries burn tokens and worsen context pressure. Capture state first, then change one variable. |
| "The tool must be broken." | Most tool failures are state mismatches (wrong cwd, stale file hash, missing dependency), not tool bugs. Verify assumptions before blaming the tool. |
| "I can keep everything in memory and figure it out." | Agents have no persistent memory across compaction. Write the failure capture to disk (local:// or artifact) so recovery survives context loss. |
| "One more attempt will fix it." | If two identical attempts failed, the third will too. Switch strategy or escalate. |
Workflow
Phase 1: Failure Capture
Before recovering, record the failure precisely:
## Failure Capture
- Session / task:
- Goal in progress:
- Error type + message:
- Last successful step:
- Last failed tool / command:
- Repeated pattern seen:
- Context pressure indicators (loop count, token estimate):
- Environment assumptions to verify:
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.
- 3d ago First seen · 125 lines · 50 tokens per session scan A 647a81ffbe1e
agent-debug-loop is a skill published in the GitHub repository oyi77/1ai-skills (17 stars, last pushed today), licensed MIT. It adds 50 tokens to every session and 1,096 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-11-04.
agent-debug-loop compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| agent-debug-loopoyi77/1ai-skills | Skill | 17 | today | MIT | A | 50 | Claude Code |
| adk-debuggoogle/adk-python | Skill | 22k | today | Apache-2.0 | A | 191 | Claude Code, Codex |
| rubber-duckkirodotdev/KiroCrew | Skill | 4.8k | today | Apache-2.0 | A | 161 | Claude Code, Codex |
| debug-gatewaykirodotdev/KiroCrew | Skill | 4.8k | today | Apache-2.0 | A | 63 | Claude Code, Codex |
| ai-discoverkirodotdev/KiroCrew | Skill | 4.8k | today | Apache-2.0 | A | 83 | Claude Code, Codex |
| debugging-websocket-issuesAgentWorkforce/relay | Skill | 1.1k | today | Apache-2.0 | A | 54 | Claude Code |
| qa-investigationfugazi/test-automation-skills-agents | Skill | 262 | 12d ago | MIT | A | 94 | Claude Code |