agentleFS
hamburger-oshamburger-os/PraxFlow/skills/fix-bug/SKILL.md

fix-bug

Skill1 starsChanged 2 months agoMITView on GitHub

Fix a software or system bug from symptom to causal repair. Use when behavior is wrong, intermittent, crashing, failing tests/CI, regressing performance, failing deployment, or misbehaving on a real target and the task requires expected-vs-observed analysis, characterization, diagnosis, bounded repair, review, and regression verification.

40 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use improvement, build-feature and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • kiminmonacoSkill

    improvement

    Guide for making improvements to existing ClaudeBar functionality using TDD. Use this skill when: (1) Enhancing existing features (not adding new ones) (2) Improving UX, performance, or code quality (3) User asks "improve X", "make Y better", or "enhance Z" (4) Small enhancements that don't require full architecture design For NEW features, use implement-feature skill instead.

    Also in 4 projects that use this

  • sirakinbSkill

    build-feature

    Autonomous task loop that picks ready tasks, implements them, updates progress.txt, commits, and repeats. Use when asked to 'build feature', 'run the loop', or 'implement these tasks'.

    Also in 5 projects that use this

  • kiminmonacoSkill

    implement-feature

    Guide for implementing features in ClaudeBar following architecture-first design, TDD, rich domain models, and Swift 6.2 patterns. Use this skill when: (1) Adding new functionality to the app (2) Creating domain models that follow user's mental model (3) Building SwiftUI views that consume domain models directly (4) User asks "how do I implement X" or "add feature Y" (5) Implementing any feature that spans Domain, Infrastructure, and App layers

    Also in 7 projects that use this

  • SentrySkill

    write-tests

    Write tests following project conventions. Use when adding new tests or modifying existing ones.

    Also in 6 projects that use this

  • JetBrainsSkill

    create-plan

    Research the codebase and create an implementation plan with architecture notes, design document, and track decomposition. Use when starting a new feature or large change.

    Also in 4 projects that use this

  • JasonPaffSkill

    implement-plan

    Execute implementation plan with structured tracking and validation using subagent architecture

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

19 rules. 0 are common, 14 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 40 edited versions we read keep these.

  • 14

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Treat the reported symptom or proposed cause as a starting point, not as established root cause.

    line 12
  2. Distinctive:

    If the expected behavior is itself disputed, resolve that before editing code.

    line 46
  3. Distinctive:

    when it occurs and when it does not.

    line 52
  4. Distinctive:

    Do not rush from vague symptom to patch.

    line 59
  5. Distinctive:

    If continued operation can cause data loss, security exposure, physical damage, corruption, or expanding production impact, contain the …

    line 63
  6. Distinctive:

    Prefer a controlled reproduction when feasible.

    line 69
  7. Distinctive:

    If reliable reproduction is impractical, obtain the strongest observable failure record available.

    line 71
  8. Very specific:

    Use survey to find the relevant area when the location is unclear.

    line 77
  9. Very specific:

    Use trace when the failure depends on a call/event/data/state/lifecycle path.

    line 79
  10. Very specific:

    Use diagnose when available.

    line 93
  11. Distinctive:

    Do not keep modifying code around a hypothesis that evidence contradicts.

    line 97
  12. Very specific:

    Use plan-change when the fix is non-trivial.

    line 103
  13. Distinctive:

    If the repair requires a consequential new tradeoff, use a Decision Gate before executing it.

    line 117
  14. Distinctive:

    If implementation evidence shows that the causal model is wrong, stop and return to diagnosis instead of broadening the patch until the …

    line 123
  15. Very specific:

    Use review-change when a formal review is warranted.

    line 136
  16. Distinctive:

    Prefer three layers when feasible:

    line 140
  17. Distinctive:

    If the fix fails verification or new evidence contradicts the cause:

    line 150
  18. Distinctive:

    Do not preserve a favored diagnosis merely because code has already been written for it.

    line 163
  19. Distinctive:

    Do not create permanent bug diaries by default.

    line 175

“Common” is measured: kept by at least 6 in 10 of the 40 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Fix Bug

Treat the reported symptom or proposed cause as a starting point, not as established root cause.

flowchart TD
    S[Symptom] --> E[Establish expected vs observed]
    E --> C[Characterize failure]
    C --> R{Consequential ongoing risk?}
    R -->|Yes| O[Contain]
    R -->|No| P[Reproduce or capture]
    O --> P
    P --> L[Localize]
    L --> D[Diagnose competing hypotheses]
    D --> F[Plan causal repair]
    F --> X[Execute]
    X --> V[Review + regression verification]
    V -->|Pass| K[Promote durable knowledge if needed]
    V -->|Fail / contradictory evidence| D

