Agent skill

Fix

by swingerman in swingerman/engineer

A skill your agent uses to drive a bug fix from first report through close, with a "why didn't we catch it?" loop at the end.

MITAuto-check passedDevelopment

Install Fix

skills CLI
$ npx skills add swingerman/engineer --skill fix -a claude-code

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

GitHub CLI
$ gh skill install swingerman/engineer fix --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/swingerman/engineer.git skills-src && mkdir -p .claude/skills && cp -r skills-src/engineer/skills/fix .claude/skills/fix && 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
GitHub stars
154
Token cost
~3k tokens
SKILL.md length
1,509 words
Files
4 (incl. references)
Skills in repo
27
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses to drive a bug fix from first report through close, with a "why didn't we catch it?" loop at the end.

  • Works in 10 steps: Re-entry routing → Capture → Investigate → …
  • Drive a bug fix from first report through close
  • SKILL.md covers When to use, Workflow, When NOT to use this skill and References
  • Calls git and claude

What it does

Fix is an agent skill from swingerman/engineer. Use to drive a bug fix from first report through close, with a "why didn't we catch it?" loop at the end. Triggers — "/engineer.fix", "a bug came in", "this is broken", "a user reported X", "there's a defect", "we have a regression", "this needs a fix", "another report", "more issues", "still failing", "validation failed again", "another bug", "next defect", "more fixes".

Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/artifact-template.md`, `references/gap-analysis-categories.md` and `references/regression-spec-template.md`).

It sits in Development, covering Debugging. The repository describes itself as: Disciplined Agentic Engineering — a methodology kit for Claude Code: acceptance-test-first specs, explicit checkpoints, and autonomy you can actually leave running. The engineer… The licence is MIT.

When your agent uses it

  • Drive a bug fix from first report through close
  • With a why didnt we catch it? loop at the end
  • — /engineer.fix
  • A user reported X

Example prompts

  • “why didn”
  • “loop at the end. Triggers —”
  • “a bug came in”
  • “/fix”

Workflow steps

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

  1. Re-entry routing
  2. Capture
  3. Investigate
  4. Pin (CONFIRM-FIRST GATE 1)
  5. Fix (CP5-style)
  6. Refine (CP6)
  7. Verify (CP7)
  8. Harden (CP8 + CONFIRM-FIRST GATE 2)
  9. Gap analysis ("why didn't we catch it?")
  10. Close

What it can do on your machine

Read from SKILL.md and the folder at commit 32947eb. 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

    Shell commands in SKILL.md call:

    • git
    • claude

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

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    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 loads about 3k tokens when it runs, and up to ~5.3k if it reads all its reference files. Until then it costs about 95 tokens; SKILL.md has 1,509 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~95
When it runs · the whole SKILL.md, loaded when a task matches
~3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.3k

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 swingerman/engineer at commit 32947eb, republished under its MIT licence (© swingerman). 1,509 words, ~3,035 tokens.

Download SKILL.mdSave it as .claude/skills/fix/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
fix
description
Use to drive a bug fix from first report through close, with a "why didn't we catch it?" loop at the end. Triggers — "/engineer.fix", "a bug came in", "this is broken", "a user reported X", "there's a defect", "we have a regression", "this needs a fix", "another report", "more issues", "still failing", "validation failed again", "another bug", "next defect", "more fixes".

fix

The defect unit-of-work — parallel to "feature" in the DAE pipeline. Tracks a bug from first report through a regression spec, code fix, hardening, and a structured retrospective that feeds back into the methodology.

Unlike ad-hoc fixes, the fix workflow enforces a regression spec that must be RED on current code before any change, and closes the loop with a "why didn't we catch it?" gap analysis tied to a closed category vocabulary. That loop is the methodology contribution: bugs become methodology feedback, not just patches.

When to use

  • A bug report arrives (user report, Sentry alert, stack trace, regression in CI).
  • A defect needs a repeatable reproduction path and a tracked fix.
  • A regression must be proven to stay fixed (the bug-line gate: the regression test must fail on the original bug).

Not for: building a new capability (/engineer.discuss or /engineer.feature-init); adjusting an in-flight feature's scope (/engineer.feature-edit); reviewing recent changes without a defect (/engineer.arch-check or /crap-analyzer).

Maintenance auto-invocation. fix is the landing point of the SDLC's maintenance loop (${CLAUDE_PLUGIN_ROOT}/references/intent.md): a trigger — a Sentry/CI alert, a Slack message, or a schedule — can invoke it with no human at the start. Wire the trigger via the schedule skill (cron routines) or an external alert calling claude -p "/engineer.fix <signal>"; Step 1 synthesizes the bug intent from the signal/logs and the pipeline runs, surfacing to a human only at the review gates its severity + effective autonomy demand (a critical or user-blocking defect always confirms; low-severity internal ones can run further unattended). The external-write gate (${CLAUDE_PLUGIN_ROOT}/references/handoff-dispatch.md) still applies — a maintenance run never merges/deploys on its own unless verify: auto + dae_mergeready clear it.

Workflow

Infra contract. Any step that runs tests, mutations, or the regression spec MUST first ensure required infra is up via ${CLAUDE_PLUGIN_ROOT}/scripts/dae_infra.py ensure <names> (reading the manifest's infra: section). On a start-failed failure → stop and surface the structured diagnosis. On undeclared required infra → stop with "declare in manifest" message. This applies to Steps 3, 4, 7.

Quirks contract. Before booting infra or running test commands, consult manifest.infra_quirks: apply runtime_pins (e.g. ensure JAVA_HOME matches runtime_pins.java), read port_map_file if set, surface framework_constraints to the agent if relevant ("note: Flutter web has no hot-reload — full rebuild required"), use recovery_commands keyed by failure signature when probing reports a known stuck state, and — when reproducing against a worktree whose app is mount-served — follow worktree_preview instead of rediscovering the mount switch. Quirks exist so the agent doesn't rediscover what's already documented (nexthq Java/Flutter, mmc Apache opcache).

Fixture-parity contract. Steps 3, 4, and 7 run the regression spec / acceptance / mutation against a seeded DB. If manifest.acceptance.fixture_parity.check is set, run that command FIRST as a hard gate — non-zero means the seed fixture has drifted from the schema/migrations: stop, report the drift, do not run the tests, and do not attribute the resulting RED to code. Even with no check configured, never diagnose a RED as fixture drift without proving it (diff the fixture against the schema) — a phantom-column fixture masks real defects. See ${CLAUDE_PLUGIN_ROOT}/references/fixture-parity.md.

Step 0 — Re-entry routing

Before Step 1, probe for in-flight fixes via ${CLAUDE_PLUGIN_ROOT}/scripts/dae_fix.py list_open_fixes (any status != closed). Three cases:

StateAction
No open fixesProceed to Step 1 (Capture) as a new defect.
Exactly one open fix, agent has fresh context (e.g. just typed "still failing", "validation failed again")Continue that fix from its current status: — jump to the matching step. Don't write a new artifact.
Multiple open fixes, or one open fix + trigger sounds like a new defect (e.g. "another bug", "a new report came in")Surface the open fixes one-line each and ask "continue X, or capture a new defect?" — single AskUserQuestion, then proceed.

mmc ran 5 sequential fixes from one /engineer.fix invocation because the skill assumed one-shot. Re-entry routing makes "many fixes in a row" cheap: no re-anchor, no template re-read, just pick up where the last close left off. A fresh defect from re-entry still flows through Steps 1–9 — it just doesn't lose the agent's context to a cold start.

Step 1 — Capture

Accept free-form input; no feature slug required. Collect: title, severity (low | medium | high | critical), source (kind: sentry|github|slack|user|internal, ref: <url-or-id>), whether it blocks users (blocks_user), workaround ("none" if none), and a concise repro/expected/actual. This capture is the bug intent (${CLAUDE_PLUGIN_ROOT}/references/intent.md) — synthesized from whatever signal arrived (a Sentry alert, stack trace, Slack message, or raw log), exactly as discuss synthesizes a feature intent.

Write .engineer/fixes/<YYYY-MM-DD-slug>.md via the schema in references/artifact-template.md. Set status: investigating.

CLI shortcut: /engineer.fix "title" --source <url> pre-fills title and source; skip the prompt for those fields.

From a tracker capture: if this fix is being promoted from an untriaged tracker row (a bug a human added directly — no Slug; see Tracker-as-intake in engineer/references/tracker.md), pre-fill title / severity / source from the row, set the fix's tracker_ref to that row, and write the fix slug back to it — don't leave the row orphaned or create a duplicate.

Validate the new artifact: ${CLAUDE_PLUGIN_ROOT}/scripts/dae_fix.py --validate <fix-file>. Surface any errors before proceeding.

Step 2 — Investigate

Goal: identify which feature(s) own the broken code.

Heuristics — run cheapest first to bound token cost:

  1. Stack trace files → cross-reference feature.files in known features.
  2. Error text grep across .engineer/features/*/feature.md.
  3. Recent commits on the affected path (git log --oneline -- <file>).
  4. User-provided hints.
  5. From the failing symbol, trace root cause and blast radius via LSP — findReferences + call-hierarchy (incomingCalls) to see who reaches the broken code — when an LSP MCP capability is available; fall back to grep otherwise. See ${CLAUDE_PLUGIN_ROOT}/references/code-lookup.md.

Match resolution:

  • Single clean candidate and prime-context confirms strong relevance → AUTO-POPULATE feature_refs; record match_mode: auto.
  • Multiple candidates or ambiguous → rank top 3, invoke prime-context per candidate, present ranked list, ask user to confirm. Record match_mode: manual.
  • No match → record match_mode: none; proceed as a loose fix (no feature_refs).

Record investigation.candidates_considered. Set status: pinned-pending.

Show full SKILL.md (552 more words)Show less
Step 3 — Pin (CONFIRM-FIRST GATE 1)

Write one regression Given/When/Then spec per feature_refs entry (not a shared spec). Use references/regression-spec-template.md.

Run the spec on current code. It MUST be RED. If it passes (GREEN) the spec does not pin the bug — redraft until RED. Record red_run.result: red + command + output in pin_confirmation.feature_refs[*].

Present the spec(s) and red-run evidence to the user for confirmation before proceeding. Set status: pinned.

Step 4 — Fix (CP5-style)

Implement the fix using the same discipline as Checkpoint 5. The regression spec must turn GREEN. Update fix_commits. Set status: fixed.

Step 5 — Refine (CP6)

Invoke engineer:refine on touched code. Set status: refined.

Step 6 — Verify (CP7)

Run engineer:arch-check on each touched feature. Run crap-analyzer on the fix diff. Record results. Set status: verified.

Step 7 — Harden (CP8 + CONFIRM-FIRST GATE 2)

Run /engineer.harden in fix mode over the fix diff. It runs the refinement-advisor, then whichever of the introversion scan, mutation testing and TLA+/Lean checks the advisor recommends and effective autonomy approves, then the arch re-check. A fix to a retry, race or parser bug is a strong formal candidate. For a fix, a critical or user-blocking severity always asks the human. It records harden_results.{advisor, introversion, mutation_score, formal, arch_check} in this fix record.

Then the fix-specific gate:

Bug-line mutation gate: recover the buggy line(s) via git show HEAD~1 -- <file>, apply locally, run only the regression spec, assert RED. If the spec stays GREEN the spec is coupled to the fix, not the bug — back to Step 3 (Pin). Restore the fix. Record harden_results.bug_line_mutation_confirmed: true.

Set status: hardened.

Step 8 — Gap analysis ("why didn't we catch it?")

For each affected feature, identify which DAE phase leaked. Use the closed vocabulary in references/gap-analysis-categories.md — one entry per distinct finding.

CONFIRM-FIRST: present findings to the user for approval before writing to the artifact. Findings are claims about methodology gaps; the user is the source of truth.

Write approved findings to gap_analysis[*]. Determine blockers via blocker_categories() (see references/gap-analysis-categories.md for the rule). Advisory followups go to .engineer/consolidation.md tagged with the fix slug; blocker followups must be applied inline or the charter explicitly amended. Set status: gap-analyzed.

Step 9 — Close

Run ${CLAUDE_PLUGIN_ROOT}/scripts/dae_fix.py close_ready(rec). Hard preconditions: pin confirmed, hardened (including bug-line gate), gap_analysis non-empty, no unresolved blockers.

Emit a handoff that reference-links each feature_refs[*]/progress.md. Set status: closed.

Then dispatch per ${CLAUDE_PLUGIN_ROOT}/references/handoff-dispatch.md: advisory followups already landed in .engineer/consolidation.md (no dispatch — next surfaces them); blocker followups are already applied. Auto-invoke /engineer.progress-log to propagate the closure entry to each affected feature's progress.md at autonomy medium/high; confirm-then-dispatch at low.

Post-merge cleanup (deferred). Print the cleanup commands the user (or next agent) must run after the fix PR merges, and record the branch name in the closure entry so next/session-summary can detect a stale branch later:

After the PR merges:
  git checkout main && git pull --ff-only && git branch -d <branch>

This is informational — the close step happens before merge, so cleanup can't run here. next and session-summary both probe for merged branches and will offer the cleanup automatically.

When NOT to use this skill

  • Building a new feature → /engineer.discuss or /engineer.feature-init
  • Refining an in-flight feature's scope → /engineer.feature-edit
  • Reviewing recent changes without a defect → /engineer.arch-check, /crap-analyzer, or /engineer.refinement-advisor

References

  • references/artifact-template.md — canonical .engineer/fixes/<slug>.md schema
  • references/regression-spec-template.md — Given/When/Then template used in Step 3
  • references/gap-analysis-categories.md — closed vocabulary + blocker rule
  • Sister skills: prime-context (Step 2 per candidate), arch-check + crap-analyzer (Step 6), atdd-mutate (Step 7), progress-log (Step 9), next (surfaces open fixes)
  • engineer/references/handoff-dispatch.md — infra-ensure-before-stop rule

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

Files

SKILL.md and 3 other files (references) in engineer/skills/fix of swingerman/engineer.

  • SKILL.md
  • references/artifact-template.md
  • references/gap-analysis-categories.md
  • references/regression-spec-template.md

Open the folder on GitHubat commit 32947eb

Compare with similar skills

Fix 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 compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Fix this skillswingerman/engineer154—~3kAutomated safety check: PassMIT
Trellis Session Insightmindfold-ai/Trellis15k4 repos~1.7kAutomated safety check: PassAGPL-3.0
Native Data FetchingCherryHQ/cherry-studio-app4k6 repos~2.9kAutomated safety check: NotesMIT
Aoti Debugpytorch/pytorch104k1 repos~1.7kAutomated safety check: PassCustom licence
Herdr Throwaway Reproductionherdrdev/herdr43k—~2.4kAutomated safety check: PassApache-2.0
Systematic Debuggingultralisp/ultralisp25851 repos~2.4kAutomated safety check: PassNone

Similar skills

  • Trellis Session Insight

    mindfold-ai/Trellis

    Reach into past AI conversation history through the trellis mem CLI.

    15k GitHub starsUsed in 4 repos~1.7k tokens
    DevelopmentAuto-check passed
  • Native Data Fetching

    CherryHQ/cherry-studio-app

    A skill your agent uses when implementing or debugging ANY network request, API call, or data fetching.

    4k GitHub starsUsed in 6 repos~2.9k tokens
    DevelopmentAuto-check: notes
  • Aoti Debug

    pytorch/pytorch

    Debug AOTInductor (AOTI) errors and crashes. An agent skill from pytorch/pytorch.

    104k GitHub starsUsed in 1 repo~1.7k tokens
    DevelopmentAuto-check passed
  • Runs a disposable, uniquely named Herdr session inside an existing one so runtime, pane, terminal or API bugs can be reproduced without touching the main session.

    43k GitHub stars~2.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Systematic Debugging

    ultralisp/ultralisp

    A skill your agent uses when encountering any bug, test failure, or unexpected behavior, before proposing fixes

    258 GitHub starsUsed in 51 repos~2.4k tokens
    DevelopmentAuto-check passed
  • Decides whether an OpenLogi device problem on macOS is a privacy-permission (TCC) problem, using agent log lines, and says which identity needs which grant.

    23k GitHub stars~2.5k tokensUpdated 4 days ago
    DevelopmentAuto-check: notes

More from swingerman/engineer

All 27 skills in this repo
  • Crap Analyzer

    swingerman/engineer

    A skill your agent uses to produce a risk-based refactor + test plan for recently-changed code on a diff/branch/PR by computing CRAP (complexity × untested) on changed methods.

    154 GitHub stars~1.2k tokensUpdated 14 days ago
    Auto-check passed
  • Atdd Mutate

    swingerman/engineer

    A skill your agent uses to add a third validation layer to the ATDD workflow — after acceptance tests verify WHAT and unit tests verify HOW, mutation testing verifies the tests actually catch bugs.

    154 GitHub stars~2.7k tokensUpdated 14 days ago
    Auto-check passed
  • Atdd

    swingerman/engineer

    A skill your agent uses to drive feature work through the Acceptance Test Driven Development workflow — Given/When/Then specs before code, a project-specific test pipeline, and two parallel test…

    154 GitHub stars~2.8k tokensUpdated 14 days ago
    Auto-check passed
  • Harden

    swingerman/engineer

    Use after a feature passes Light Verify (CP7), to prove the tests actually catch bugs and, where the code warrants it, to formally check its invariants — Checkpoint 8.

    154 GitHub stars~1.8k tokensUpdated 14 days ago
    Auto-check passed
  • Next

    swingerman/engineer

    Use at the start of a work session, or any time the question is "what should I pick up now" across the whole project.

    154 GitHub stars~3k tokensUpdated 14 days ago
    Auto-check passed
  • Post Merge

    swingerman/engineer

    Use immediately after a PR is merged to clean up the local feature branch and resync main.

    154 GitHub stars~1.4k tokensUpdated 14 days ago
    Auto-check passed

Categories

Questions about Fix

What does Fix do?

A skill your agent uses to drive a bug fix from first report through close, with a "why didn't we catch it?" loop at the end. Fix is an agent skill from swingerman/engineer." loop at the end.

When should I use Fix?

Fix fits situations like: drive a bug fix from first report through close; with a why didnt we catch it? loop at the end; — /engineer.fix; A user reported X.

How do I install Fix in Claude Code?

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

How do I install Fix in Codex?

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

Can I use Fix 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 swingerman/engineer --skill fix -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, .gemini/skills/fix, .github/skills/fix and .opencode/skills/fix in your project.

What does Fix need to run?

Going by SKILL.md and its folder, Fix needs the command-line tools its instructions call (git and claude).

Does Fix access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Fix 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 use?

Fix 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 use?

About 3k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.3k tokens, read only when the agent opens those files.

What are the alternatives to Fix?

Skills that share tags, products or a category with Fix: Trellis Session Insight (mindfold-ai/Trellis, 15k stars), Native Data Fetching (CherryHQ/cherry-studio-app, 4k stars), Aoti Debug (pytorch/pytorch, 104k stars) and Herdr Throwaway Reproduction (herdrdev/herdr, 43k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Fix?

swingerman (a GitHub user) maintains it in swingerman/engineer, which has 154 GitHub stars. The repository holds 27 skills in this directory. The repository was last updated on September 23, 2026.

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