Przejdź do treści
Biblioteka skilli
Programowanie · Testowanie

bug-fix

/bug-fix

Prowadzi proces naprawy błędów i regresji, dostarczając poprawkę, test regresji i bramkę przeglądu.

Repozytorium
sd0x-harness ↗
Licencja
MIT
Ostatnia zmiana repozytorium
08.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 08.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Prowadzi proces naprawy błędów i regresji, dostarczając poprawkę, test regresji i bramkę przeglądu.

Oryginalny opis (EN)

Bug fix workflow. Use when: fixing bugs, resolving issues, regression fixes. Not for: new features (use feature-dev), understanding code (use code-explore). Output: fix + regression test + review gate.

Jak działa

  1. Trigger
  2. When NOT to Use
  3. Prohibited Actions
  4. Workflow
  5. agentctl (optional)
  6. Phase 1: Investigation
  7. Phase 2: Fix
  8. Phase 3: Add Regression Test ⚠️
  9. Phase 4: Verify + Review
  10. Review Loop
Sekcje z nagłówków SKILL.md, w oryginale · 164 linii, 819 słów
Podgląd SKILL.md
---
name: bug-fix
description: "Bug fix workflow. Use when: fixing bugs, resolving issues, regression fixes. Not for: new features (use feature-dev), understanding code (use code-explore). Output: fix + regression test + review gate."
allowed-tools: Read, Grep, Glob, Edit, Write, Bash, AskUserQuestion, Skill
---

# Bug Fix Skill

## Trigger

- Keywords: bug, issue, fix, error, broken, failing

## When NOT to Use

- New feature development (use feature-dev)
- Just want to understand code (use code-explore)
- Pure test-only tasks without feature changes (use `/codex-test-review` directly)

## Prohibited Actions

```
❌ git add | git commit | git push — per @rules/git-workflow.md
```

This skill fixes bugs but does **not** commit. `/precommit` is a quality gate only. To commit, offer the menu per `rules/git-workflow.md` § Proactive Offer — a commit option on any real branch, a push option only where `review-state.js offer` allows one — and invoke `/smart-commit --execute` on selection; never print the command for the user to copy.

## Workflow

```
Investigate → Locate → Fix → Test + Review → Precommit Gate
  │             │       │         │                │
  ▼             ▼       ▼         ▼                ▼
gh issue      Grep    Edit     /verify          /precommit
/git-investigate  Read  tests  /codex-test-review
                               /codex-review-fast
```

## agentctl (optional)

At the start, run `node "${CLAUDE_PLUGIN_ROOT}/skills/agentctl-setup/scripts/agentctl-setup.js" status`
once. Only when `state` is `installed/enabled`, offer to draft a task proposal from the ticket per
`@skills/agentctl-setup/references/workflow-integration.md` — the user accepts it with
`/agentctl accept`; any other state, say nothing about agentctl and continue. It is never a gate:
every review and precommit obligation in this skill is unchanged, and its evidence is context
beside a verdict, never the verdict.

## Phase 1: Investigation

Before fixing: if the bug maps to a feature under `docs/features/`, read
`docs/features/<key>/intent-<key>.md` when it exists — a fix that contradicts one of its `INV-*`
invariants or Non-goals stops and asks the user (cite the line). No identifiable feature →
nothing to load; proceed.

| Source | Action |
|--------|--------|
| GitHub Issue | `gh issue view <number>` |
| Error message | `Grep("error message")` |
| Code history | `/git-investigate` |

**Output root cause analysis**:

- Problem location: `src/<module>/<file>:<line>`
- Root cause: <specific cause>
- Impact scope: <which features are affected>

## Phase 2: Fix

| Principle | Description |
|-----------|-------------|
| Minimal changes | Only modify what is necessary |
| No new issues | Confirm changes don't affect other features |
| Design preserved | Choose the smallest root-cause fix that keeps current responsibilities. If the fix moves a boundary or adds an abstraction, say which shape you chose and why — "direct fix; existing design retained" is the expected common answer |

## Phase 3: Add Regression Test ⚠️

Follow `@rules/testing.md` for conventions (AAA, naming, evidence model).
Follow `@rules/testing-project.md` for project-specific overrides.

**Bug fixes must have tests at the corresponding level:**