Workflow

1. Establish expected versus observed behavior

Determine what should happen and what actually happens.

Expected behavior may come from:

  • an accepted requirement/spec;
  • tests;
  • API/protocol contracts;
  • applicable standards/domain references;
  • previously verified behavior;
  • an explicit user decision.

If the expected behavior is itself disputed, resolve that before editing code.

2. Characterize the failure

Build a useful failure signature:

  • when it occurs and when it does not;
  • deterministic/intermittent;
  • input, state, timing, concurrency, environment, or version dependence;
  • first known bad change/version when available;
  • observable impact;
  • logs/traces/core dumps/metrics/device output associated with it.

Do not rush from vague symptom to patch.

3. Contain consequential risk when necessary

If continued operation can cause data loss, security exposure, physical damage, corruption, or expanding production impact, contain the problem before deep diagnosis when feasible.

Containment is not the causal fix. Preserve useful evidence when possible.

4. Reproduce or capture

Prefer a controlled reproduction when feasible.

If reliable reproduction is impractical, obtain the strongest observable failure record available. Do not block indefinitely on “must reproduce locally.”

Record uncertainty when only a user report or partial capture is available.

5. Localize the responsible path

Use survey to find the relevant area when the location is unclear.

Use trace when the failure depends on a call/event/data/state/lifecycle path.

Narrow progressively:

flowchart LR
    A[System] --> B[Subsystem]
    B --> C[Behavior path]
    C --> D[Boundary / state]
    D --> E[Triggering condition]

6. Diagnose causally

Use diagnose when available.

Maintain competing hypotheses when the cause is not established. Prefer discriminating experiments that can rule explanations in or out.

Do not keep modifying code around a hypothesis that evidence contradicts.

A sufficiently established cause should explain the important symptoms and be consistent with available evidence. When feasible, intervention on the proposed mechanism should change the failure behavior.

7. Plan the causal repair

Use plan-change when the fix is non-trivial.

Target the smallest causal change, not the smallest textual diff.

The fix plan should identify:

  • established cause;
  • mechanism being changed;
  • expected change surface;
  • preserved contracts;
  • tempting unrelated changes that remain out of scope;
  • original failure verification;
  • nearby regression verification.

If the repair requires a consequential new tradeoff, use a Decision Gate before executing it.

8. Execute

Modify the system using native agent capabilities.

If implementation evidence shows that the causal model is wrong, stop and return to diagnosis instead of broadening the patch until the symptom disappears.

9. Review the fix

Ask:

  • does this change address the established cause?
  • does it merely hide or suppress the symptom?
  • did scope expand beyond the causal repair?
  • are existing contracts preserved?
  • did the fix create new failure paths, retries, races, leaks, or swallowed errors?
  • what domain-specific risks apply?

Use review-change when a formal review is warranted.

10. Regression verification

Prefer three layers when feasible:

  1. Original failure: the previously failing reproduction/captured condition now behaves correctly.
  2. Causal verification: evidence supports that the diagnosed mechanism changed as intended.
  3. Regression surface: nearby valid behavior remains correct.

Choose checks proportionately to risk and available capabilities.

11. Failure loop

If the fix fails verification or new evidence contradicts the cause:

flowchart LR
    E[New evidence] --> D[Diagnose again]
    D --> H[Update hypotheses / cause]
    H --> P[Revise fix plan]
    P --> X[Execute]
    X --> R[Review]
    R --> V[Verify]
    V -->|failure or contradiction| D

Do not preserve a favored diagnosis merely because code has already been written for it.

12. Promote durable knowledge selectively

Persist only reusable lessons such as:

  • a previously unknown invariant;
  • an important lifecycle/concurrency constraint;
  • a durable failure mode;
  • a consequential compatibility rule;
  • a recurring diagnostic/project capability.

Do not create permanent bug diaries by default.

Completion criteria

A bug fix is complete when, proportionate to consequence:

  • expected behavior is established;
  • the cause is sufficiently supported for the repair made;
  • the repair is causally scoped;
  • the original failure is verified as fixed or the strongest available equivalent evidence supports the result;
  • relevant regression checks pass;
  • unresolved uncertainty is visible rather than disguised as certainty.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.