refactoring
/refactoring
Restrukturyzuje kod bez zmiany zachowania, wspierając się testami lub kontrolami charakteryzującymi, aby poprawić czytelność, zmniejszyć duplikację i ułatwić przyszłe zmiany.
- Autor
- azat-io ↗
- Repozytorium
- ai-config ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 03.10.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 03.10.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
Restrukturyzuje kod bez zmiany zachowania, wspierając się testami lub kontrolami charakteryzującymi, aby poprawić czytelność, zmniejszyć duplikację i ułatwić przyszłe zmiany.
Oryginalny opis (EN)
Restructure code without changing behavior, backed by tests or characterization checks. Use when code needs better clarity, less duplication, or safer future changes without altering outputs
Jak działa
- When to Use
- Quick Reference
- Smell to Refactor
- Delegate
- Core Pattern
- Output
- Common Mistakes
Podgląd SKILL.md
--- name: refactoring description: Restructure code without changing behavior, backed by tests or characterization checks. Use when code needs better clarity, less duplication, or safer future changes without altering outputs --- # Refactoring Use when behavior must remain the same while improving structure, readability, or testability. **Prerequisites:** Tests exist or you can add characterization tests to lock behavior. ## When to Use - Behavior must remain the same - Code is hard to read, too long, deeply nested, or duplicated - Small changes are risky because logic is entangled - You want to enable safer changes later Skip if: you are changing behavior or adding features, there is no safety net and you cannot add characterization tests, or the issue is purely formatting or linting. ## Quick Reference - Define invariants for inputs, outputs, and side effects - Ensure a safety net with tests or characterization checks - Apply the smallest possible refactor step - Verify after each step - Stop once the code is clear enough ## Smell to Refactor | Smell | Refactor | | ------------- | ----------------------------- | | Long function | Extract function | | Magic value | Extract constant | | Unclear name | Rename for intent | | Deep nesting | Guard clauses or early return | | God class | Split responsibilities | | Duplication | Extract shared function | ## Delegate - Use **test-writer** agent to add characterization tests when no safety net exists - Use **blueprinting** skill for multi-step refactors that need sequencing - Use **researching** skill when the right approach is unclear - Use **code-reviewer** agent to verify after refactoring Pipeline: refactoring → code-review ## Core Pattern - **Scope**: pick the smallest slice that matters - **Lock behavior**: tests, snapshots, or golden outputs - **Micro refactors**: extract function or variable, rename for intent, split responsibilities, replace nested conditionals with guard clauses - **Verify**: run checks after each step - **Stop**: avoid polishing beyond the goal ## Output Before refactoring: - Target files - Invariants - Safety net After refactoring: - What changed structurally - What stayed the same - Remaining risks or TODOs ## Common Mistakes - Mixing refactors with feature changes - Large diffs without checkpoints - Skipping the safety net and guessing behavior - Renaming without improving structure
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · azat-io/ai-config | 90 | MIT |
| gabrieldulolmarques/refactoring-skill | 100 | CC-BY-4.0 |
| 4typen/skills | 100 | MIT |
| t8jwscc7qy-sketch/foma-skills | 100 | Apache-2.0 |
| mtwuser/zero-cloud-gravity | 100 | MIT |
| krzysztofsurdy/code-virtuoso | 100 | MIT |
| sagargupta16/claude-skills | 100 | MIT |
| nimadorostkar/Claude-Skills-collection | 100 | MIT |
| DariuszDusza/agentic-workflow-foundry | 100 | Apache-2.0 |
Migawka bazy z 13.11.2026 · wersja paczki de4f3fa80e17 (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
- 95oma-refactor
Przebudowuje istniejący kod bez zmiany zachowania, z testami charakteryzującymi przy pracy nad długiem technicznym. - 100code-refactoring
Upraszcza i refaktoryzuje kod bez zmiany zachowania, usuwa duplikację i stosuje wzorce projektowe, w tym Extract Method, DRY i SOLID. - 100refactor-module
Restrukturyzuje kod na zlecenie z ticketu bez zmiany działania: wydziela funkcje, dzieli pliki, zmienia nazwy i redukuje duplikację z zachowaniem zachowania. - 100refactor
Restrukturyzuje działający kod bez zmiany zachowania: mapuje wywołania i pokrycie testami, dodaje testy charakteryzujące i wprowadza zmiany małymi krokami z pełnym zestawem testów po każdym. - 100test-driven-development
Stosuje RED, GREEN, REFACTOR przy zmianach zachowania i poprawkach, z testami charakteryzującymi przed refaktoryzacją. - 100refactor
Przebudowuje istniejący kod bez zmiany zachowania, małymi krokami za testami charakteryzującymi, w obrębie jednego serwisu.