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

guiding-refactoring-with-code-health

/guiding-refactoring-with-code-health

Dobiera małe, bezpieczne kroki refaktoryzacji na podstawie wyników Code Health i sprawdza, czy kod się poprawił.

Licencja
Apache-2.0
Ostatnia zmiana repozytorium
27.10.2026

Ocena i bezpieczeństwo

90/ 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ść25 / 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

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co robi i kiedy

Dobiera małe, bezpieczne kroki refaktoryzacji na podstawie wyników Code Health i sprawdza, czy kod się poprawił.

Oryginalny opis (EN)

Use when refactoring unhealthy code and needing Code Health findings to choose small safe steps and verify improvement.

Jak działa

  1. Overview
  2. When to Use
  3. Quick Reference
  4. Implementation
  5. Common Mistakes
Sekcje z nagłówków SKILL.md, w oryginale · 38 linii, 318 słów
Podgląd SKILL.md
---
name: guiding-refactoring-with-code-health
description: Use when refactoring unhealthy code and needing Code Health findings to choose small safe steps and verify improvement.
---

# Guiding Refactoring With Code Health

## Overview

Use Code Health as the control signal for refactoring. The agent should first understand why a file is hard to work with, establish a measurable baseline, then improve it in small structural steps and verify that each step helped. The goal is not just cleaner code, but code that is easier for both humans and agents to understand and modify safely.

## When to Use

- A file is hard to read, risky to change, or repeatedly attracts defects.
- The user asks for refactoring help and wants an objective way to measure progress.
- A safeguard or review points to complexity, size, low cohesion, or deep nesting.

Do not use this skill when the task is to rank project-wide priorities. Use `prioritizing-technical-debt` for that.

## Quick Reference

- `code_health_review`: Detailed maintainability findings for a file.
- `code_health_score`: Numeric baseline and trend check across refactoring iterations.

## Implementation

1. Run `code_health_review` on the target file.
2. Record the current `code_health_score` so the refactoring starts from a measurable baseline.
3. Identify the highest-leverage structural problems, such as excessive responsibilities, deep nesting, low cohesion, or hard-to-follow control flow.
4. Propose 3 to 5 small structural refactor steps, not a single rewrite.
5. After each meaningful step, re-run `code_health_review` to see whether the targeted structural problems were reduced.
6. Use `code_health_score` as the compact checkpoint to confirm directional improvement across iterations.
7. Stop only when the targeted structural issues are substantially reduced and the score has measurably improved, or when the user explicitly accepts a partial uplift.

## Common Mistakes

- Refactoring without a baseline review.
- Refactoring without recording the initial score.
- Making a large rewrite that hides whether things improved.
- Counting cosmetic cleanup as meaningful progress when the structural problems remain.
- Using score checks alone without re-running the detailed review.
- Forgetting to re-measure after each meaningful step.

Wersje

W bazie nie ma innych skilli o nazwie guiding-refactoring-with-code-health.

Identyczna treść występuje jeszcze w 1 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.

Migawka bazy z 28.10.2026 · wersja paczki 5c66b361565e (skrót SHA-256 całej paczki)

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

Podobne skille

  • 86code-refactoring
    Refaktoryzuje i optymalizuje kod, analizując go, wprowadzając poprawki i dokumentując zmiany.
  • 100refactoring
    Wykrywa code smells i stosuje systematyczne techniki refaktoryzacji z książki Martina Fowlera, w tym dobór techniki, bezpieczne przekształcenia i przyrostowe ulepszanie kodu legacy.
  • 100qe-refactoring-patterns
    Stosuje bezpieczne wzorce refaktoryzacji, które poprawiają strukturę kodu bez zmiany zachowania, przy porządkowaniu kodu i redukcji długu technicznego.
  • 96code-refactoring-context-restore
    Prawdopodobnie wspiera refaktoryzację kodu przez odtwarzanie kontekstu pracy, na podstawie nazwy.
  • 86refactoring
    Pomaga refaktoryzować kod, gdy użytkownik wyraźnie prosi o refaktoryzację.
  • 100dev-code-quality
    Skanuje bazę kodu pod kątem duplikacji, nadmiarowości i możliwości poprawy, wskazując cele refaktoryzacji i ogólny stan kodu.

Uwagi i zgłoszenia

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