Logo von Bugfix

Bugfix

Community
dan-the-dev
bugfix

Use when fixing bugs, regressions, failing tests, or unexpected behavior. Applies a strict test-first bugfix workflow with minimal safe changes, isolated commits, and language-agnostic verification strategies.

Übersicht

Herausgeberdan-the-dev
Repositoryxp-developer-skills
Skill-Namebugfix
Sterne
33
Forks
1
Mitgelieferte Dateien
11
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • 11 mitgelieferte Dateien

    Skripte, Vorlagen und Referenzmaterial, die das Modell bei der Arbeit lesen kann. Die Dateien sind schreibgeschützt und werden niemals ausgeführt.

  • Open Source

    Von dan-the-dev auf GitHub veröffentlicht. Prüfen Sie den Quellinhalt vor der Installation.

Installation

Installieren Sie den KI-Skill Bugfix in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner — liest SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/dan-the-dev/xp-developer-skills/tree/master/skills/bugfix
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill anlegen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format lesen kann, kann diesen Skill nutzen — kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dan-the-dev/xp-developer-skills.git /tmp/xp-developer-skills
mkdir -p .claude/skills
cp -r /tmp/xp-developer-skills/skills/bugfix .claude/skills/bugfix
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Bugfix in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Bugfix automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Bugfix nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Keys.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

Bugfix TDD

Mission

Shared delivery rules at boundaries: docs/delivery-process.md (§2 verification, §3 change-surface, §4 test strategy, §7 two hats) and docs/project-verification.md, docs/test-strategy-selection.md.

Fix bugs safely using a strict RED → GREEN workflow.

The goal is:

  • reproduce the bug
  • create a deterministic failing test
  • apply the minimal safe fix
  • verify no regressions
  • preserve reviewability and isolation

This skill optimizes for:

  • correctness
  • reproducibility
  • safety
  • small reversible changes

NOT for:

  • speed
  • cleanup
  • optimization
  • refactoring

Core Principles

  • Tests are the source of truth
  • Never fix behavior before reproducing it
  • Every bugfix must be reproducible
  • Prefer the smallest possible change that restores the violated invariant, not one that only hides the symptom
  • Separate reproduction from resolution
  • Preserve system stability
  • Keep commits isolated and reviewable

Language-Agnostic Rules

This skill MUST adapt to the current repository stack.

The agent should:

  • detect the language and framework in use
  • identify existing testing conventions
  • reuse project-native tooling
  • follow existing repository patterns

Examples:

  • JavaScript/TypeScript → npm/pnpm/jest/vitest/playwright
  • Python → pytest/unittest
  • Go → go test
  • Java → junit/maven/gradle
  • Ruby → rspec
  • Rust → cargo test

Never assume:

  • package manager
  • test runner
  • framework
  • directory structure

Always inspect the repository first.


Mandatory Workflow

0. Synchronize Repository

Required steps:

  1. checkout main branch
  2. pull latest changes
  3. create isolated bugfix branch

Branch format:

bugfix/{ticket}-{short-description}

Examples:

  • bugfix/STR-142-null-email-validation

  • bugfix/PLAT-201-invalid-date-format

  • bugfix/fix-missing-user-mapping

Rules:

  • lowercase

  • hyphen-separated

  • concise and descriptive

  • description must summarize the bug behavior

  • avoid generic names like:

    • fix-bug

    • issue-fix

    • quick-patch

Ticket handling:

  • if a ticket identifier exists in the initial request, include it

  • otherwise omit the ticket portion

The agent should automatically generate a meaningful short description derived from:

  • observed failing behavior

  • affected domain

  • expected correction


1. Understand the Failure

Before writing code:

  • complete a brief test strategy note per test-strategy-selection.md — e.g. will mutation run after GREEN if configured and logic is branchy?
  • identify observed behavior
  • identify expected behavior
  • identify affected scope
  • inspect logs/errors/traces if available
  • separate symptom (what looks wrong: crash, wrong UI, log noise) from the invariant or contract that was violated (what the system should guarantee under the same conditions)

