Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/epicsagas-agent-introspection
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/agent-introspection
What's inside
- Skill name
agent-introspection- Description
- Loop-breaking self-diagnosis. Use when 3+ consecutive failures occur, circular retries persist, or context overwhelms the session.
- License
- Apache-2.0
- Instructions
- 83 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Agent Introspection — Systematic Self-Diagnosis
## Iron Law
NO UNSUPPORTED SELF-HEALING CLAIMS. Only assert recovery actions you can actually perform with available tools.
## When to Trigger
- 3+ consecutive failures on the same task
- Repeating the same approach with different parameters (loop detection)
- Context window exceeds 70% without resolution
- Error messages repeat with no progress
- User explicitly says "you're stuck" or "try a different approach"
## Process
### 1. Failure Capture
Stop immediately and record:
- **Error type**: syntax_error / type_error / test_fail / lint_fail / build_fail / runtime_error / permission_denied / not_found
- **Last 3 tool calls**: what was attempted and what failed
- **Context pressure**: approximate context usage percentage
- **What changed**: what was the last successful state
### 2. Root Cause Diagnosis
Match against known patterns:
| Pattern | Symptoms | Root Cause |
|---------|----------|------------|
| **Loop trap** | Same error 3+ times | Wrong approach, not wrong parameters |
| **Context overflow** | Increasingly confused responses | Too much information, need compaction |
| **Environment drift** | "Works locally" failures | Missing env var, different tool version |
| **Cascade failure** | Fix A breaks B | Underlying assumption is wrong |
| **Tool mismatch** | Wrong tool for the job | Need a different approach entirely |
### 3. Controlled Recovery
Execute ONLY the smallest safe action:
- **Loop trap** → Abandon current approach entirely. Try a fundamentally different strategy.
- **Context overflow** → Run `/compact` or summarize current state, then continue.
- **Environment drift** → Verify environment with explicit checks (`which`, `--version`).
- **Cascade failure** → Revert to last known good state. Re-analyze assumptions.
- **Tool mismatch** → Switch tools. If `Edit` fails 3 times, try `Write`. If `Bash` fails, try `Read` first.
### 4. Introspection Report
Generate a structured report:
```markdown
## Introspection Report
- **Failure type**: [type]
- **Root cause**: [diagnosis]
- **Recovery action**: [what was done]
- **Confidence**: [high/medium/low]
- **Next step**: [what to do if this happens again]
```
Save to memory:
```bash
epic mem add \
--title "Self-diagnosis: {error_type} in {file}" \
--type error \
--body "Pattern: ...\nRoot cause: ...\nRecovery: ...\n"
```
## Anti-Rationalization
| Excuse | Rebuttal | What to do instead |
|--------|----------|-------------------|
| "One more try might work" | 3 failures means the approach is wrong, not unlucky. | Stop and run the full 4-step introspection process. |
| "I just need to tweak the parameters" | Tweaking a failing approach is not debugging. Step back and reassess. | Abandon the current approach and try a fundamentally different strategy. |
| "I can fix this myself" | Asking for help is not weakness. Escalation saves everyone time. | Escalate to the user with a clear summary of what was tried and what failed. |
| "The error is clear, I know the fix" | You said that 3 times already. Prove it with a different approach. | Run the introspection report and verify the fix with a test before claiming success. |
## Evidence Required
- [ ] Failure type classified correctly
- [ ] Root cause matched to known pattern
- [ ] Recovery action is the smallest safe action
- [ ] Introspection report generated
- [ ] Failure pattern recorded in memory
## Red Flags
- Trying the same command more than 3 times with minor variations
- Claiming "fixed!" without running the actual test
- Not recording the failure pattern in memory
- Continuing after 70% context usage without compactingFrom epicsagas/epic-harness, Apache-2.0.
More from epicsagas/epic-harness
- 0.629score
triage
epicsagas
Adversarial validation of vulnerability findings.
SkillAFreshness: A★ 19Claude Code +9 - 0.629score
document
epicsagas
Documentation generator for public APIs, functions, and modules.
SkillAFreshness: A★ 19Claude Code +9 - 0.629score
team
epicsagas
Org-level agent team designer via `epic team` CLI (cross-project, append-merge).
SkillAFreshness: A★ 19Claude Code +9 - 0.629score
vuln-scan
epicsagas
Systematic vulnerability scan across injection, auth, data exposure, and dependencies — traced by reading code, not grepping for keywords.
SkillAFreshness: A★ 19Claude Code +9 - 0.629score
threat-model
epicsagas
Threat modeling and attack surface analysis.
SkillAFreshness: A★ 19Claude Code +9 - 0.629score
benchmark
epicsagas
Executes Bare-vs-Epic A/B benchmarking, Ring 0 Guard 50 challenge, and full golden set evaluation for epic-harness.
SkillAFreshness: A★ 19Claude Code +9 - 0.626score
debug
epicsagas
Systematic root-cause isolation for test failures, runtime errors, or unexpected behavior.
SkillAFreshness: A★ 19Claude Code +9 - 0.626score
context
epicsagas
Working-state snapshot guidance.
SkillAFreshness: A★ 19Claude Code +9 - 0.626score
orchestrate
epicsagas
Trigger: active multi-agent run.
SkillAFreshness: A★ 19Claude Code +9 - 0.626score
go
epicsagas
Go phase.
SkillAFreshness: A★ 19Claude Code +9 - 0.626score
orbit
epicsagas
State-persisted autonomous pipeline: spec → go → audit → eval → ship → evolve in one command.
SkillAFreshness: A★ 19Claude Code +9 - 0.626score
evolve
epicsagas
Ring 3 evolution engine.
SkillAFreshness: A★ 19Claude Code +9
Signals
- Stars
- 19
- Forks
- 5
- Open issues
- 3
- Last commit (this folder)
- Jun 25, 2026 (4 months ago)
- Last release
- Oct 23, 2026 (5 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/epicsagas/epic-harness
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from epicsagas
- 0.641score
book-visuals
epicsagas
Book visual system: art bible and look lock, figure plan per chapter, code-rendered diagrams/charts/technical drawings, diffusion-generated illustrations and…
SkillAFreshness: A★ 38Claude Code +9 - 0.638score
book-game
epicsagas
Game narrative craft reference: branching architecture, quest design, dialogue systems, lore bible, player agency, and game-writing AI tells.
SkillAFreshness: A★ 38Claude Code +9 - 0.638score
book-academic
epicsagas
Academic writing craft reference: IMRAD and discipline structures, literature review, argument chains, citation integrity, academic register in en/ko/ja, and…
SkillAFreshness: A★ 38Claude Code +9 - 0.638score
book-draft
epicsagas
Phase 3: Drafting.
SkillAFreshness: A★ 38Claude Code +9 - 0.638score
book-fiction
epicsagas
Fiction craft reference for all subgenres: structure options, scene design, character depth, dialogue, POV and distance, the fiction-specific AI tells, and…
SkillAFreshness: A★ 38Claude Code +9 - 0.638score
book-edit
epicsagas
Phase 4: Editing.
SkillAFreshness: A★ 38Claude Code +9
Cite this page
agent-introspection skill. Agent Mart. https://agentmart.dev/skills/epicsagas-agent-introspection (last updated 2026-10-24)