introspect

introspect is a skill for Claude Code from softspark/ai-toolkit. It costs 42 tokens per session (1,663 once invoked), scanned A, original, Apache-2.0.

A structured guide for diagnosing an AI coding agent when it is stuck, repeating mistakes, or producing worse results. It examines the failure state and classifies patterns such as loops, wrong assumptions, or tool misuse.

In plain words
What is it for?
Use it to record recent actions and errors, identify the failure pattern, and choose a recovery approach for loops, drifting scope, incorrect assumptions, or overloaded context.
Why use it?
It helps turn vague failure into a concrete diagnosis and suggests where the agent's approach went wrong. This makes recovery easier when progress has stalled.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: agent in frontmatter.

Part of the ai-toolkit plugin — 113 skills, 44 agents, 14 hooks shipped together

Good fit Use it to record recent actions and errors, identify the failure pattern, and choose a recovery approach for loops, drifting scope, incorrect assumptions, or overloaded context.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/softspark/ai-toolkit/introspect
Install

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.

Any agent
npx skills add softspark/ai-toolkit --skill introspect
Clone the repo
git clone --depth 1 https://github.com/softspark/ai-toolkit

Made for: Claude Code.

Or install ai-toolkit, the plugin that ships this one along with the rest of its 113 skills, 44 agents, 14 hooks.

Wrote 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.

agentmods badge for introspect

README.md
[![agentmods](https://agentmods.dev/badge/skills/softspark/ai-toolkit/introspect.svg)](https://agentmods.dev/skills/softspark/ai-toolkit/introspect)
Your own site
<a href="https://agentmods.dev/skills/softspark/ai-toolkit/introspect"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/introspect.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,663 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00042 $0.01663
Opus 5 $0.00021 $0.00831
Sonnet 5 $0.00008 $0.00333
Haiku 4.5 $0.00004 $0.00166

Measured 4d ago against content hash fcb5a1786cf4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

introspect 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 4d 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.

app/skills/introspect/SKILL.md · 151 lines

How it starts

The opening of the file, as written. The whole thing — 151 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent Self-Debugging

$ARGUMENTS

Structured self-analysis for when the agent is stuck, looping, or producing degraded output.


Step 1: Capture Failure State

Before diagnosing, gather the facts. Answer each question concisely:

Question Answer
Last goal/task What was the agent trying to accomplish?
Actions taken List the last 3-5 actions in order
Errors or unexpected results What went wrong? What was expected vs actual?
Attempt count How many times has this been tried?
Time spent Rough estimate of effort so far

Step 2: Classify the Failure Pattern

Identify which pattern matches the current situation:

Pattern Symptoms Common Cause
Loop Same action repeated 3+ times Missing exit condition, wrong approach
Drift Actions diverge from original goal Lost context, scope creep
Assumption Error Working with wrong mental model Didn't read code, assumed behavior
Tool Misuse Wrong tool for the job Grep when should Read, Bash when should Edit
Context Overflow Forgetting earlier findings Too much context, need compaction
Wrong Abstraction Over-engineering simple task Premature abstraction, YAGNI violation
Missing Information Can't proceed without data Need to ask user, read more code

Pick the single best match. If multiple apply, pick the root cause pattern (the one that, if fixed, would resolve the others).


Step 3: Diagnose Root Cause

Answer these three questions:

  1. What assumption was wrong? — Identify the specific belief that led to failure.
  2. What information was missing? — What would have prevented the failure if known earlier?
  3. What would a fresh start look like? — If starting over with current knowledge, what would the first action be?

Step 4: Select Recovery Action

Choose the smallest recovery action and apply the smallest possible fix — do not restart from scratch unless absolutely necessary:

Read the full file on GitHub · 151 lines

Changes

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.

  1. 4d ago First seen · 151 lines · 42 tokens per session scan A fcb5a1786cf4

Subscribe to this mod's changes

introspect is a skill published in the GitHub repository softspark/ai-toolkit (170 stars, last pushed today), licensed Apache-2.0. It adds 42 tokens to every session and 1,663 once invoked, about $0.0002 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-09-03.

Related

Other skills, from other repositories

cline-fix-volatile-msg

Ladder-aware Cline Anthropic caching — verify the rolling read/write ladder on the wire, then add the tools breakpoint and tune TTL. Updated for the 2026-08 AI-SDK monorepo.

OnlyTerp/prompt-cache-skills · 50 tokens

continue-fix-volatile-msg

Ladder-aware Continue Anthropic caching — verify the rolling ladder on the wire, then enable it by default and add TTL coverage.

OnlyTerp/prompt-cache-skills · 33 tokens

opencode-detect-openai-compat

OpenCode's caching detection misses OpenAI-compatible proxies routing to Anthropic/Bedrock. Broaden the predicate.

OnlyTerp/prompt-cache-skills · 32 tokens

cline-pin-timestamp

Cline's system prompt includes a timestamp that may be recomputed per request, invalidating the system-prompt cache.

OnlyTerp/prompt-cache-skills · 29 tokens

log-analyzer

Senior-SRE log analysis specialist. Use when investigating incidents from logs, triaging error spikes, extracting timelines, correlating distributed traces, or separating signal from noise across plain-text, JSON (slog/zap), syslog, journald, container, and Kubernetes logs. ALWAYS use when the user asks to "analyze…

johnqtcg/awesome-skills · 138 tokens

incident-postmortem

Incident post-mortem specialist for writing blameless post-mortems, extracting timelines from logs/events, conducting root cause analysis (5-Why, fishbone), classifying severity, and generating tracked action items. ALWAYS use when writing a post-mortem, reviewing an incident, extracting a timeline, performing root…

johnqtcg/awesome-skills · 98 tokens