Prefer:

  • deterministic reproduction
  • automated reproduction
  • narrow reproduction scope

2. Reproduce the Bug with a Test (RED)

Create a failing test reproducing the issue.

Choose the lowest useful test level:

  1. unit
  2. integration/API
  3. end-to-end

The test MUST:

  • fail for the correct reason
  • be deterministic
  • clearly express expected behavior — i.e. the correct observable outcome or invariant under the failing conditions, not only that “something failed” (see Anti-Patterns: symptom fixes)
  • fail before the fix exists

The reproduction must be sufficient for a reviewer to see what contract was broken, not merely that an error path was exercised.

If reproduction is impossible:

  • STOP
  • document constraints
  • request clarification

3. Verify RED State

Run the minimal test scope first.

Examples:

  • single test
  • single file
  • focused module

If the test passes unexpectedly:

  • strengthen assertions
  • improve reproduction
  • verify execution path

Never continue without confirmed RED.


4. Commit RED State

Stage ONLY test files.

Commit message:

test: reproduce bug STR-XXX

The commit MUST:

  • contain only reproduction logic
  • clearly demonstrate the failure

5. Apply Minimal Fix (GREEN)

Modify only the code required to resolve the bug.

Prefer:

  • local fixes
  • minimal behavioral changes
  • existing abstractions
  • reversible changes

Avoid:

  • refactoring
  • cleanup
  • renaming
  • architectural changes
  • unrelated edits
  • symptom-only changes that hide the failure without restoring the violated invariant (e.g. empty catch, broad default, guard that masks the bug while wrong outcomes remain for other inputs)

6. Verify GREEN State

Run progressively:

  1. focused tests
  2. related module/package tests
  3. broader suites if needed
  4. all applicable project verify steps at bugfix boundary — lint, format, typecheck, SonarQube/static analysis when configured, mutation if adopted (docs/project-verification.md, docs/test-strategy-selection.md)

Verify:

  • failing test now passes for the right reason (assertions still encode the correct contract, not loosened to force green)
  • related behavior remains stable
  • no regressions detected

7. Commit GREEN State

Stage ONLY fix-related files.

Commit message:

fix: resolve bug STR-XXX

The commit MUST:

  • contain only the minimal fix
  • preserve review clarity

8. Push Branch

Push branch upstream.

Do NOT:

  • squash commits
  • rewrite history
  • open PR automatically

9. Stop

Once:

  • RED reproduced
  • GREEN verified
  • branch pushed

STOP.

Do not:

  • optimize
  • refactor
  • continue exploring
  • expand scope

Escalation Rules

STOP and escalate if:

  • bug cannot be reproduced deterministically
  • tests are flaky
  • unrelated failures appear
  • fix requires architectural changes
  • repository conventions are unclear
  • missing tooling prevents safe validation

Document:

  • blockers
  • attempted approaches
  • observed behavior

Anti-Patterns

Never:

  • fix without a failing test
  • mix refactoring with bugfixing
  • create large fixes
  • modify unrelated files
  • combine RED and GREEN in one commit
  • skip regression validation
  • assume tooling without inspection
  • apply a symptom fix that silences the failure while the broken invariant remains (see references/anti-patterns.md)

Verification Strategy

Discover all verify steps the current project defines for the language/module you touched — then run each applicable step before claiming done (delivery-process §2; docs/project-verification.md). Do not stop after only the test runner if the project defines compile, typecheck, lint, format, SonarQube/static analysis, integration, or other gates.

Fix new violations you introduced — do not suppress lint or Sonar rules to force green.

Prefer incremental validation within that set:

  1. focused automated check
  2. local module/package verify step
  3. service/application verify step
  4. full project verify only when justified

