refactor
/refactor
Zmienia strukturę kodu bez zmiany zachowania, najpierw przypinając obecne działanie testami, gdy trzeba wydzielić, przenieść lub zmienić nazwę.
- Autor
- doist ↗
- Repozytorium
- todoist-cli ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 12.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 12.11.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Zmienia strukturę kodu bez zmiany zachowania, najpierw przypinając obecne działanie testami, gdy trzeba wydzielić, przenieść lub zmienić nazwę.
Wyzwalacze z opisu
Oryginalny opis (EN)
Changes the structure of code without changing its behaviour, with the current behaviour pinned by tests first. Use when asked to "refactor", "clean up", "simplify", "extract", "rename", "move" or "deduplicate" code, or when another task needs restructuring first.
Jak działa
- 1. Pin the current behaviour
- 2. Delete dead code first
- 3. Move one concept at a time
- 4. Leave the tests alone
- 5. Keep it only if it reads better
- 6. Verify
Podgląd SKILL.md
--- name: refactor description: Changes the structure of code without changing its behaviour, with the current behaviour pinned by tests first. Use when asked to "refactor", "clean up", "simplify", "extract", "rename", "move" or "deduplicate" code, or when another task needs restructuring first. --- # Refactor A refactor changes structure, not behaviour. Bugs included: if you find one, note it for a separate fix and keep it as it is. ## 1. Pin the current behaviour Find the tests that cover the code at its public interface: the command run through `program.parseAsync(['node', 'td', ...])`, or the exported helper. Where a behaviour has no test, add one that passes **now**, asserting what the code does today. Run them. Done when every behaviour you will touch has a passing test. ## 2. Delete dead code first Remove code nothing reaches, if you can prove it: no caller (`rg` for every name, including the lazy command registry in `src/index.ts` and `scripts/`). Run the tests. Done when they pass. ## 3. Move one concept at a time Make one structural change, run the pinned tests, repeat. Migrate every caller and delete the old API; no shims left behind. Command names, flags, `--json` output shapes and error codes are what people's scripts and agents rely on, and `SKILL_CONTENT` documents them: keep them, or stop and ask (changing them is a breaking `feat!:` release). Done when the tests pass after each step and no caller uses the old shape. ## 4. Leave the tests alone Existing tests may change how they reach the code: import paths, names, call sites. They may not change their inputs or their assertions, including every expected output string. If an expected value changes, the behaviour changed: stop and say so. ## 5. Keep it only if it reads better Name what got easier to read or change. If you can't, revert. Done when you can say it in one sentence. ## 6. Verify `npm run verify`, then report with the `verify` format. Say which tests pinned the behaviour, and confirm `git diff` shows no change to any test input or assertion.
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · doist/todoist-cli | 85 | MIT |
| froglet-studio/cosmic-shore | 100 | MIT |
| mgiovani/cc-arsenal | 100 | MIT |
| jongio/skills | 100 | MIT |
| boshu2/agentops | 100 | Apache-2.0 |
| y-miyazaki/terraform-aws-base | 100 | Apache-2.0 |
| mickeyyaya/evolve-loop | 100 | Apache-2.0 |
| j0hanz/j0hanz-marketplace | 100 | MIT |
| kriscard/kriscard-claude-plugins | 100 | MIT |
Migawka bazy z 13.11.2026 · wersja paczki 3a2a1bf61800 (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
- 100dev-refactor
Zmienia strukturę kodu bez zmiany zachowania: wyodrębnia funkcje, zmienia nazwy, usuwa duplikaty i dzieli moduły. - 100refactoring
Zmienia strukturę kodu bez zmiany zachowania: wyodrębnia fragmenty, zmienia nazwy w wielu plikach, redukuje duplikaty i porządkuje architekturę. - 100refactor-safely
Zmienia strukturę działającego kodu bez zmiany jego działania: wyodrębnia metody, zmienia nazwy, dodaje testy i pracuje z kodem odziedziczonym. - 96safe-refactor
Pomaga przebudować strukturę kodu bez zmiany jego zachowania widocznego z zewnątrz. - 100refactor-module
Restrukturyzuje kod na zlecenie z ticketu bez zmiany działania: wydziela funkcje, dzieli pliki, zmienia nazwy i redukuje duplikację z zachowaniem zachowania. - 90refactor-safely
Refaktoryzuje kod bez zmiany jego działania: zmienia nazwy, wyodrębnia, dzieli pliki, usuwa duplikaty i upraszcza funkcje.