bug-fix

A step-by-step method for fixing a software defect after its cause is known. It reproduces the failure, makes the smallest root-cause fix, adds a regression test and verifies the result.

In plain words
What is it for?
Fixing crashes, incorrect results and regressions when the faulty cause has already been identified.
Why use it?
It reduces the chance of treating only the symptom and helps prevent the same bug from returning later.

Skill for Claude CodeCodex

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 skills/thixpin/pitway/bug-fix
Any agent
npx skills add thixpin/pitway --skill bug-fix
Clone the repo
git clone --depth 1 https://github.com/thixpin/pitway

Made for: Claude Code, Codex.

Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 578 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.00052 $0.00578
Opus 5 $0.00026 $0.00289
Sonnet 5 $0.00010 $0.00116
Haiku 4.5 $0.00005 $0.00058

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

Security

Grade A, and why

bug-fix 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 3d 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.

src/integrations/common/skills/bug-fix/SKILL.md · 36 lines

How it starts

The opening of the file, as written. The whole thing — 36 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Bug Fix

Fix bugs regression-first: prove the bug exists, fix the cause minimally, prove it cannot return.

Scope

Use for any defect with observably wrong behavior and a known cause — crashes, incorrect output, regressions.

This skill begins once the root cause is identified. If the cause is still unknown, use debugging first, then return here with it.

Do not use for:

  • Writing or restructuring tests against working code — use testing.
  • Improving healthy code that has no defect — use code-quality-review.

A vulnerability is a bug: use this workflow and the security-audit checklist together.

Workflow

  1. Reproduce first. Confirm the bug with a concrete failing case — a command, request, or input that demonstrably misbehaves. If you cannot reproduce it, use debugging to establish a reliable trigger before continuing here.
  2. Confirm the root cause. State it in one sentence before fixing, and check the fix targets it rather than the symptom (no null check where the real problem is that the value should never be null). If tracing from symptom to cause is still open work, finish that in debugging first.
  3. Write the regression test before the fix whenever the project has a test suite and the bug is testable. The test must fail on the current code for the same reason the bug occurs. If an automated test is infeasible (environment-dependent, UI-only, timing), state why and describe the manual verification used instead.
  4. Fix minimally. The smallest change that removes the root cause. No drive-by refactoring, renames, or style changes in the same edit — propose those separately if worthwhile.
  5. Verify. Run the regression test, then the smallest relevant surrounding test suite to catch collateral damage.
  6. Check for siblings. Search for other call sites or copies of the same pattern that share the defect. Fix or report them — a bug that exists in three places and is fixed in one is still open.

Judgment calls

Read the full file on GitHub · 36 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. 3d ago First seen · 36 lines · 52 tokens per session scan A d2c632a6353c

Subscribe to this mod's changes

bug-fix is a skill published in the GitHub repository thixpin/pitway (19 stars, last pushed 4d ago), licensed MIT. It adds 52 tokens to every session and 578 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

moai-ref-testing-pyramid

Test pyramid strategy, coverage targets, test patterns, and quality metrics reference. Agent-extending skill that amplifies manager-develop test-creation and quality-validation work with production-grade testing patterns. NOT for: production code implementation, architecture design, DevOps, security audits.

modu-ai/moai-adk · 61 tokens

test-generator

Automatically suggest tests for new functions and components. Use when new code is written, functions added, or user mentions testing. Creates test scaffolding with Jest, Vitest, Pytest patterns. Triggers on new functions, components, test requests, testing mentions.

alirezarezvani/claude-code-tresor · 55 tokens

concord-relay

Keep this Grok session reachable by other Concord agents while idle.

Get-Concord-AI/concord-mcp · 18 tokens

intuitive-tests

Use this skill whenever the user asks about unit test best practices, test organization, flat test suites, redundant tests, test refactors, pytest/JUnit/Jest/xUnit layout, test taxonomy, flaky tests, coverage quality, fixtures, mocks, parametrization, pruning existing UTs, or "which tests are worth keeping." It…

MiaoDX/intuitive-flow · 154 tokens

pytest-coverage

Run pytest tests with coverage, discover lines missing coverage, and increase coverage to 100%.

calf-ai/calfkit-sdk · 22 tokens

pace-workflow

Use for PACEflow-managed coding work: create, approve, resume, verify, close, or archive CHG/HOTFIX before project file edits.

paceaitian/paceflow · 35 tokens