/kyant:diagnosing-bugsfrom kyant
Investigates reported bugs, failing tests, unexpected behavior, and performance regressions by building evidence for the cause and verifying the original symptom before fixing.
Ships in kyant. 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; scripts run unread.
Adapted from Matt Pocock's diagnosing-bugs for the shared Claude Code/Codex workflow.
Use this as the primary debugging workflow. Do not also run systematic-debugging. Follow the shared W13 evidence standard even when no fix is requested. Scale the work to the uncertainty and consequence: a small deterministic bug may need one focused check, while an intermittent or cross-system failure needs deeper investigation. Do not turn routine debugging into mandatory planning.
Read the relevant project instructions, issue decisions, and existing architecture notes before interpreting behavior. Follow the project's documentation paths; do not create a parallel spec or incident journal.
Separate the user's reported symptom, your direct observations, and your hypotheses. Record expected versus actual behavior and the relevant input, revision, environment, and timing. Cite only evidence you actually inspected; preserve attribution when a result comes from the user or another agent.
Inspect callers and state transitions to identify a useful measurement point. Early hypotheses are allowed to guide investigation, but remain unverified until supported. A suspicious function or stack frame alone does not prove the cause.
For read-only review, inspect valid inputs, reachable callers, guards, and the violated contract. A deterministic code-path proof can establish a defect without running the application. Explain separately whether evidence connects that defect to the reported incident. Keep uncertain candidates outside the confirmed findings list.
Prefer a repeatable check that exercises the actual failing path and detects the user's exact symptom. Use an existing focused test, CLI/HTTP reproduction, captured trace replay, or a small isolated harness as appropriate. Check the behavior, not merely that execution avoids crashing.
Run against the unfixed code when available. Show the command or precise manual steps and the relevant observed output. A failed setup, missing credential, or unrelated exception is not reproduction of the reported bug.
Make the check faster and more deterministic where useful. Reduce inputs, configuration, and steps while preserving the failure; stop minimising when you can distinguish causes and verify the fix. There is no mandatory runtime or perfect-minimality threshold.
If reproduction is unavailable, state what was tried and what evidence is missing. Continue useful read-only inspection and analysis of existing logs/traces. Ask for the smallest missing artifact or access only when needed; do not claim confirmation or a verified fix without adequate evidence. Failure to reproduce does not prove there is no bug.
Choose a hypothesis and state a prediction that could disprove it: "If X causes the symptom, changing or observing Y should produce Z." Consider plausible alternatives when ambiguity remains; do not invent a fixed number of hypotheses for an obvious defect.
Use a targeted probe, breakpoint, trace, or minimal experimental change that distinguishes the alternatives. Change one causal variable at a time where practical. Tag temporary instrumentation for reliable cleanup. Share meaningful predictions and results without requiring another approval for already authorized work.
Connect the trigger, execution path, and failure with evidence. Prefer a controlled comparison where removing the suspected cause removes the symptom under the same conditions, or a trace/code-path proof that rules out the relevant alternatives. A workaround that suppresses the symptom may not establish the underlying cause.
If the result contradicts the prediction, revise or reject the hypothesis instead of stacking fixes. If successive probes stop producing useful evidence, reassess the reproduction and assumptions and report the gap. Failed attempts alone do not prove an architecture problem.
Implement a focused fix once the causal evidence supports it and the task authorizes edits. Keep diagnostic experiments distinguishable from a verified fix.
When a regression test can exercise the real failure pattern at its callers, write it before the fix and observe the expected failure. Assert the intended behavior independently of the implementation. Avoid a shallow mock test that eliminates the very interaction or timing needed for the bug.
If no suitable automated test is available, explain the specific coverage gap and use the strongest available reproduction or trace evidence. Do not infer an architecture defect merely because you have not found a test boundary; any such finding needs its own evidence. A proposed or applied change remains unverified until its relevant check succeeds.
After the fix, rerun the original scenario as well as any reduced reproduction, then run the relevant regression checks. State the result and its limits: a mock passing is not production proof, and a code defect fixed is not automatically an incident explained. Passing unrelated tests or a build does not confirm the cause.
If an authorized mitigation is needed before the cause is established, identify it as a mitigation and keep the root cause unverified. Do not represent reduced symptoms as a proven root-cause fix.
Remove only the temporary instrumentation and scratchpad artifacts you created. Preserve other sessions' changes. Reverify if cleanup changes executable behavior.
Report concisely: confirmed cause or unverified hypothesis, supporting evidence, change made if any, verification result, and remaining gap. Include only the relevant redacted command/output excerpts. Record the established cause and evidence in the existing issue or commit/PR when that action is within scope; do not create a separate report or start an architecture workflow automatically.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub mxrsv/agents-skills --plugin kyant8 skills in this plugin
/kyant-intentFind out what the user actually wants before any plan, spec or code exists, when an ask hits a W1 threshold with unclear intent or the user calls /kyant-intent. Runs Read → Ask → Dig → Stop → Lock, one question per turn with a guess attached, until ~95% confidence; ends in a restate the user confirms. Pre-decision only; to stress-test a plan or decision that already exists, use grilling./kyant-kanbanWork with the owner's task vault (Tolaria vault `kanban`) in four moves — create a task note, start a task from its note, close a task as Done, reconcile notes with GitHub issues. Use when the owner says "thêm vào kanban", "lưu task này", "làm task X", "đóng task", "sync kanban", names a note in the vault, or asks what is on the board. Procedure only; the schema lives in the vault's AGENTS.md./quality-gatesRouter for UI and code quality gates — study how a reference repo enforces quality, measure a lint rule's noise before enabling it, install lint/test gates (suppression reasons, unreasoned skips, shadcn/Tailwind design-system checks, focus-ring and import boundaries), define a shared UI control that owns its look, capture light/dark state sheets for eye review, and review a UI diff for what lint cannot see. Use when setting up quality checks in a project, adopting a UI preset or registry, adding or reshaping a shared control, a feature restyling a shared component with its own class, changing focus or selection styling, or before committing UI changes. Not for building a screen or judging its look (kyant-ui-rules and the owner's eye)./scaffold-projectScaffold a new project repo end to end — official generator, folder layout from the global structure template, lint/format, AGENTS.md, first commit, verified build. Use when the user wants to start, init, bootstrap or create a new app/repo. Covers Next.js App Router today; other stacks follow the structure template and ask first. Not for adding a framework to an existing repo./tidy-gitGit hygiene for a user who rarely opens git or GitHub — summarize the dirty worktree and open PRs/issues in one picture, then commit, merge ready PRs or close done issues via `git`/`gh` after one approval. Use for "tidy", "dọn", "worktree bẩn", "diff lộn xộn", "merge PR", "còn PR/issue nào mở", "commit push đi", "push all code diff", "merge vào main đi", or at the end of a session with uncommitted work or an open PR. Not for code review (built-in /code-review), PR content (CLAUDE.md branching) or `.issues/` files (gh-issue-sync)./write-internals-docWrite or tighten an architecture/internals page that records decisions, cross-module constraints and traps — only what a maintainer would otherwise get wrong. Use when a change leaves behind a reason that is not visible in the code, when an internals or traps page is edited, or when a doc has grown into a file catalog. Not for user guides, runbooks, specs or plans.Other plugins' skills for the same job