| Bug Type | Required | Recommended |
|----------|----------|-------------|
| Logic error | Unit | - |
| Service issue | Unit | Integration |
| API issue | Integration | E2E |
| Cross-service/data flow | Integration | E2E |
| User flow | E2E | - |

## Phase 4: Verify + Review

### Step 1: Run tests

```
/verify → all tests pass?
  Yes → Step 2
  No → fix failures → re-run /verify
```

### Step 2: Test adequacy review (mandatory for code changes)

```
/codex-test-review → ✅ Tests sufficient?
  Yes → Step 3
  No → close gaps (Step 2a) → /codex-test-review --continue <threadId>
```

### Step 2a: Gap closure

| Gap Type | Remediation |
|----------|-------------|
| Unit test missing | `/codex-test-gen` → write tests → `/verify` |
| Integration/E2E missing | `/post-dev-test` → write tests → `/verify` |

### Step 3: Code review (auto-loop)

```
/codex-review-fast → ✅ Ready?
  Yes → Precommit Gate
  No → fix issues → re-run /codex-review-fast (auto-loop)
```

### Freshness rule

If code changes after the latest `✅ Tests sufficient` gate (e.g., fixes from code review), rerun `/verify` then `/codex-test-review --continue <threadId>` before proceeding to precommit gate.

## Review Loop

**MUST re-review after fix until PASS** (per @rules/auto-loop.md)

```
Fix → Review → Issues found → Fix again → ... → ✅ Pass → Next step
```

## Doc Sync

Doc Sync is governed by `@rules/auto-loop.md` (behavior-layer rule). After precommit pass, triggers conditionally when changes map to `docs/features/`.

## Output

```markdown
## Bug Fix Report
- **Root cause**: <analysis>
- **Fix**: <description of changes>
- **Regression test**: <test result>
- **Gate**: ✅ Fixed / ⛔ Needs further investigation
```

## Verification Checklist

- [ ] Root cause identified and documented
- [ ] Regression test written at appropriate level
- [ ] All tests pass (`/verify`)
- [ ] Test adequacy reviewed (`/codex-test-review`)
- [ ] Code review passed (`/codex-review-fast` ✅ Ready)
- [ ] Precommit passed (`/precommit` ✅ All Pass)
- [ ] No `git add/commit/push` executed

## Examples

```
Input: Fix issue #123 - calculation error
Action: gh issue view → locate → fix → write Unit Test → /verify → /codex-test-review → /codex-review-fast → /precommit
```

```
Input: API returning 500 error
Action: Grep error → read code → fix → write Integration Test → /verify → /codex-test-review → /codex-review-fast → /precommit
```

Wersje

RepozytoriumWynikLicencja
Ta strona · sd0xdev/sd0x-harness100MIT
nexus-substrate/nexus-agents100MIT
devicedaw/device100AGPL-3.0
ramboz/jig100MIT
ramboz/jig100MIT
ramboz/jig100MIT
mtvrkan/senior-dev-kit100MIT
pronskiy/php-src-developer100MIT
chrisallenlane/claude-swe-workflows100MIT

Migawka bazy z 13.11.2026 · wersja paczki 4b4956cf7e1f (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100hatch3r-bug-fix
    Prowadzi naprawę błędu krok po kroku: diagnoza przyczyny źródłowej, minimalna poprawka i test regresji.
  • 100feature-dev
    Prowadzi pętlę rozwoju funkcji, od implementacji i pisania kodu po testy i bramkę przeglądu, z wynikiem w postaci funkcji, testów i przeglądu.
  • 90pm-bugfix
    Prowadzi naprawę błędu od odtworzenia i analizy przyczyny, przez minimalną poprawkę, po testy regresji.
  • 95fix
    Naprawia błędy od odtworzenia: zapisuje błąd w nieprzechodzącym teście regresji, stosuje minimalną poprawkę i uruchamia kontrolę jakości oraz pętlę przeglądu, w kodzie Pythona.
  • 100refactor
    Koordynuje refaktoryzację wielu celów naraz: czyści i upraszcza kod, porządkuje dokumenty i sprząta wsadowo, a wynik przechodzi przez bramkę przeglądu.
  • 100workflow-fix-and-ship
    Prowadzi jeden cykl naprawy błędu: triage, odtworzenie, debugowanie, test regresji, poprawka, kontrola na żywo, pull request i opcjonalna weryfikacja wdrożenia.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.