Agent skill

Fix The Class

by joetawil7 in joetawil7/first-pass

Bug-fix routine that fixes the whole class of bug, not just the reported instance.

MITAuto-check passedDevelopment

Install Fix The Class

skills CLI
$ npx skills add joetawil7/first-pass --skill fix-the-class -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install joetawil7/first-pass fix-the-class --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/joetawil7/first-pass.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/fix-the-class .claude/skills/fix-the-class && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
fix-the-class
GitHub stars
92
Token cost
~1.5k tokens
SKILL.md length
891 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
MIT

At a glance

Bug-fix routine that fixes the whole class of bug, not just the reported instance.

  • Works in 7 steps: Reproduce → Name the class → Search for the pattern → …
  • Failing production behaviour
  • SKILL.md covers 1. Reproduce, 2. Name the class, 3. Search for the pattern and 4. Pre-mortem the fix, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Fix The Class is an agent skill from joetawil7/first-pass. Bug-fix routine that fixes the whole class of bug, not just the reported instance. Use for any bug report, failing production behaviour, monitoring alert, audit finding or review finding that does real harm (a smaller review finding goes on the item's list, as ship-check says), and whenever the same kind of bug has been seen before. Reproduces it with a failing test, names the failure class, searches the task's scope for the same pattern (the whole codebase when the user's own prompt asks for the fix, not when it…

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Code review, Debugging and QA and bug reports. The repository describes itself as: Rules and checks that make Claude Code look around a change, not just at the lines it writes: ten questions before code, a reviewer that didn't write it, proof before done, bugs… The licence is MIT.

When your agent uses it

  • Failing production behaviour
  • Monitoring alert
  • Review finding that does real harm (a smaller review finding goes on the items list
  • As ship-check says)

Example prompts

  • “s scope for the same pattern (the whole codebase when the user”
  • “/fix-the-class”

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Reproduce
  2. Name the class
  3. Search for the pattern
  4. Pre-mortem the fix
  5. Fix or record every hit
  6. Make it hard to do again
  7. Finish with ship-check

What it can do on your machine

Read from SKILL.md and the folder at commit 2d3e839. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Fix The Class loads about 1.5k tokens when it runs. Until then it costs about 166 tokens; SKILL.md has 891 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~166
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from joetawil7/first-pass at commit 2d3e839, republished under its MIT licence (© joetawil7). 891 words, ~1,523 tokens.

Download SKILL.mdSave it as .claude/skills/fix-the-class/SKILL.md (or your agent's skills folder).
name
fix-the-class
description
Bug-fix routine that fixes the whole class of bug, not just the reported instance. Use for any bug report, failing production behaviour, monitoring alert, audit finding or review finding that does real harm (a smaller review finding goes on the item's list, as ship-check says), and whenever the same kind of bug has been seen before. Reproduces it with a failing test, names the failure class, searches the task's scope for the same pattern (the whole codebase when the user's own prompt asks for the fix, not when it is picked from a task's list), fixes or records every hit, and adds the rule, invariant, helper or check that stops it coming back.

fix-the-class

A fix that guards only the spot where the bug was found invites the same bug in the next feature. Audits that find the same bug twice are the sign. Fix the instance, then the class.

1. Reproduce

Write a test that fails the way the report says, at the lowest layer that reproduces it end to end (see ship-check step 2). No test, no fix: if it cannot be reproduced, say what was tried and stop.

2. Name the class

Which pre-mortem question did the original change fail? Twice, halfway, outside call, failure-is-not-empty, neighbors, endings, money, hostile user, words, scale and time. Which invariant in INVARIANTS.md does it break? If none fits, the invariant is missing: draft it.

State the pattern in one sentence that can be searched for, for example:

  • "a status check outside the transaction that then writes" (twice)
  • "a done-marker saved before the work" (halfway)
  • "a vendor call with no timeout" or "a committing call retried on 5xx" (outside call)
  • "a query result checked for loading but not for error" (failure is not empty)
  • "the delete path skips what the disconnect path releases" (neighbors)
  • "a refund with no record of which charge it refunds" (money)

3. Search for the pattern

Search the task's scope for other instances (the rules' "Stay in the task's scope"): the code it covers, everything that reads or writes the same data, and in a main folder every repo the workspace section says shares that code, data or vendor (the same bug is often copied between a web app and a mobile app, or between two services calling one vendor). When the user's own prompt asks for this bug's fix, or the user lifted the scope with hulk, the scope is the whole codebase: the repo and every repo that shares its code, data or vendor. A fix the user picks from a task's end list is not such a prompt: it keeps that task's scope. Examples by class:

  • Twice: read-then-write on the same row (find then update without a lock or conditional WHERE), counts compared to limits before inserting.
  • Halfway: status = 'done' / sent = true / claimed written before the call it describes.
  • Outside call: fetch calls, HTTP client calls and SDK constructors without a timeout option; retry wrappers around calls that commit.
  • Failure is not empty: catch blocks that return [], null or a default; UI queries that read isLoading and not isError.
  • Neighbors: every writer of the field or status involved; every path that does the same job (all delete paths, all clients of the vendor, all branches by type).
  • Money: every refund or credit path; every paid call and its cap.
  • Scale and time: queries without a limit; new Date() or calendar-month math where a user's timezone or a billing period is meant.

List every hit with file:line and a verdict: same bug, safe (why), or unsure.

Show full SKILL.md (414 more words)Show less

4. Pre-mortem the fix

The fix is a change too, and it can break something the bug never touched: a lock that leaves an order stuck when the vendor fails, or a guard that also blocks a second payment the customer really meant. Before the first edit to the fix (the failing tests from step 1 come first), run the premortem skill on the fix and on the fixes planned for the other hits, sized by its own rules. Its ten questions go against the fixed code, the bug's own question included: step 2 named it for the old code, and here the answer says what now stops the bug in every form it takes (for a double charge: two tabs, a retry, two instances). If a pre-mortem of this fix was written earlier in the session, point to it and add what it does not cover: the other hits' fixes, and anything about the fix that changed since. A pre-mortem of other work, such as the feature the bug is in, does not count.

5. Fix or record every hit

  • Same bug and in scope: fix it, each with a failing-first test.
  • Same bug outside the task's scope (seen in passing, never searched for): when it does real harm, one line in the report marked "outside this task", with file:line, and a Known breaks line in that repo's INVARIANTS.md when it breaks one; nothing else is edited for it.

6. Make it hard to do again

Pick the strongest prevention that fits inside the task's scope, and propose or build it (one that would reach outside the scope is proposed in one line, not built):

  1. A shared helper that is the only way to do the thing (one vendor-call function that always sets a timeout and an idempotency key; one refund function keyed by the charge; one claim function that fails on 0 rows; one delete path used by every caller).
  2. A database constraint (a unique index that makes "twice" impossible).
  3. A check that fails CI (a lint rule or test that finds the pattern, like a vendor call without a timeout).
  4. An invariant in INVARIANTS.md, with what now holds it.
  5. A rule in the project's instruction file, as a last resort: rules are advisory, checks are enforced.

A prevention you build is part of the fix: add it to the step 4 pre-mortem before building it.

7. Finish with ship-check

Run the ship-check skill. The report adds:

Class: <pre-mortem question> / <invariant>
Pattern: <the searchable sentence>
Other hits: <n fixed, n recorded, n safe>, each with file:line
Prevention: <helper | constraint | check | invariant | rule>, and where

© joetawil7, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/fix-the-class of joetawil7/first-pass.

Open the folder on GitHubat commit 2d3e839

Compare with similar skills

Fix The Class next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Fix The Class compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Fix The Class this skilljoetawil7/first-pass92—~1.5kAutomated safety check: PassMIT
Code SolvingHoangTheQuyen/think-better122—~3.7kAutomated safety check: PassMIT
Bug FixEmeaAppGbb/spec2cloud100—~2kAutomated safety check: PassMIT
Bug To Patch GeneratorArabelaTso/Skills-4-SE253—~4.4kAutomated safety check: PassApache-2.0
Fixavibebuilder/claude-prime120—~1kAutomated safety check: PassMIT
Bug Reproduction Test GeneratorArabelaTso/Skills-4-SE253—~1.8kAutomated safety check: PassApache-2.0

Similar skills

  • Code Solving

    HoangTheQuyen/think-better

    Structured coding workflow for non-trivial code work: debug, build features, refactor, optimize, migrate and review code through 7 steps with evidence-based quality gates.

    122 GitHub stars~3.7k tokensUpdated today
    Testing & QAAuto-check passed
  • Bug Fix

    EmeaAppGbb/spec2cloud

    Lightweight entry point for fixing bugs with full traceability.

    100 GitHub stars~2k tokensUpdated 5 mo ago
    Testing & QAAuto-check passed
  • Bug To Patch Generator

    ArabelaTso/Skills-4-SE

    Generate code fixes and patches from bug reports, failing test cases, error messages, and stack traces.

    253 GitHub stars~4.4k tokensUpdated 1 mo ago
    Testing & QAAuto-check passed
  • Fix

    avibebuilder/claude-prime

    Fix bugs and broken behavior when there is enough evidence to act on a repair path.

    120 GitHub stars~1k tokensUpdated 4 mo ago
    Testing & QAAuto-check passed
  • Bug Reproduction Test Generator

    ArabelaTso/Skills-4-SE

    Automatically generates executable tests that reproduce reported bugs from issue reports and code repositories.

    253 GitHub stars~1.8k tokensUpdated 1 mo ago
    Testing & QAAuto-check passed
  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed

More from joetawil7/first-pass

All 9 skills in this repo
  • Habit Words

    joetawil7/first-pass

    Learns the words a user habitually writes to their coding agent that make its answers worse ("be 100% sure", "don't assume", "full review", "are you sure?", "all fine, right?"), from what they…

    92 GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Jev

    joetawil7/first-pass

    Sets up, checks or changes the optional Jev judge, the TypeSafe decision model that ship-check asks about review findings (is this real harm, is a small one worth fixing now, what proof does a small…

    92 GitHub stars~1.4k tokensUpdated today
    Auto-check: notes
  • Premortem

    joetawil7/first-pass

    Run before writing or changing code for any feature, bug fix or refactor that touches data, jobs, money, outside services or user-facing behaviour.

    92 GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Sharpen

    joetawil7/first-pass

    Rewrites the prompt typed after the command before any work starts, then works from the rewrite.

    92 GitHub stars~1.9k tokensUpdated today
    Auto-check: notes
  • Ship Check

    joetawil7/first-pass

    The definition of done. An agent skill from joetawil7/first-pass.

    92 GitHub stars~4.1k tokensUpdated today
    Auto-check passed
  • Setup First Pass

    joetawil7/first-pass

    Set up first-pass for a main folder that holds many repos, or for one repo.

    92 GitHub stars~5.2k tokensUpdated today
    Auto-check passed

Questions about Fix The Class

What does Fix The Class do?

Bug-fix routine that fixes the whole class of bug, not just the reported instance. Fix The Class is an agent skill from joetawil7/first-pass. Bug-fix routine that fixes the whole class of bug, not just the reported instance.

When should I use Fix The Class?

Fix The Class fits situations like: failing production behaviour; monitoring alert; review finding that does real harm (a smaller review finding goes on the items list; as ship-check says).

How do I install Fix The Class in Claude Code?

Run `npx skills add joetawil7/first-pass --skill fix-the-class -a claude-code`. Or copy the skill folder (skills/fix-the-class in joetawil7/first-pass) into .claude/skills/fix-the-class in your project. Claude Code loads it when a task matches its description.

How do I install Fix The Class in Codex?

Run `npx skills add joetawil7/first-pass --skill fix-the-class -a codex`. Or copy the skill folder (skills/fix-the-class in joetawil7/first-pass) into .agents/skills/fix-the-class in your project. Codex loads it when a task matches its description.

Can I use Fix The Class in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add joetawil7/first-pass --skill fix-the-class -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/fix-the-class, .gemini/skills/fix-the-class, .github/skills/fix-the-class and .opencode/skills/fix-the-class in your project.

What does Fix The Class need to run?

SKILL.md names no scripts, command-line tools or credentials: Fix The Class is instructions for the agent only.

Does Fix The Class access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Fix The Class safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Fix The Class use?

Fix The Class is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Fix The Class use?

About 1.5k tokens (SKILL.md is roughly 6.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Fix The Class?

Skills that share tags, products or a category with Fix The Class: Code Solving (HoangTheQuyen/think-better, 122 stars), Bug Fix (EmeaAppGbb/spec2cloud, 100 stars), Bug To Patch Generator (ArabelaTso/Skills-4-SE, 253 stars) and Fix (avibebuilder/claude-prime, 120 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Fix The Class?

joetawil7 (a GitHub user) maintains it in joetawil7/first-pass, which has 92 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 8, 2026.

Source: joetawil7/first-pass on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.