agentleFS
BoredHFBoredHF/albertskills/skills/stuck-detector/SKILL.md

stuck-detector

Skill2 starsChanged yesterdayMITView on GitHub

Notices when you are looping, stops, names the pattern and forces a different kind of action. Trigger the moment a tripwire fires mid-task (third attempt at the same idea, same command failing twice, a fix that breaks an earlier fix), or when the user says "you're going in circles", "you already tried that", "this isn't working" or "step back".

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check tripwires silently on every step.

    line 13
  2. Distinctive:

    After two failed strategy switches, stop and ask the user one specific question, stating what was tried.

    line 35
  3. Distinctive:

    Write the STUCK block.

    line 42
  4. Distinctive:

    Do the switch action and report what it showed, before editing anything.

    line 43
  5. Very specific:

    If the cause is found, print the Unstuck line.

    line 44
  6. Distinctive:

    After resolving, one line:

    line 66

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Stuck Detector

A loop feels like progress from inside. Count attempts by idea, and when a tripwire fires, the attempt you are about to make is the loop.

Scale

  • Normal iteration where each attempt teaches something new is not a loop. Never fire on a first attempt unless the user says you are looping. A second attempt fires only the identical-command tripwire.
  • Check tripwires silently on every step. Print output only when one fires.
  • The block is 4 lines and the whole report at most 6. Never write an essay about being stuck.

Tripwires

TripwireFires on
Same idea retried3rd attempt, counted by idea, not wording
Same command failing2nd identical failure, or 3rd with cosmetic changes
Whack-a-moleA fix breaks something fixed earlier, twice
Complexity ratchetSolution grew 3 times (flag, special case, wrapper, caveat) while the core problem has not moved
Undo/redoBack in a state you were in before
Rewrite churn3rd rewrite of the same paragraph, section or component with no new information
No new evidence3 actions in a row that taught nothing
"This should fix it"Said twice about the same problem

Hard rules

  1. A tripwire means stop. Do not make the attempt you were about to make.
  2. Print the STUCK block before any other action.
  3. The next action must be a different kind of action, not a variant. If the last three were edits, the next is a read, a measurement or a question.
  4. The hypothesis is the suspect. List what has been assumed and never verified, then check the cheapest one first.
  5. After two failed strategy switches, stop and ask the user one specific question, stating what was tried.
  6. Count honestly by idea. Rewording the same fix does not reset the count.

Process

  1. Name the tripwire that fired and the idea being repeated.
  2. Pick the pattern from the table below. Match on the cause, not the tripwire name.
  3. Write the STUCK block.
  4. Do the switch action and report what it showed, before editing anything.
  5. If the cause is found, print the Unstuck line. If the loop came from your own mistake, hand it to failure-museum. If the switch action shows nothing, that counts as a failed strategy switch (rule 5).
PatternCauseSwitch to
Same-fix loopHypothesis wrong but unquestionedStop editing. Write the hypothesis. Design one observation that could falsify it
Flailing commandReacting to error textRead the whole error, the docs or --help. Check versions, paths, permissions
Whack-a-moleSymptoms of a shared causeList all symptoms together, find what they share, fix that
Complexity ratchetWrong approach being patchedReturn to the last simple state. Ask what the 10-line version is
Ping-pongTwo constraints conflictState both. Ask which wins, or find the design where they do not collide
Rewrite churnPurpose unknownStop writing. State the one thing it must do for the reader
Blind searchNo model of the systemShrink it: minimal reproduction, bisect, smallest failing example
Assumption lock"It can't be X"Verify the thing you are sure about

Output format

STUCK: <pattern> (tripwire: <which fired>)
Tried: <idea> ×n, <idea> ×n
Assumed without checking: <...>
Switching to: <different kind of action>, which will tell me <what>

After resolving, one line:

Unstuck: the cause was <x>; the wrong assumption was <y>.

Anti-patterns

  • "One more try" before switching.
  • Naming the pattern, then doing the same thing.
  • Switching to a variant of the failed approach and calling it a new strategy.
  • A stuck report longer than 6 lines (the STUCK block is 4).
  • Asking the user "what should I do?" instead of one specific question.
  • Silently abandoning the goal for an easier one. If the goal must change, say so.
  • Listing assumptions that are really verified facts, to fill the line.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.