agentleFS
ribato22ribato22/vibecheck/skills/unstuck/SKILL.md

unstuck

Skill3 starsChanged 16 days agoMITView on GitHub

Breaks the AI "fix loop", where the same bug keeps coming back, every fix breaks something else, or the agent keeps guessing. Stops editing, checkpoints the code, reproduces the bug, proves the root cause with evidence and one-change-at-a-time experiments, removes leftover failed fixes, and goes back to the last working version if that's faster. Use when the user says it's still broken, "same error again", "you keep going in circles", "nothing works", "it worked before", or after two or more failed attempts at the same problem.

6 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions6 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 6

    1. Q00/ouroboros★ 6.3ksame name
    2. coreyhaines31/makerskills★ 893same name
    3. momentmaker/kaijutsu★ 3same name
    4. molly-diversifiedfun/claude-skills★ 1same name
    5. Enjoyoer/loadout★ 0same name
    6. roborracle/agent-workflow-kit★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository3 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write a short ledger: the symptom (exact error text and *where* it appears: browser console, terminal, server logs, hosting logs), each …

    line 15
  2. Distinctive:

    Run git status and git diff --stat.

    line 16
  3. Distinctive:

    Make sure you're reading the right log.

    line 22
  4. Very specific:

    Write down up to 3 hypotheses.

    line 36
  5. Distinctive:

    Run one experiment at a time.

    line 37
  6. Very specific:

    Ground truth beats memory: Check the installed version (node_modules/<pkg>/package.json, pip show <pkg>) and that version's docs or type …

    line 38

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “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

unstuck: break the AI fix loop

Signs of a loop: the same error after two or more attempts; fixes that move the error somewhere else; edits to files unrelated to the symptom; "this should work now" without anyone seeing it work; a growing pile of try/catch, retries, any, // @ts-ignore and commented-out code.

The rule that ends loops: no more edits until you can explain the bug with evidence.

1. Freeze and take stock (no code changes)

  • Write a short ledger: the symptom (exact error text and where it appears: browser console, terminal, server logs, hosting logs), each attempt so far, and what happened after it.
  • Run git status and git diff --stat. How much has changed since the last commit?
  • Offer a checkpoint: git switch -c unstuck/<short-name> plus a commit, so nothing is lost and you can compare. Ask first. No git? Say so: it's the #1 safety net for AI coding. Offer git init.

2. Reproduce it

  • Get the exact steps and the exact error. Read the full stack trace and find the top frame in their code, not the library's.
  • Make sure you're reading the right log. Server errors don't show in the browser console; browser errors don't show in the terminal; production errors live in the hosting dashboard (Vercel → Logs, Netlify → Functions, Supabase → Logs).
  • Shrink it to the smallest repro: one command, one curl, one page, one test.

3. Was it ever working?

  • Yes: git log --oneline -20, find the last good commit, git diff <good>..HEAD --stat. Often the culprit jumps out. For a long history, use git bisect.
  • Works locally but not deployed: compare env vars, build-time vs runtime vars, URLs and ports, CORS, cookie domain, Node/Python version, and whether the database migration ran in production.

4. Clear the pile

Leftover changes from failed attempts hide the real bug and add new ones. List them and, with the user's OK, revert the ones that didn't help (git restore -p, or go back to the checkpoint). Work from the last known-good state plus the minimum change.

5. Hypotheses, then experiments

  • Write down up to 3 hypotheses. For each: the evidence for it, the evidence against it, and one cheap test that could prove it wrong (log a value, curl the endpoint, check the response in the Network tab, print the installed version).
  • Run one experiment at a time. Change one thing. Look at the result. Revert it if it didn't help.
  • Ground truth beats memory. Check the installed version (node_modules/<pkg>/package.json, pip show <pkg>) and that version's docs or type definitions before assuming an API exists. AI-written code often targets another version, or calls functions that never existed.

6. Usual suspects in AI-built apps

SymptomUsual causeCheck
Works locally, broken in productionEnv var missing or misnamed on the host; NEXT_PUBLIC_/VITE_ values are baked in at build time (redeploy after changing); hardcoded localhost URLThe host's env settings; rebuild
Supabase returns [] or null with no errorRLS blocking: no policy matches this user, or the server client has no sessionRun the query in the SQL Editor; read the policies; log auth.getUser() on the server
"Not authenticated" on the server but logged in in the browserCookies or session not passed to server code (SSR client not set up, different domain or port)Look at the cookies on the actual request
CORS errorThe server's response headers, often an error page without headersNetwork tab: status code and response of the failing request
The change has no effectStale cache, dev server not restarted, wrong file or folder, service worker, CDN, Next.js cacheAdd a deliberate console.log("HERE") to prove the code even runs
Hydration mismatchDate, Math.random, window or localStorage used during render; invalid HTML nestingMove to useEffect; fix the nesting
Module not found / wrong typesPackage not installed, wrong import path, ESM/CJS mix, a hallucinated package or APInpm ls <pkg>; read the package's exports
Infinite re-render / request loopuseEffect dependencies; setting state during render; a new object in the deps every renderReact DevTools; log each render
Webhook never arrives locallyIt needs a tunnel (stripe listen --forward-to …); signature fails because the body was parsed firstUse the provider CLI; verify against the raw body
Migration "worked" but the app is brokenApplied to a different database or environment than the app usesCompare the connection strings / project refs
500 with no detailsThe real error is only in server logsRead the server/hosting logs; log the caught error
AI API errorWrong model ID, key from another project, quota or billing limit reachedThe provider's dashboard and error body
Python import / version errorsWrong virtualenv or interpreterwhich python, pip -V

7. Escalate instead of looping

After two failed experiments, zoom out: re-read the original symptom, question the assumption about where the bug is, search the exact error message together with the library version, read the library's source or types, or rebuild the feature smaller from the last good commit. Tell the user plainly when you need something only they have: hosting logs, dashboard settings, the exact click path.

8. Fix, prove and report

Once the root cause is proven: make the minimal fix, show the repro passing, remove debug logs and leftover attempt code.

🧭 unstuck
Root cause: … (evidence: …)
Fix: … (files)
Proof: the repro now … (command or steps)
Cleaned up: reverted N leftover changes from earlier attempts
Avoid next time: …

Offer to add a one-line lesson to CLAUDE.md / AGENTS.md (for example "Supabase returns [] when RLS blocks: check policies before changing queries") so future sessions don't repeat the loop. Ask first.

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.