/flagrare:debug-huntfrom Flagrare
Evidence-first debugging for hard-to-reproduce, intermittent, or performance bugs. Loops hypothesis to instrument, reproduce, analyze, fix until goal met. Uses ATDD when tests exist.
Ships in Flagrare. 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.
Evidence-first debugging. The core principle: never commit to a fix until runtime data proves the root cause.
Static analysis tells you what should happen. Logs, spans, and runtime state tell you what actually happens. This skill closes the gap by treating debugging as a scientific loop, hypothesis, instrumentation, reproduction, analysis, not a guessing game.
Invoke /goal with this statement (fill in the bug from the user's description):
Goal:
[bug description]no longer reproduces. The root cause is confirmed by runtime evidence, not assumption. If the codebase has tests, a failing test captured the bug before the fix and passes after. All instrumentation is removed. The codebase is clean.
Surface the goal back to the user in one sentence so they can adjust scope before the loop starts. This is the exit condition, the entire session runs until these conditions hold.
Gather facts before reading any code.
Collect:
Exploration option:
If the bug involves observable behaviour in a running instance, a UI glitch, a wrong API response, a timing issue, degraded performance, offer to invoke /flagrare:smoke-test to surface evidence against the live system. Use AskUserQuestion:
After gathering facts:
Read the relevant code to understand the theoretical execution path. Then generate 2-4 plausible hypotheses. Be specific: "variable userId is null before the null-check on line 47" is a hypothesis; "something is null" is not. Each hypothesis needs a falsifiable condition, what would you see in the logs if this were true?
Hold all of them. Do not commit to one.
Before writing a single log line, check whether the codebase already contains a working implementation of the same pattern. A large class of bugs, wrong argument order, missing option, skipped step, is visible in a side-by-side comparison without any runtime evidence.
Search for:
Compare working vs. broken:
If the diff reveals the root cause directly: skip to Phase 5, Resolution. No instrumentation needed.
If no working examples exist, or the comparison is inconclusive: carry any hypotheses the comparison generated into Phase 3.
Design a logging strategy that proves or disproves each hypothesis. The goal is surgical: high-signal, low-noise, temporary.
For each hypothesis, decide:
Apply the instrumentation. Route logs to wherever the user can see them: console, file, stderr, a debug flag. Tag every inserted log line with [DEBUG-HUNT], this prefix exists solely so cleanup in Phase 6 is fast and complete.
Instrumentation principles:
[DEBUG-HUNT] userId=null checkPassed=false) is faster to parse than proseTell the user exactly how to trigger the bug with the new instrumentation in place. Be specific: what to do, in what order, and, for intermittent bugs, how many attempts to make.
Wait. Do not proceed until the user confirms they have triggered the bug and has log output to share.
Analyze the logs against the hypothesis list:
If the logs are inconclusive: do not guess. Re-enter Phase 3 with refined instrumentation. Before adding more logs, state explicitly what the previous round failed to reveal and why, this keeps the instrumentation from growing into noise.
If the bug does not reproduce even with instrumentation: document the exact conditions under which it failed to fire. That is evidence too, adjust the hypothesis list and try again under different conditions or with instrumentation placed earlier in the path.
Root cause is now confirmed by evidence. Fix it.
Check for an existing test suite: package.json test scripts, pytest.ini / pyproject.toml, go.mod with a test target, Makefile test rules, or tests/ / spec/ / __tests__/ directories.
If a test suite exists, invoke /flagrare:atdd-plan to produce an ATDD-first fix plan. The plan must include an acceptance test that:
This matters because a fix without a test is a fix that can silently regress. The acceptance test is the permanent proof that the bug is gone and stays gone.
Wait for the ATDD plan to be approved before writing any implementation code.
Apply the smallest possible fix targeted at the confirmed root cause. Do not refactor surrounding code. Do not clean up unrelated things. A debugging session is not a cleanup pass, one root cause, one fix.
Verify first, before removing any instrumentation.
Ask the user to trigger the same scenario again with the fix applied. The [DEBUG-HUNT] logs should still be present so you can see what the runtime state looks like after the fix.
If the bug still reproduces: do not remove instrumentation. The hypothesis was incomplete. Re-enter Phase 1 with the new evidence from the failed fix attempt as additional input. If Phase 2 pattern analysis was skipped, run it now, the fix attempt may have surfaced a comparison worth making.
If the bug no longer reproduces: proceed to cleanup.
Cleanup:
Remove every line tagged [DEBUG-HUNT]. Remove any temporary logging, debug flags, or test utilities added during this session. Leave the codebase exactly as it would have been if the bug had never existed, except with the fix, and (if applicable) the ATDD acceptance test.
If a test suite exists, run it. Confirm it passes clean before declaring done.
The goal set in Step 0 is met when all of the following hold:
[DEBUG-HUNT] instrumentation is removedThe goal is not met until every condition holds. Partial credit does not exist.
[DEBUG-HUNT] tag exists for one reason: so you can find and remove everything cleanly.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub flagrare/agent-skills --plugin flagrare43 skills in this plugin
/atdd-planProduce an ATDD-first implementation plan in Claude Code's native plan mode, with named design patterns called out where they earn their keep. The skill enters plan mode automatically (via the EnterPlanMode tool), runs /flagrare:codebase-explore to ground the plan in the actual codebase, then produces a plan-mode plan that MUST include both: (1) 3-5 acceptance tests in plain English defining 'done' before any implementation, written behavior-first against the public API only; and (2) any non-trivial structural decisions named as design patterns with a one-line rationale. Plan mode's native approve/edit/reject button UI is the close, ExitPlanMode is how the skill ends. Use whenever the user wants to plan a feature, fix, or refactor, 'how should we implement X', 'plan this', 'let's design X', 'where do we start on Y'. Tests follow Kent Dodds Testing Trophy: behavior over implementation, integration-heavy, public-API-only, refactor-proof. The skill stops at the plan; it does not write implementation code./brag-docGenerate a comprehensive, impact-framed brag-doc entry for a chosen time window (day, week, biweek, month, or custom). Pulls authored PRs, reviews given, commits, deploys, and linked tickets across GitHub, local git, and configured MCPs, then synthesises a themed narrative, leading with outcomes, quantifying impact, owning the work in first-person past tense, separating IC contributions from amplification, and naming the judgment exercised. Output is designed to drop straight into a developer journal, a personal bragging sheet, or a performance-review packet. Accepts a mode argument, `/flagrare:brag-doc resumancer` renders the output as ready-to-paste Resumancer CLI commands (`resumancer impact "..." --branch ...`) instead of markdown. Use whenever the user says "brag doc", "brag sheet", "what did I do this week", "weekly recap", "monthly recap", "performance review prep", "what should I tell my manager", "summarise my impact", "career log entry", "give me my wins", "biweekly recap", or any variant about looking back over a longer window than a single day's standup. Also trigger near review season ("self-review", "perf packet", "evaluation prep"), and on phrases like "log my wins to resumancer" or "make resumancer entries for this week" (which should pass the `resumancer` mode). For windows longer than about a month, a tenure retrospective, a departure record, or "everything I did at this company", hand off to `/flagrare:impact-timeline` instead; this skill's window tops out at a month./bug-bashProgrammatic bug bashing, ingest a prescribed test plan (Notion, markdown, pasted spec), drive a real running system (browser via Chrome DevTools / Playwright MCP, backend via API tools when relevant), run every prescribed case with evidence, then do exploratory passes (viewports, edge inputs, multi-actor flows, codebase-driven concerns, additional context like meeting transcripts, emails and links checked in the real inbox with a control case, other languages, failures and races) without ever claiming a bug it didn't itself reproduce. Fills free-text fields with tagged, playful test data that also probes something (unicode, HTML, template syntax, length). Lands results in a local MD file by default, optionally writes back to the source (Notion bug DB, test case Eng QA columns, etc.) in the user's voice. Use whenever the user says 'bug bash', 'QA this feature', 'run the test cases', 'go through this test plan', 'verify these scenarios', 'do a bash on X', when they hand over a Notion test case page, or any time programmatic end-to-end verification of a feature against a checklist is needed. Also use it when a smoke test passed but the user wants more cases tested, or asks 'what else should we test' and then 'test it yourself'. Make sure to use this skill even when the user just says 'test this Notion page' or 'check these scenarios', anything that smells like running someone else's prescribed test plan against a live system./careerRun the career skills that are due, in one pass, and return one short combined digest plus an updated board. It reads timestamps and flags to decide: the promotion map's first run when there is none (after asking), a refresh of map sections that are older than 90 days or flagged by a scan, an opportunity scan when the last one is a month old, and an impact scan every time. The digest leads with the initiative the user owns and its next step, then up to 5 threads worth weighing in on, one line on the promotion map (open rubric rows, people who haven't seen the work, when to talk to the manager, the packet deadline), anything that needs the user, and an "all answering, nothing owned" warning when the user keeps replying but owns nothing. A scheduled run (from /loop or a schedule) never asks questions and never posts; it lists what needs the user as pending. Use when the user says "career", "career check", "career digest", "run my career skills", "what should I do for my promotion this week", "daily career scan", or sets up a recurring career run. Also trigger for a scheduled career run./codebase-exploreExplore the codebase to map conventions, reusable utilities, analogous features, and data flows relevant to a planned change. Returns raw findings (file paths, patterns, code snippets), does NOT produce a plan. Used by /flagrare:atdd-plan as its codebase understanding step./communication-setupSet up, change or remove how Claude talks to you: a custom output style with your reply rules, a reminder of those rules on every message, and a Stop hook that quietly nudges Claude when a reply runs a little long and blocks one that runs far past your limit. Use when the user says Claude's replies are too long, exhausting, hard to skim, full of process narration or caveats, 'you make me work for the information', 'talk to me shorter', 'communication setup', 'set up how you talk to me'; when the length check or reply-length hook blocked a reply it shouldn't have, or the user wants a different limit or style; or asks to remove or undo it ('remove communication setup', 'go back to normal replies').Other plugins' skills for the same job