Borrowing it
Nothing to install: this file belongs to Caspian-Sun/claude-code-workflow. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Caspian-Sun/claude-code-workflow/main/.claude/commands/bug-check.mdgit clone --depth 1 https://github.com/Caspian-Sun/claude-code-workflowWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/caspian-sun/claude-code-workflow/bug-check)<a href="https://agentmods.dev/commands/caspian-sun/claude-code-workflow/bug-check"><img src="https://agentmods.dev/badge/commands/caspian-sun/claude-code-workflow/bug-check/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/caspian-sun/claude-code-workflow/bug-check"><img src="https://agentmods.dev/badge/commands/caspian-sun/claude-code-workflow/bug-check.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.02215 |
| Opus 5.5 | $0.00000 | $0.00886 |
| Sonnet 5.5 | $0.00000 | $0.00443 |
| Haiku 4.5 | $0.00000 | $0.00221 |
Grade A, and why
bug-check scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 188 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are now a bug triage + normalizer. For the given bug description, perform three tasks:
- Triage: Determine whether this is a real bug or a feature request / missing rule (the latter should not enter
/fix) - Normalize: Solidify the input into a structured report conforming to
docs/bug-reports/_template.md - Validate: Check if all required fields are present, anchors exist, and no forbidden content is included
Downstream /fix always only accepts "normalized reports produced by this command" — keeping the input contract single.
Applicable Scenarios
- User self-checks a bug report in real time — after a testing AI or manual review writes one, run
/bug-check @docs/bug-reports/xxx.mdto validate format - Mandatory pre-check for
/fix—/fixmust run this command first; if it fails, do not enter the fix phase - Entry point to solidify verbally described bugs —
/fix <one-liner>will first delegate to this command to solidify a report, write it to disk, then let the user review it
Input
| Input | Mode | Behavior |
|---|---|---|
@docs/bug-reports/xxx.md |
Batch | Validate only, do not rewrite |
| Free text (one-liner / error stack / repro description) | Interactive | Ask follow-up questions → solidify to file → stop for user review |
| No arguments | — | Stop and ask: "Please describe the bug or specify a report path" |
Step 1: Triage (bug vs. missing rule vs. feature)
Core question: Is the "expected behavior" described by the user already defined in the PRD?
- Extract keywords from the input (module / feature / action / expected result)
- grep
docs/prds/to find the most relevant PRD, then look for the "Business Rules" section - Route based on the table below:
| Situation | Verdict | Action |
|---|---|---|
| Description contains "add / increase / I want / support XX feature" | Feature request | Stop, suggest /prd <description>, do not enter /fix |
| PRD has a clear business rule, but code implementation does not match | ✅ Real bug | Proceed to Step 2 |
| PRD does not cover this scenario (timeout / exception / new boundary) | Missing rule, not a bug | Stop, suggest "run /prd to add the rule first, then /prd-check, then /plan, then /code" |
| PRD has a rule but it's ambiguous, multiple interpretations | Unclear | In interactive mode, stop and ask PM; in headless mode, output [BLOCKED] listing candidate interpretations |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 188 lines · 0 tokens per session scan A 5f61f06a114c
bug-check is a command published in the GitHub repository Caspian-Sun/claude-code-workflow (10 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,215 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
cleanup
Comprehensive code cleanup using Knip and best practices for codebase maintenance.
api
Debug API and data flow issues by tracing through Component -> TanStack Query -> Hono Route -> Service -> SQLite/JSONL.
logs
Analyze server logs to diagnose errors, exceptions, and unexpected behavior.
performance
Diagnose performance issues including slow renders, bundle size, N+1 queries, and memory leaks.
data
Inspect database and state files to debug data issues.
browser
Debug and fix browser issues by inspecting, diagnosing, and resolving visual or technical problems.