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 jxoesneon/Ciel --skill agent-introspection-debugginggit clone --depth 1 https://github.com/jxoesneon/CielWrote 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/jxoesneon/ciel/agent-introspection-debugging)<a href="https://agentmods.dev/skills/jxoesneon/ciel/agent-introspection-debugging"><img src="https://agentmods.dev/badge/skills/jxoesneon/ciel/agent-introspection-debugging.svg" alt="Measured on agentmods" 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.00024 | $0.00739 |
| Opus 5 | $0.00012 | $0.00369 |
| Sonnet 5 | $0.00005 | $0.00148 |
| Haiku 4.5 | $0.00002 | $0.00074 |
Grade A, and why
agent-introspection-debugging 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 6d 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 — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CIEL ADAPTATION: Agent Introspection Debugging (Self-Diagnosis)
This skill formalizes the "Self-Debug" protocol for CIEL sub-agents. It provides a systematic 4-phase loop to diagnose and recover from repetitive failures, tool-call loops, and reasoning drift before escalating to a human.
The 4-Phase Loop
1. Failure Capture
Before retrying, the agent MUST record the failure state in a structured format:
- Session Goal: What was the intended outcome?
- Last Meaningful Tool: Which tool call preceded the failure?
- Error Signature: Exact error message or pattern seen.
- Environment State: cwd, branch, and any relevant system assumptions.
2. Root-Cause Diagnosis
Match the capture against common failure patterns:
- Looping: Repeated same tool call with same inputs.
- Drift: Reasoning has pivoted away from the original goal.
- Stale State: Working on files or assumptions that no longer match the filesystem.
- Quota/Resource: 429s, memory exhaustion, or context overflow.
3. Contained Recovery
Take the smallest reversible action to change the diagnosis surface:
- Restate: Re-initialize the task goal in a fresh context.
- Verify: Re-read the filesystem or run a diagnostic command (e.g.,
ls,git status). - Narrow: Shrink the scope to a single failing test or file.
- Escalate: If the failure is high-risk (e.g., persistent auth failure), stop and ask the human.
4. Introspection Report
Log the debugging session to the MemPalace Diary (mempalace_diary_write):
- Root Cause: What was actually wrong?
- Action Taken: How was it resolved?
- Prevention: What change should be encoded (via
save_memoryorcoding-standards) to prevent recurrence?
Recovery Heuristics
- Evidence over Memory: Never trust the prior thought trace if it leads to failure; verify the world state directly.
- Smallest Pivot: Change one variable at a time when attempting recovery.
- Hard Stop: After 3 repeated failures on the same sub-task, the agent MUST enter Phase 1.
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.
- 6d ago First seen · 75 lines · 24 tokens per session scan A 864cca81e508
agent-introspection-debugging is a skill published in the GitHub repository jxoesneon/Ciel (1 stars, last pushed 6d ago), licensed Apache-2.0. It adds 24 tokens to every session and 739 once invoked, about $0.0001 per session on Opus 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.
Other skills, from other repositories
triage
Triagem e causa raiz (RCA) de bugs. Use quando o usuário reportar "erro", "bug" ou "falha" para reproduzir, classificar e isolar o problema antes de qualquer correção.
perf-audit
Analisa gargalos de performance, complexidade algorítmica (Big-O) e vazamentos de memória. Use para "otimizar query", "reduzir alocação de memória" ou "auditar gargalos".
refactor
Reestruturação segura de código sem alterar o comportamento externo, para reduzir dívida técnica. Acionada pelo Architect ou Tech Lead.
refactor-cleaner
Dead code cleanup and consolidation specialist. Use PROACTIVELY for removing unused code, duplicates, and refactoring. Runs analysis tools (knip, depcheck, ts-prune) to identify dead code and safely removes it.
gitnexus-debugging
Use when the user is debugging a bug, tracing an error, or asking why something fails. Examples: "Why is X failing?", "Where does this error come from?", "Trace this bug".
gitnexus-exploring
Use when the user asks how code works, wants to understand architecture, trace execution flows, or explore unfamiliar parts of the codebase. Examples: "How does X work?", "What calls this function?", "Show me the auth flow".