claude-code-workflow: Command for Claude Code

.claude/commands/bug-check.md

bug-check is a command for Claude Code from Caspian-Sun/claude-code-workflow. It costs 0 tokens per session (2,215 once invoked), scanned A, original, MIT.

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

Written for Claude Code: $ARGUMENTS substitution.

This is Caspian-Sun/claude-code-workflow's own configuration. It tells Claude Code how to work on claude-code-workflow itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-code-workflow configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/Caspian-Sun/claude-code-workflow/main/.claude/commands/bug-check.md
Clone the repo
git clone --depth 1 https://github.com/Caspian-Sun/claude-code-workflow

Made for: Claude Code.

Wrote 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.

agentmods badge for bug-check

README.md
[![agentmods](https://agentmods.dev/badge/commands/caspian-sun/claude-code-workflow/bug-check/github.svg)](https://agentmods.dev/commands/caspian-sun/claude-code-workflow/bug-check)
Your own site
<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.

agentmods 80×15 button for bug-check

Your own site · 80×15
<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>
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. A grade says what 26 rules found in the file — not that it is safe.
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.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

Measured 2mo ago against content hash 5f61f06a114c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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.

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