fix-bug

A workflow for correcting existing code that should work one way but currently behaves differently. It focuses on diagnosing the defect and making a small, targeted change.

In plain words
What is it for?
Use it for errors, broken behaviour, regressions, failing tests and cases where something used to work or is expected to work but does not.
Why use it?
It helps separate bug fixes from changes that add or redefine behaviour. This reduces the risk of rewriting unrelated code or treating a new feature as a defect.

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

Made for: Claude Code, Codex.

Per session 109 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,579 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.00109 $0.02579
Opus 5 $0.00055 $0.01290
Sonnet 5 $0.00022 $0.00516
Haiku 4.5 $0.00011 $0.00258

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

Security

Grade A, and why

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

skills/fix-bug/SKILL.md · 239 lines

How it starts

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

!../principles/SKILL_BODY.md

!../tool-gitnexus/SKILL_BODY.md


Bug Fix Workflow

Disambiguating fix-bug vs modify-feature

Use this skill when: the code should do X but does Y — you want to restore correct behavior. Use modify-feature when: the code does X correctly — you want it to do Z instead (desired behavior changed).

Quick test: "Did this ever work correctly, or was it always intended to work differently?"Yes, it used to work / should work → fix-bug (continue here). → No, the requirement itself is changingstop. Tell the user: "This looks like a behavior change rather than a bug fix — the modify-feature workflow is a better fit. You can say something like 'refactor/change how X works' to trigger the right workflow, or tell me to proceed anyway and I'll apply baseline rules only." Do not proceed unless the user explicitly says to proceed.

Edge case: A feature never implemented but expected is a bug only if it was promised in an interface contract; otherwise stop and direct the user to sextant:add-feature.

Core Principle

When fixing bugs, make surgical modifications to the existing solution — do not start over with a rewrite.


Complete Execution Workflow

Progress tracking: At the start of each step, output an updated progress block so the user always knows where you are. Use this format:

Bug Fix Progress
✓ Step 1: Reproduce & Locate   — <one-line finding>
✓ Step 2: Impact Assessment    — Risk: <Low/Medium/High>
→ Step 3: Minimal-Change Fix   — in progress
○ Step 4: Boundary Validation

Replace with for the current step, and once complete.


Step 1: Reproduce and Locate the Root Cause

Before making any changes, confirm:

  • What is the specific manifestation of the bug? (Error message, abnormal behavior, data anomaly)
  • What are the trigger conditions? (Specific input, timing, environment)
  • Where is the root cause? (Don't fix the symptom — find the source)

Read the full file on GitHub · 239 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 · 239 lines · 109 tokens per session scan A a0bb10c94564

Subscribe to this mod's changes

fix-bug is a skill published in the GitHub repository hellotern/Sextant (15 stars, last pushed 4mo ago), licensed MIT. It adds 109 tokens to every session and 2,579 once invoked, about $0.0005 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.