clawstash: Skill for Claude Code

.claude/skills/stuck/SKILL.md

stuck is a skill for Claude Code from fo0/clawstash. It costs 61 tokens per session (1,455 once invoked), scanned A, original, MIT.

A recovery procedure for an agent that keeps encountering the same error or repeating the same attempted fixes.

In plain words
What is it for?
Use it to capture the current project state, list attempted approaches, identify the type of loop, and decide on a different next step.
Why use it?
It makes the agent stop after repeated failures, record what happened, and expose the problem instead of retrying silently.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md.

This is fo0/clawstash's own configuration. It tells Claude Code how to work on clawstash itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything clawstash configures →

Reuse

Borrowing it

Nothing to install: this file belongs to fo0/clawstash. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/fo0/clawstash/main/.claude/skills/stuck/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/fo0/clawstash

Made for: Claude Code.

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 stuck

README.md
[![agentmods](https://agentmods.dev/badge/skills/fo0/clawstash/stuck/github.svg)](https://agentmods.dev/skills/fo0/clawstash/stuck)
Your own site
<a href="https://agentmods.dev/skills/fo0/clawstash/stuck"><img src="https://agentmods.dev/badge/skills/fo0/clawstash/stuck/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.

agentmods 80×15 button for stuck

Your own site · 80×15
<a href="https://agentmods.dev/skills/fo0/clawstash/stuck"><img src="https://agentmods.dev/badge/skills/fo0/clawstash/stuck.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,455 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.
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.00061 $0.01455
Opus 5.5 $0.00024 $0.00582
Sonnet 5.5 $0.00012 $0.00291
Haiku 4.5 $0.00006 $0.00145

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

Security

Grade A, and why

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

.claude/skills/stuck/SKILL.md · 132 lines

How it starts

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

Stuck — Loop / Dead-End Recovery

When to Use

  • User says "stuck", "loop", "going in circles", "/stuck"
  • Agent self-detects a loop:
    • Same error after 2nd fix attempt → log warning, third attempt MAY proceed if a different angle is being tried
    • Same error after 3rd attempt → STOP, invoke this skill
    • Same file edited 5+ times in one session for the same defect
  • A test passes locally but fails in CI 2+ consecutive runs without a code change in between (likely flake — see CI-skill rules)

Scope Boundaries

Owns: breaking a fix-retry loop — snapshot, attempt log, diagnosis of the loop type, escalation. Does not own: undoing the damage (rollback), the review that would have caught the defect (basic-review), the decision to abandon the approach — that one is escalated, never taken here.

Workflow

1. Snapshot

Capture exact current state:

git status --porcelain
git diff --stat
git log --oneline -10

Plus:

  • Last error message verbatim (no paraphrasing)
  • Last 3 commands run and their exit codes
  • Files touched in this loop

2. Attempt Log

Build an explicit list of what's been tried this session:

Attempt 1: <approach> → <result>
Attempt 2: <approach> → <result>
Attempt 3: <approach> → <result>

If you can't articulate the attempts as distinct approaches → that itself is the diagnosis (you've been trying the same thing).

3. Diagnose Loop Type

Pattern Likely cause Action
Same fix re-applied because tests still fail Test is wrong, not the code Question the test
Lint passes locally, fails in CI Tooling-version drift Pin versions, check .tool-versions / lockfile
Import / module-not-found that "should work" Cache, build artifacts, stale lockfile Clean caches, re-install deps
Type error surviving every cast Wrong type model, not wrong cast Step back, redesign types
Test flake (passes/fails non-deterministically) Async race / shared state / clock dependency Treat as flake → BACKLOG.md
Network / external-API error Unmocked external dep Apply autonomy + zero-cost rule — mock
Build infra (timeout / OOM / runner) NOT a code defect Surface to CI skill, do not "fix" code

Read the full file on GitHub · 132 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 Changed · +5 lines 37f6981cce4a
  2. 1mo ago Changed · -1 lines 62f492ea4682
  3. 1mo ago Changed · +1 lines 3d0e93bd756e
  4. 1mo ago Changed · +10 lines dea70b7ca9ef
  5. 2mo ago First seen · 117 lines · 61 tokens per session scan A a54f159f5c9b

Subscribe to this mod's changes

stuck is a skill published in the GitHub repository fo0/clawstash (1 stars, last pushed today), licensed MIT. It adds 61 tokens to every session and 1,455 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.

Related

Other skills, from other repositories

spotify-mcp-doctor

Diagnose and repair NovaLux12/spotify-mcp-server failures — auth, permissions, devices, rate limits, OpenClaw wiring. Use when Spotify tool calls fail or setup stalls.

NovaLux12/spotify-mcp-server · 44 tokens

feedback-nudge

Use when the user wants to report a bug, request a feature, or send feedback to the Zooza engineering team. Also offer proactively after a successful commit operation (max once per week).

zooza-dev/zooza-mcp-server · 38 tokens

report-issue-framework

File a bug or feature request against @cyanheads/mcp-ts-core when you hit a framework issue. Use when a builder, utility, context method, or config behaves contrary to the documented API — not for server-specific application bugs.

cyanheads/pubmed-mcp-server · 52 tokens

api-errors

McpError constructor, JsonRpcErrorCode reference, and error handling patterns for @cyanheads/mcp-ts-core. Use when looking up error codes, understanding where errors should be thrown vs. caught, or using ErrorHandler.tryCatch in services.

cyanheads/internet-archive-mcp-server · 54 tokens

api-linter

MCP definition linter rules reference. Use when bun run lint:mcp or bun run devcheck reports a lint error or warning (format-parity, schema-is-object, name-format, server-json-, etc.) and you need to understand the rule, its severity, and how to fix it. Every rule ID the linter emits has an entry in this doc.

cyanheads/internet-archive-mcp-server · 86 tokens

report-issue-local

File a bug or feature request against this MCP server's own repo. Use for server-specific issues — tool logic, service integrations, config problems, or domain bugs that aren't caused by the framework.

cyanheads/internet-archive-mcp-server · 44 tokens