/fw:debugfrom fw
Investigate hard bugs, regressions, stack traces, or broken behavior with evidence, a repro loop, causal proof, and a fix path.
Ships in fw. 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.
Read when SKILL.md points to them.
$fw:debug is the Flywheel bug-investigation path.
Use it for failures, regressions, stack traces, broken behavior, nondeterministic
failures, and performance regressions where the first job is diagnosis. If the
work is live operational response and rollback versus patch is still undecided,
start with $fw:incident. If the goal is general latency, throughput, memory,
query, build, or cost improvement rather than a regression, use $fw:optimize.
The goal is not to guess a fix. The goal is to build the fastest faithful feedback loop, prove the causal chain, fix through a red signal when a local fix is responsible, and route deeper design or architecture problems before they become the next bug.
When directly invoked, always debug. Do not skip to code changes just because the failure looks obvious.
<bug_input> #$ARGUMENTS </bug_input>
Interpret the input as:
Follow ../references/host-interaction-contract.md.
Call the exact host question tool named in
../references/host-interaction-contract.md when that tool is available. Do
not ask for raw 1/2/3 replies when the host already offers a choice surface.
When the debug pass spans multiple material steps, use the host task-tracking
tool named in ../references/host-interaction-contract.md to create and
maintain a short task list.
Do not preload every support file. Load only what the current investigation needs:
../tdd/SKILL.md before implementing a local bug fix unless the red
signal is a non-test executable proof such as a CLI command, replay, or
manual fixture.$fw:incident when a live or recently live issue still needs blast
radius, mitigation, rollback, or patch framing.$fw:observability when the investigation exposes missing telemetry,
trace, dashboard, metric, or supportability signals.$fw:logging when the main gap is log-event shape, field stability, or
correlation.$fw:architecture-strategy, $fw:maintainability,
$fw:pattern-recognition, or $fw:simplify when the proven root cause is a
boundary, ownership, pattern, coupling, or accidental-complexity problem.$fw:decision when the fix contradicts a durable product, workflow,
architecture, terminology, or compatibility decision.$fw:verify discipline before claiming the bug is fixed.$fw:spin after the fix is verified.If the input includes an issue reference, fetch it before investigating.
GitHub forms to recognize:
#123owner/repo#123https://github.com/<owner>/<repo>/issues/<number>When GitHub CLI is available, use gh issue view with structured output and
extract:
If the input points at another tracker URL or identifier, use whatever local tooling or available app surfaces can fetch it. If the issue cannot be fetched, ask the user to paste the relevant content rather than pretending the report was read.
Capture the bug frame before touching code:
Read .flywheel/config.local.yaml when present and carry forward local debug
gates such as debug.require_reproducer_before_fix.
If the issue is live, the blast radius is not bounded, or rollback versus patch
is still a decision, route to $fw:incident before local bug-fix work.
This is the center of the skill. Spend disproportionate effort here.
Search the active repo's docs/solutions/ before deep investigation when it
exists:
files_touched, module, tags,
problem_type, component, and titledoc_status: activesuperseded_by, follow that path firstConstruct the fastest faithful loop that reproduces the user-visible failure. Try these in roughly this order:
git bisect run when practical.Treat the loop itself as a product:
A 30-second flaky loop is weak. A two-second deterministic loop is leverage.
For nondeterministic bugs, the immediate goal is a higher reproduction rate. Loop the trigger, parallelize when safe, add stress, narrow timing windows, seed randomness, inject sleeps, or isolate scheduler and IO boundaries. A bug that reproduces 50% of the time can be debugged; a 1% failure needs a stronger loop before root-cause work starts.
For performance regressions, create a baseline measurement before changing code: timing harness, profiler, query plan, flamegraph, allocation profile, browser trace, or benchmark. Measure first, fix second.
If no credible loop can be built, stop and say so explicitly. List what was tried and ask for the missing access or artifact: a reproducing environment, HAR file, log dump, trace, core dump, database snapshot, screen recording with timestamps, or permission to add temporary instrumentation. Do not proceed to hypothesize a fix without a loop or a clearly bounded no-loop diagnostic.
Run the loop and watch the bug appear.
Confirm:
Read the relevant code path in both directions:
For data or state bugs, preserve a redacted fixture or state summary that lets the failure be replayed. Do not mutate production state to make diagnosis easier.
Generate 3-5 ranked hypotheses before testing any of them. Single hypotheses anchor too early on the first plausible idea.
Each hypothesis must be falsifiable:
If <cause> is responsible, then <probe or change> will produce <specific result>.
Reject or sharpen any hypothesis that cannot state a prediction.
When interaction is useful, show the ranked list before testing so the user can add domain facts, recent deploy knowledge, or already-ruled-out attempts. Do not block indefinitely; proceed with the best ranking if the user is unavailable.
Each probe must map to one prediction from Phase 3. Change one variable at a time.
Prefer tools in this order:
Never "log everything and grep."
Tag every temporary debug log or probe with a unique prefix such as
[DEBUG-a4f2]. Cleanup must be a single search.
For distributed, async, queue, retry, cache, or concurrency bugs, probe boundaries explicitly: correlation IDs, ordering, idempotency keys, lock state, retry attempts, queue offsets, cache keys, clock assumptions, and timeout paths.
If the investigation turns into telemetry or instrumentation design, load
$fw:observability or $fw:logging instead of inventing a support strategy
from memory.
Before editing production code, state:
docs/solutions/ entry was confirmed, rejected, or only
partially applicableIf that chain cannot be stated yet, keep investigating.
Use this route when the bug is local enough to fix responsibly now.
If local policy requires a reproducer before implementation and no red failing test or equivalent reproducer exists, do not implement. Keep investigating until the red signal exists or route the work upstream.
Use this sequence:
../tdd/SKILL.md unless the reproducer is a non-test executable proof
such as a CLI command, replay, or manual fixture.$fw:verify discipline before
claiming the bug is fixed.A correct regression seam exercises the real bug pattern as it occurs at the call site. If the only available seam is too shallow, over-mocked, or unable to replicate the chain that triggered the bug, do not lock in false confidence. Document that as an architecture finding.
Use this route when:
In that case:
$fw:architecture-strategy for boundary or service-shape issues$fw:maintainability for unclear ownership, cohesion, naming, or
future edit cost$fw:simplify when accidental abstraction or orchestration is the
core problem$fw:brainstorm when the desired behavior or scope is still unclear$fw:plan when the behavior is clear but execution needs redesign$fw:decision when a durable decision must be reopenedDo not paper over the bug with a local workaround when the causal proof says the architecture is the problem.
Required before declaring done:
[DEBUG-...] instrumentation and search for the prefixIf the answer is durable and repo-specific, offer $fw:spin after verification
so the next debugging session can find the lesson in docs/solutions/.
Return:
If no credible feedback loop exists yet, return the attempted loops, the reason each failed, and the specific artifact or access needed next.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub mopeyjellyfish/flywheel --plugin flywheel32 skills in this plugin
/architecture-strategyAssess repo-grounded architecture choices and improvements. Use for boundaries, service splits, dependency direction, or distributed posture./brainstormExplore requirements and approaches. Use for a fuzzy idea, open scope, or one direction that needs sharper behavior before planning./browser-testRun browser acceptance checks with playwright-cli. Use when browser-visible behavior needs fresh proof before review or commit./commitFinish a branch cleanly. Use to verify readiness, make logical commits, push, and create or refresh a PR with evidence.Other plugins' skills for the same job