bugclass

bugclass is a command for Claude Code from 0xSoftBoi/suwappubot. It costs 39 tokens per session (455 once invoked), scanned A, original, Apache-2.0.

A command for treating one confirmed bug as an example of a wider bug pattern. It reproduces the bug with a failing test, fixes it, searches for similar cases, and handles them individually.

In plain words
What is it for?
Use `/bugclass` to find, test, fix, and commit related bugs across a repository.
Why use it?
It prevents fixing only the first visible instance when the same mistake may exist elsewhere in the codebase.

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/0xsoftboi/suwappubot/bugclass
Clone the repo
git clone --depth 1 https://github.com/0xSoftBoi/suwappubot

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 bugclass

README.md
[![agentmods](https://agentmods.dev/badge/commands/0xsoftboi/suwappubot/bugclass.svg)](https://agentmods.dev/commands/0xsoftboi/suwappubot/bugclass)
Your own site
<a href="https://agentmods.dev/commands/0xsoftboi/suwappubot/bugclass"><img src="https://agentmods.dev/badge/commands/0xsoftboi/suwappubot/bugclass.svg" alt="Measured on agentmods" height="20"></a>
Per session 39 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 455 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.00039 $0.00455
Opus 5 $0.00019 $0.00228
Sonnet 5 $0.00008 $0.00091
Haiku 4.5 $0.00004 $0.00046

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

Security

Grade A, and why

bugclass 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 4d 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/bugclass.md · 31 lines

What it actually says

Bug-Class Elimination

Formalizes the pattern that produced the best sessions here: root-cause one crash, then sweep for its siblings (one chart crash → seven patched null-guard sites).

Input: $ARGUMENTS — one confirmed bug. If empty, ask for it; do not guess.

Step 1 — Reproduce first

Write a failing test that reproduces the bug before touching any source. If you can't make it fail, you haven't understood it — stop and say so.

Step 2 — Fix minimally

Fix, confirm the test passes. One focused commit.

Step 3 — Name the class

Articulate the bug class in one sentence (e.g. "chart render paths assume unique timestamps", "null-unguarded access on optional API fields"). This sentence is the search spec.

Step 4 — Sweep

Dispatch scout (haiku) to grep/AST-search both stacks for every other instance. Write results to .progress/bug-class-queue.md with file:line + risk rating. This file is the durable state — an interrupted session resumes from it.

Step 5 — Work the queue, one item at a time

For each entry: reproducing test → fix → full suite → one focused commit per instance with a message naming the instance.

  • Update .progress/bug-class-queue.md after every single item (done / skipped / needs-human).
  • Bash timeout of at least 600000 ms on test runs. A slow suite is not a hang.
  • If a fix needs a design decision or would balloon into a refactor: skip it, log under NEEDS HUMAN, move on. Do not expand scope.

Step 6 — Report

Instances found / fixed / skipped-with-reason, total test-count delta, and whether any instance touches a money path (→ money-path-reviewer before merge).

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. 4d ago First seen · 31 lines · 39 tokens per session scan A c08aed388cf2

Subscribe to this mod's changes

bugclass is a command published in the GitHub repository 0xSoftBoi/suwappubot (3 stars, last pushed yesterday), licensed Apache-2.0. It adds 39 tokens to every session and 455 once invoked, about $0.0002 per session on Opus 5. 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-30.