---
name: patcrowebar-stuck
title: stuck
kind: skill
description: >
  Break a debugging spiral. Stop changing code, get back to the last version
  that worked, find the real cause, then fix one thing at a time. Use when the
  user types /stuck or says "we're going in circles", "it's still broken", "same
  error again", "you broke it", "it's worse now", "nothing is working", or "I'm
  stuck". Also use proactively, and offer it before making another change, when
  the same bug or symptom is still there after three changes meant to fix it.
  Bugs in software only; not for brainstorms or documents.
updated: 2026-12-01
authored_by: patcrowebar
author_url: https://github.com/patcrowebar
source_url: https://github.com/patcrowebar/builder-pm-skills/tree/HEAD/skills/build/stuck
brought_by: kt
license: MIT
---

# Stuck

Pull over before you're lost.

This skill stops a debugging spiral: the loop where each "fix it" piles on the last, the AI stays stuck on its first theory, new bugs appear, and things get worse. It stops code changes, gets back to safe ground, finds the real cause, and only then fixes, one change at a time.

The person using this skill is often non-technical and cannot read code. Speak plain English. Describe symptoms and causes as what the product does ("the Save button shows an error"), not as code. Say "save history" for git, "snapshot" for commit, and "roll back" for returning to an earlier snapshot. Never show git commands or jargon unless asked.

## When to offer it yourself

You are inside the spiral and are the worst judge of it, so watch for these signals and offer this skill before making another change:

- The same symptom is still there after **three changes meant to fix it**. The error message does not need to be word-for-word the same; the same problem counts.
- A fix made something else break.
- You are about to try something you already tried.
- The person sounds frustrated ("still broken", "same thing", "ugh").

Offer it in one line: "We've tried three fixes and it's still broken. I'd like to stop and figure out the real cause before changing anything else. OK?" If they say no, continue, and do not offer again for the same problem until two more failed attempts.

---

## The seven steps

### 1. Stop

Make no more code changes until step 6. Say plainly:

> "We're going in circles. I'm pausing changes until we know what's actually wrong."

Steps 1 to 5 change nothing except snapshots and STUCK.md.

### 2. Take stock

Write a short, plain-English summary for the person (not more than 10 lines):

- **The symptom:** exactly what they see, the exact error message (quote it), and how to make it happen.
- **What's been tried:** each fix attempt this session, one line each, with what happened. Use the conversation for this.
- **What's changed since it last worked:** if save history is on, compare against the last snapshot where it worked (usually the most recent `handoff: close` snapshot, or the last one the person confirms was working). Use `git log` and `git diff --stat` to list what changed, then describe it in plain English.

If you don't know when it last worked, ask one question: "Do you remember the last time this worked? Today, yesterday, before a specific change?"

### 3. Get back to safe ground

**If save history (git) is on:** always offer a rollback to the last snapshot where it worked.

- **Recommend it** when the failed fixes touched several files, or when other things broke along the way: "The failed fixes changed 6 files and broke the menu too. I recommend rolling back to this morning's snapshot, when Save was the only problem. That undoes the pile of fixes in one step."
- **Offer it neutrally** when the failed fixes were small: "We could roll back to this morning's snapshot, or keep the current state and diagnose. Your call."

Before any rollback:
1. Save a snapshot of the current state with the message `stuck: before rollback - <short plain summary>`, so the rollback itself can be undone.
2. Say in plain English what will change: "Your files will go back to how they were at 9:40 this morning. The changes since then are saved, so nothing is lost."
3. Roll back only after a yes.

To roll back, restore the project files to that snapshot without deleting history: run `git restore --source=<snapshot> --staged --worktree :/` (this also removes files the failed fixes added), then save a new snapshot `stuck: rolled back to <snapshot summary>`. Do not use `git checkout <snapshot> -- .`, which leaves added files behind. Never use `git reset --hard`, `git clean`, or anything that erases snapshots.

**If save history is off:** skip the rollback and say so in one line: "There's no save history in this project, so I can't roll back. We'll diagnose from here. Want me to turn on save history so we can next time?" If they say yes, set it up after this problem is solved (initialize git, add `.env`, `.env.*`, `*.pem`, `*.key`, `node_modules/` and `.DS_Store` to `.gitignore`, save a first snapshot). Do not set it up mid-diagnosis.