Avoid expensive full runs after every micro-edit unless the project requires it; run the full applicable set at the bugfix boundary.


Definition of Done

A bugfix is complete only when:

  • bug is reproduced by automated test that asserts the correct invariant / expected outcome, not only a generic failure
  • RED state confirmed
  • minimal fix applied (restores the contract; not a symptom-only silencing)
  • GREEN state confirmed
  • all applicable project verify steps for this scope passed
  • test strategy table in output (practices evaluated → adopt/skip)
  • change-surface complete if construction/import/API changed
  • related regressions checked
  • two isolated commits exist
  • branch pushed upstream
  • no unrelated changes remain
  • Root cause and recurrence prevention are documented in the output (see Output Format)

Output Format

markdown
Branch: <branch-name>

Bug:
<short description>

Observed Behavior:
<actual behavior>

Expected Behavior:
<expected behavior>

Invariant / contract (one line):
<what the system should guarantee under the failing conditions — the repro test must assert this>

1. Reproduction
- <approach>

2. RED
- Test: <file::test>
- Result: failing as expected

3. GREEN
- Fix: <minimal change summary>
- Result: passing

4. Verification
- Commands executed
- Scope validated
- Regression status
- Test strategy (mutation, integration, etc.): adopted / skipped with reason

5. Git
- RED commit
- GREEN commit
- Branch pushed

6. Root cause
<one short paragraph: why the bug occurred — wrong assumption, missing branch, bad state, regression, etc.>

7. Recurrence prevention
<one short paragraph: how this class of bug is prevented now — e.g. new test covers edge, documented constraint, follow-up ticket for structural fix>

Additional Resources

Workflow References

  • references/workflow.md
  • references/heuristics.md
  • references/verification.md
  • references/anti-patterns.md
  • references/language-agnostic-testing.md

Examples

  • examples/javascript.md
  • examples/typescript.md
  • examples/python.md
  • examples/go.md
  • examples/java.md

Completion Checklist

  • checklists/done.md

Resource Usage Guidance

Open additional files only when needed.

Suggested usage:

  • workflow.md → when execution order is unclear

  • heuristics.md → when multiple fix strategies are possible

  • anti-patterns.md → before large or risky changes

  • verification.md → when validation scope is uncertain

  • language-agnostic-testing.md → when repository tooling is unfamiliar

  • examples/* → when repository language matches example ecosystem

  • checklists/done.md → before finalizing work

Mitgelieferte Dateien

Das Modell liest diese Dateien bei Bedarf, während der Skill geladen ist. Sie werden als lesbare Dateien bereitgestellt und niemals ausgeführt.

Häufig gestellte Fragen

Was macht der KI-Skill Bugfix?

Use when fixing bugs, regressions, failing tests, or unexpected behavior. Applies a strict test-first bugfix workflow with minimal safe changes, isolated commits, and language-agnostic verification strategies.

Warum Bugfix in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Bugfix besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Bugfix in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/dan-the-dev/xp-developer-skills/tree/master/skills/bugfix ein. TypingMind liest die Datei SKILL.md, bündelt die zugehörigen Dateien und installiert alles als Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Bugfix nutzen?

Jedes Modell, das Sie in TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Bugfix verwenden?

So viele Sie möchten. Solange ein Modell Skills unterstützt, können Sie Bugfix damit verwenden – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama und weitere – alles in TypingMind mit Ihren eigenen API-Schlüsseln.

Ist der KI-Skill Bugfix kostenlos?

Der Skill wird von dan-the-dev auf GitHub veröffentlicht. Die Lizenzbedingungen finden Sie im Repository. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: eine Datei namens SKILL.md mit einem Namen und einer Beschreibung sowie allen Skripten, Vorlagen oder Referenzdateien, die das Modell möglicherweise benötigt. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und benötigen daher weder Server noch API-Schlüssel oder Laufzeitumgebung. Sie funktionieren mit jedem Modell.

Alle

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