Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

hotfix

/hotfix

Naprawia błąd na wdrożonym środowisku zaczynając od padającego testu: diagnoza, minimalna poprawka i cherry-pick na gałąź główną oraz wydaniową, a zdalny git obsługuje użytkownik.

Repozytorium
skills ↗
Licencja
MIT
Ostatnia zmiana repozytorium
27.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 27.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

Naprawia błąd na wdrożonym środowisku zaczynając od padającego testu: diagnoza, minimalna poprawka i cherry-pick na gałąź główną oraz wydaniową, a zdalny git obsługuje użytkownik.

Wyzwalacze z opisu

production is brokenbug on prodemergency fixhot patchrollback and fix
Oryginalny opis (EN)

Test-first hotfix protocol for bugs on a deployed environment: reproduce as a failing test, diagnose, minimal fix, then land it on BOTH the mainline and the deployed/release branch via cherry-pick — with all remote git handed to the user. Use when the user reports a bug on prod/staging ("production is broken", "bug on prod", "emergency fix", "hot patch", "rollback and fix") or names a deployed build/tag with a problem. Deploy mechanics (tags, CI, dashboards) stay per-project — this skill ships the discipline, not the pipeline.

Jak działa

  1. First: find the project's release shape
  2. Phase 0 — reproduce as a failing test
  3. Phase 1 — identify the deployed code
  4. Phase 2 — diagnose the root cause
  5. Phase 3 — the minimal fix
  6. Phase 4 — land both ways, hand over the remotes
  7. What NOT to do
Sekcje z nagłówków SKILL.md, w oryginale · 80 linii, 640 słów
Podgląd SKILL.md
---
name: hotfix
description: >-
  Test-first hotfix protocol for bugs on a deployed environment: reproduce as a failing test,
  diagnose, minimal fix, then land it on BOTH the mainline and the deployed/release branch via
  cherry-pick — with all remote git handed to the user. Use when the user reports a bug on
  prod/staging ("production is broken", "bug on prod", "emergency fix", "hot patch", "rollback and
  fix") or names a deployed build/tag with a problem. Deploy mechanics (tags, CI, dashboards) stay
  per-project — this skill ships the discipline, not the pipeline.
---

# Hotfix — test-first, both branches, local git only

The protocol that keeps an urgent fix from becoming a second incident. Three non-negotiables:

1. **Test first** — reproduce the bug as a failing test before touching the fix.
2. **Cherry-pick both ways** — the fix lands on the mainline AND the deployed branch, never one.
3. **Local git only** — the agent checks out, cherry-picks, and tags locally; every push is printed
   for the **user** to run (the `git-guard` plugin enforces this anyway).

## First: find the project's release shape

Read the project's own deploy docs (CLAUDE.md links, `docs/`, infra notes) for how deployments are
identified — release branches, deploy tags, build ids. Probe:

```bash
git branch -a | grep -iE 'release|hotfix' | sort -V
git tag -l | grep -iE 'deploy|prod|release' | head
```

**If the project has no release branches/tags** (nothing deployed from a frozen ref), a "bug on
prod" is a plain bugfix on the mainline — use the normal flow, not this protocol. Say so and proceed
simply.

## Phase 0 — reproduce as a failing test

- Locate (or create) the test file for the affected unit, in the project's test convention.
- Write a test that fails in exactly the way the user reports. Run it; confirm red.
- Commit the failing test by itself: `test: reproduce <bug> from <env/build>` — this commit is the
  proof-of-bug and the permanent regression guard; it ships even if the fix takes iterations.
- **Can't reproduce it as a test** (race, environment-only)? STOP and tell the user — a bug that
  can't be tested usually can't be confidently fixed either. Don't skip phase 0 on vague grounds.

## Phase 1 — identify the deployed code

Pin down which ref the affected environment runs (release branch, deploy tag, or the build id the
user named). Check it out locally. Diagnose against **that** code, not the mainline — the bug may
already be fixed there, or look different.

## Phase 2 — diagnose the root cause

Read the code, check recent commits on the deployed ref (`git log --oneline -20 <ref>`), and read
the project's relevant docs for domain context. **Tell the user what you found before writing the
fix** — they may have context that changes the approach.

## Phase 3 — the minimal fix

- **Normal urgency**: fix on the mainline first, then cherry-pick to the deployed branch.
- **Emergency (prod is down)**: fix directly on the deployed branch, then cherry-pick back.
- Either way: minimal diff — no refactors, no cleanup, no drive-by improvements (those go to the
  mainline separately, later). Run the project's checks (lint/build/tests). The phase-0 test must go
  green and nothing else may regress — that's the gate for phase 4.
- **Check for siblings**: if the bug is an instance of pattern X, grep for other instances and fix
  them all, not just the reported one.

## Phase 4 — land both ways, hand over the remotes

```bash
COMMIT=$(git rev-parse HEAD)        # on the branch you fixed
git checkout <the-other-branch>
git cherry-pick "$COMMIT"
```

Then print a copy-paste block for the **user** — never run it:

```
git push origin <release-branch> <mainline>
# then your project's deploy step (tag move / CI trigger / redeploy)
```

Remind them of the project's own deploy/verify steps (from its docs) — git operations alone deploy
nothing. If the fix includes migrations, flag any maintenance-mode step the project documents.

## What NOT to do

- No fix without the failing test first; no claiming done while the test is red or unwritten.
- Never leave the fix on only one branch — both ways, always, in the same session.
- Never push, pull, or force-move refs — print remote commands for the user.
- Don't widen scope — an incident is the worst time for a refactor.

Wersje

RepozytoriumWynikLicencja
Ta strona · optimiziramsi/skills100MIT
verygoodopensource/vgv-wingspan100MIT
nexus-substrate/nexus-agents100MIT
pe-menezes/vibeflow100MIT
edjchapman/claude-code-config100MIT
thettwe/nyann100MIT
mingchao-king/superprogramming100MIT
tranhieutt/software_development_department100MIT
dmzoneill/skills90Apache-2.0

Migawka bazy z 13.11.2026 · wersja paczki f393f7168e85 (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

  • 95tl-hotfix
    Wypycha pilną poprawkę na gałąź main: przenosi zmiany do gałęzi hotfix, waliduje je i otwiera pull request z auto-scaleniem.
  • 95nacl-tl-hotfix
    Wdraża pilną poprawkę do main: przenosi zmiany do gałęzi hotfix, waliduje je i otwiera pull request.
  • 100hotfix-release
    Tworzy gałąź wydania hotfix, robi cherry-pick commitów, podnosi wersję i otwiera wstępny pull request, na przykład dla paczek NuGet i npm oraz backportów poprawek.
  • 100fix-bug
    Diagnozuje i naprawia błędy przepływem test-first: odtworzenie, diagnoza i poprawka, gdy ktoś zgłasza błąd albo nieoczekiwane zachowanie.
  • 100hatch3r-bug-fix
    Prowadzi naprawę błędu krok po kroku: diagnoza przyczyny źródłowej, minimalna poprawka i test regresji.
  • 100hotfix-deploy
    Prowadzi pełny workflow pilnej poprawki na gałęzi produkcyjnej (coop-production, rh-production i podobne): gałąź, poprawka, commit, push i pull request kierowany na gałąź produkcyjną, z pominięciem normalnego potoku.

Uwagi i zgłoszenia

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