/dev-workflows:troubleshoot <feature> — <symptom you saw>from Dev Workflows
Use when you (the human) found a bug while manually testing the app — an agent-built feature shows a wrong value, broken interaction, or console/runtime error — and you want it diagnosed to root cause and fixed. Provide the feature and the symptom you saw.
Ships in Dev Workflows. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
End-to-end bug workflow for issues you found while manually testing the app in a feature built by agents. You are the tester; this skill diagnoses and fixes what you report. Combines:
superpowers:systematic-debugging — the root-cause method (no fixes before root cause)superpowers:test-driven-development — fix is written test-first (red → green)superpowers:finishing-a-development-branch — ship the fix as a branch → PRAutonomy contract: the agent diagnoses autonomously to root cause, then GATES — it presents the diagnosis + proposed fix and waits for your approval before changing any code. After approval it implements, verifies, and ships without further prompting.
Run mode (default = autonomous after the gate). Like /feature and /improve, this skill is autonomous by default — it does not pause between reproduce → root cause → fix → verify → ship; the single mandatory pause is the diagnosis gate (step 3). If the user asks to slow down ("run slowly", "stop at each step", "walk me through it"), also pause to confirm at reproduce, root cause, and verify. The diagnosis gate and the stop-class are always honored regardless of mode — they are not waived by autonomous mode.
Load the project's stack profile: docs/stack.md (preferred) or sdd-stack.md at repo root. If neither exists, prompt the user to create one from the plugin's templates/sdd-stack.template.md, or auto-detect conservative defaults. Everywhere this skill says [PROJECT CONTEXT], substitute a compact summary from the profile. Everywhere it says [VERIFY], substitute the profile's Verify commands. The profile's Backend-log tool and Spec location glob drive the optional branches below.
$ARGUMENTS should contain a feature reference and a bug description. Accept loose forms:
"leads-list — duplicate leads appear after sync""checkout: estimate total shows $0 when line items exist"/improve; replacing known-bad behavior is /troubleshoot.)Don't use when:
/feature)./improve)./spec, then /feature (or /improve when amending).Not an exit: "the user said it's obviously a one-liner" is a hypothesis, not a reason to skip. A reported wrong value in an agent-built feature is exactly this skill's job — investigate to root cause and gate the fix regardless of how trivial it looks. Only skip for a typo you can see is a typo in a file you're already editing for another reason.
digraph troubleshoot {
rankdir=TB;
"0. Scope feature + bug" [shape=box];
"1. Reproduce" [shape=box];
"2. Root cause (systematic-debugging)" [shape=box];
"3. GATE: present diagnosis + fix" [shape=diamond];
"4. Fix test-first (TDD)" [shape=box];
"5. Verify (test + lint/build)" [shape=box];
"5b. Code-review gate (/code-review)" [shape=box];
"6. Branch → PR (finish)" [shape=box];
"DONE" [shape=doublecircle];
"0. Scope feature + bug" -> "1. Reproduce";
"1. Reproduce" -> "2. Root cause (systematic-debugging)";
"2. Root cause (systematic-debugging)" -> "3. GATE: present diagnosis + fix";
"3. GATE: present diagnosis + fix" -> "4. Fix test-first (TDD)" [label="approved"];
"3. GATE: present diagnosis + fix" -> "DONE" [label="rejected / hand off"];
"4. Fix test-first (TDD)" -> "5. Verify (test + lint/build)";
"5. Verify (test + lint/build)" -> "5b. Code-review gate (/code-review)";
"5b. Code-review gate (/code-review)" -> "6. Branch → PR (finish)";
"6. Branch → PR (finish)" -> "DONE";
}
$ARGUMENTS into FEATURE_HINT and BUG_DESCRIPTION.<spec glob from profile> | grep -i "<slug fragment from FEATURE_HINT>"
FEATURE_DIRECTORY. Read its spec.md (and plan.md if present) to understand intended behavior — your expected-behavior oracle.Invoke superpowers:systematic-debugging and follow its Phase 1 discipline:
run skill (or superpowers-chrome:browsing) to drive it and observe.base44:base44-troubleshooter skill, supabase functions logs, vercel logs, heroku logs). If the profile says "none", inspect logs manually. Never log or echo secret values — refer to them by name only.Stay inside superpowers:systematic-debugging — the Iron Law applies: NO FIXES WITHOUT ROOT CAUSE FIRST.
/sc:troubleshoot is installed, use it; otherwise do this inline.)Do not change any code yet. Present to the user:
## Diagnosis
- Feature: FEATURE_DIRECTORY (or "no spec — area: …")
- Symptom: <what you reproduced, observed vs expected value/behavior>
- Reproduction: <exact steps / command>
- Root cause: <the mechanism — file:line, the specific condition/data>
- Evidence: <what proves it — log line, failing assertion, schema mismatch, the diff that introduced it>
## Proposed fix
- Change: <what you will change, where>
- Why this is the root-cause fix (not a symptom patch): <reasoning>
- Regression test: <the test you'll write first and what it asserts>
- Risk / blast radius: <other code paths touched, any frozen-pattern concerns>
- Stop-class check: <does the root-cause fix cross any one-way / high-cost boundary? Classify explicitly — none | schema/DB migration | security/auth/secrets boundary | frozen pattern | one-way door (data model, public API/contract shape, architecture — hard to reverse / costly to refactor later). If yes, say which and whether a smaller reversible fix exists.>
- Spec impact: <none | spec is wrong and should be updated first>
Then wait. Proceed to step 4 only on explicit approval. If the user rejects or wants to adjust, revise or stop. If Spec impact says the spec is wrong, fix spec.md first.
Stop-class — same as /feature and /improve. A bug fix can itself be a one-way door (the root cause is "the data model is wrong" or "the auth check is in the wrong place"). When the Stop-class check is anything other than none, the gate becomes extra firm: spell out the irreversibility, prefer the smallest reversible fix that addresses the root cause, and get explicit approval for the boundary-crossing specifically — not just for "a fix" in general. If implementation reveals a stop-class boundary you didn't see at the gate (e.g. the minimal fix turns out to require a migration), re-gate before crossing it.
Non-interactive contexts (/loop / no live user). The gate is interactive and mandatory — it cannot be auto-approved. With no human to approve, stop at the gate and leave the diagnosis + proposed fix queued; never auto-apply a code fix. (The incident carve-out below still applies — non-code mitigations to stop active bleed are always allowed.) This preserves the Iron Law: no fix ships without a human approving the diagnosis.
Incident carve-out (live bleed in progress): the gate blocks code changes, not incident response. If damage is ongoing (e.g. a destructive job is still deleting records), non-code mitigations are always allowed immediately and don't wait for the gate — pause the cron/trigger or disable the job in the platform UI, flip a feature flag off, or roll back the last deploy. These stop the bleed in seconds without shipping unreviewed code. Recommend the mitigation now; the code fix itself still goes through diagnosis → approval. Don't let "every minute counts" collapse "stop the bleed" into "merge the patch" — they're separate actions.
After approval, invoke superpowers:test-driven-development:
fix/<feature-slug>-<short-bug-slug> branch off main (not on main).Run directly, confirm output, evidence before assertions (superpowers:verification-before-completion):
The new regression test passes.
[VERIFY] — zero errors. Paste the relevant output.
The pre-existing test suite still passes (no regressions).
Code-review gate (/code-review) — confirm the fix is correct and clean. Run the /code-review skill over the fix diff as a second pair of eyes on the root-cause fix: that it actually addresses the mechanism (not a symptom patch), introduces no new correctness bug or regression, and is as small/clean as it should be. Scale effort to the fix's blast radius — medium for an ordinary one-area fix, high when the root-cause fix touched multiple files or a shared code path:
/code-review medium # or: /code-review high for a wider-blast-radius fix
Handling: correctness bugs / regressions at critical/important severity are blockers → fix before the PR (back to step 4, test-first), then re-run [VERIFY] + the suite and re-review until clean. Cleanups → apply the safe, localized ones (--fix), re-verify; defer scope-expanding ones to PR notes — the fix should stay minimal. If /code-review surfaces a stop-class boundary the diagnosis gate (step 3) didn't catch (e.g. the correct fix really needs a schema/auth change), re-gate — never auto-apply a stop-class fix with --fix. Non-interactive (/loop): the review still runs; queue any stop-class finding rather than guessing.
E2E browser smoke gate (soft) — post-fix confirmation. For a UI-visible bug, if the profile's e2e gate is enabled: true, invoke the e2e-smoke skill with FEATURE_DIRECTORY (or the area), WORKTREE_PATH, and SMOKE_FOCUS = the exact interaction that was broken — confirm it now produces the correct behavior in the running app. Soft-gate contract: PASS → §6. FAIL → the fix didn't hold in the real UI; back to step 4. BLOCKED → surface the reason, ask whether to ship without the e2e confirmation. (Reproduction in step 1 still uses run/browser debugging; this is the verification leg only. Skip for non-UI bugs.)
If any check fails, return to step 4 — do not proceed to PR with a failing gate.
Invoke superpowers:finishing-a-development-branch to open the PR. PR body:
spec.md if one exists.Report the PR URL to the user.
| Phase | Skill | Role |
|---|---|---|
| Reproduce + root cause | superpowers:systematic-debugging | Iron-law method; gates fixes behind investigation |
| Diagnostic tooling | /sc:troubleshoot (if installed) | Structured hypothesis testing across code/build/runtime |
| Backend logs | profile's backend-log tool (optional) | Logs for runtime/invocation bugs |
| Drive the app | run / superpowers-chrome:browsing | Reproduce UI bugs in the running app |
| Fix | superpowers:test-driven-development | Regression test first, root-cause fix |
| Code review | /code-review | Second-eyes sweep of the fix diff (§5.4) — correctness/regression + cleanup before shipping |
| Verify | superpowers:verification-before-completion | Run gates, confirm output before claiming fixed |
| Ship | superpowers:finishing-a-development-branch | Branch → PR + cleanup |
| Situation | Action |
|---|---|
| No stack profile found | Prompt user to create docs/stack.md, or auto-detect defaults |
| Can't reproduce | Stop. Ask user for exact steps / screenshot / failing value — never guess a fix |
| Multiple feature matches | List candidates, ask which feature |
| No spec for the area | Proceed without the oracle; note diagnosis is unverified against a spec |
| Root cause is a spec error | Fix spec.md first, surface it, then fix code |
| Root cause is a frozen pattern | Surface to user — changing it needs explicit authorization |
| Red test won't fail | The test doesn't capture the bug — revise reproduction before fixing |
/code-review gate (§5.4) finds a correctness/regression blocker | Fix it test-first (back to step 4) before the PR; re-run [VERIFY] + the suite and re-review until clean |
/code-review surfaces a stop-class boundary the diagnosis gate missed | Re-gate (step 3) before crossing it; never auto-apply a stop-class fix with --fix |
| Fix needs a schema change | Stop — schema changes need explicit user approval |
| Fix crosses a security/auth boundary or touches secrets | Stop — classify it in the gate's stop-class check; get explicit approval for the boundary crossing, not just "a fix" |
| Root-cause fix is a one-way door (data model, public API/contract, architecture — hard to reverse / costly to refactor) | Flag it at the gate as one-way; prefer the smallest reversible fix that fixes the root cause; cross only with explicit approval. If discovered mid-fix, re-gate |
No live user to approve the gate (/loop) | Stop at the gate; queue the diagnosis + proposed fix; never auto-apply (non-code bleed mitigations still allowed) |
| User rejects the proposed fix | Revise diagnosis or hand off; do not implement |
/code-review, §5.4) ran over the fix diff; correctness/regression blockers fixed and re-verified, no stop-class fix auto-applied (re-gated if one surfaced)PASS, or BLOCKED with explicit go-ahead) — if the gate is enabledWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub miroo93/dev-workflows --plugin dev-workflowsOther plugins' skills for the same job
17 skills in this plugin
/analyzeRun a read-only cross-artifact consistency check across spec.md, plan.md, and tasks.md for the current feature, before implementation. Defers to your project's spec tooling (e.g. GitHub Spec-Kit's /speckit-analyze) if installed./checklistGenerate a requirements-quality checklist ("unit tests for the requirements") for the current feature on a chosen dimension like security, ux, or api. Defers to your project's spec tooling (e.g. GitHub Spec-Kit's /speckit-checklist) if installed./e2e-smokeInternal skill invoked by /feature, /improve, /troubleshoot to run a local real-browser smoke check against the running app and return PASS/FAIL/BLOCKED. Not user-invocable.