### 4. Diagnose before fixing

Set your earlier theory aside. List **two or three possible causes**, including at least one you haven't been assuming. Label them as guesses.

For each, name the **cheapest test that would tell them apart**. Prefer, in order:

1. **Something the person does and reports:** "Click Save and read me the exact message." "Does it fail for a new account too?" "Open the page in a private window. Same thing?"
2. **Looking without changing:** reading error logs, the browser console, server or database logs, or configuration.
3. **A temporary, harmless check:** adding a log message that is removed afterward.

Do not change real code to test a theory. Run or ask for the cheapest test first, then update the causes: ruled out, still possible, or confirmed.

A cause is **confirmed** only when a test points to it. Until then it stays a guess.

### 5. Write the diagnostic brief (STUCK.md)

Always save STUCK.md in the project folder using `templates/stuck.md`. Keep it to about one screen. It must let a fresh session pick up the problem with none of this session's baggage.

Include a **fresh-session prompt**: a complete, ready-to-paste prompt that names the project, says to read STUCK.md first, and says to run the cheapest test before changing anything.

Then decide whether to recommend a fresh session:

- **Recommend it** when the conversation is long, when three or more fixes have failed, or when you notice yourself returning to the same theory: "This conversation is full of failed attempts, which keeps pulling me back to the same idea. I recommend starting a fresh session and pasting the prompt from STUCK.md. A clean start often finds it fast."
- **Otherwise,** offer both: "We can keep going here, or start fresh with the prompt in STUCK.md."

If a STUCK.md for a different, unsolved problem already exists, ask before replacing it. If the person chooses to start a new one, archive the old one first (see step 7).

### 6. One fix at a time

Once a cause is confirmed (or the most likely cause has survived the cheapest tests):

1. Explain the fix in plain English before making it: what you'll change and why it should work.
2. Make **one** change.
3. Test it. Prefer a test the person can see ("Click Save now. What happens?") or one you can run and observe.
4. **If it works:** say so, and mark it verified only if the person saw it work or you saw a test pass.
5. **If it fails:** undo that change before trying anything else, then add it to "Don't retry" in STUCK.md.

Never stack fixes. Never attempt anything listed under "Don't retry" unless the person explicitly says to.

If two more fixes fail after diagnosis, stop again, update STUCK.md, and strongly recommend the fresh session.

### 7. Record the lesson

When the problem is solved:

1. Update STUCK.md: set Status to **Solved**, add the real cause in one plain line, and note what fixed it.
2. Move STUCK.md to `handoffs/YYYY-MM-DD-HHMM-stuck.md` (create `handoffs/` if needed).
3. Add the lesson to the session's watch-outs in one line, so a Handoff Close picks it up: "Save failed because of the database access rules, not the page. Don't patch the page for this."
4. If save history is on, save a snapshot: `stuck: solved - <short plain summary>`.

---

## The CLAUDE.md nudge (offered once)

The first time this skill runs in a project, after the problem is handled, offer once:

> "Want me to add one line to your project memory so I automatically stop and suggest /stuck if a bug survives three fixes? You can't easily spot the spiral from inside it, so this catches it for you."

On yes, append this line to CLAUDE.md (create the file if missing):

```
- If the same problem is still there after three changes meant to fix it, stop changing code and offer to run /stuck.
```

Only add the line. Never edit or remove anything else in CLAUDE.md.

Record the choice in `handoffs/settings.md` as `stuck_nudge: added` or `stuck_nudge: declined` (create the file and folder if needed). A "declined" is final; do not ask again.

## Snapshot rules

- **Never push.** Snapshots stay on this computer. Never run `git push`.
- **Never save secrets.** Before saving a snapshot, check what's included. Keep out files that look like they hold secrets (`.env`, `credentials`, `secret`, `*.pem`, `*.key`, `service-account*.json`, or contents that look like API keys or passwords). Add them to `.gitignore` and tell the person in one line which file was kept out.
- **Never erase history.** No `git reset --hard`, `git clean`, `git rebase`, or anything that deletes snapshots.
- **Messages start with `stuck:`** so snapshots from this skill are easy to find.

## What this skill does not do

- It does not change code before a diagnosis.
- It does not roll back without a yes.
- It does not handle brainstorms or documents going in circles (v1 is bugs only).
- It does not push anything to GitHub.
