bug-check

A bug-report triage assistant that decides whether a report describes a real bug, a missing product rule, or behavior that is already correct, then turns valid reports into a standard format.

In plain words
What is it for?
Use it to validate existing bug-report files, normalize a short verbal description or error into a report, check required fields and code references, and prepare reports for the bug-fixing assistant.
Why use it?
It prevents the fixing process from acting on feature requests or misunderstandings and checks that reports contain enough detail for someone to reproduce the problem.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/caspian-sun/claude-code-workflow/bug-check
Clone the repo
git clone --depth 1 https://github.com/Caspian-Sun/claude-code-workflow

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,215 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.02215
Opus 5 $0.00000 $0.01107
Sonnet 5 $0.00000 $0.00443
Haiku 4.5 $0.00000 $0.00221

Measured 2d ago against content hash 5f61f06a114c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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 2d 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.

.claude/commands/bug-check.md · 188 lines

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:

  1. Triage: Determine whether this is a real bug or a feature request / missing rule (the latter should not enter /fix)
  2. Normalize: Solidify the input into a structured report conforming to docs/bug-reports/_template.md
  3. 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

  1. 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.md to validate format
  2. Mandatory pre-check for /fix/fix must run this command first; if it fails, do not enter the fix phase
  3. 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?

  1. Extract keywords from the input (module / feature / action / expected result)
  2. grep docs/prds/ to find the most relevant PRD, then look for the "Business Rules" section
  3. 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

Read the full file on GitHub · 188 lines

Changes

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.

  1. 2d ago First seen · 188 lines · 0 tokens per session scan A 5f61f06a114c

Subscribe to this mod's changes

bug-check is a command published in the GitHub repository Caspian-Sun/claude-code-workflow (10 stars, last pushed 5d 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.