Przejdź do treści
Biblioteka skilli
Programowanie · Przegląd i audyt

structure-review

/structure-review

Przegląda i porządkuje strukturę istniejącego kodu, zwłaszcza wygenerowanego przez AI, przed scaleniem dużej zmiany.

Repozytorium
groundwork ↗
Licencja
MIT
Ostatnia zmiana repozytorium
08.11.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.11.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

Przegląda i porządkuje strukturę istniejącego kodu, zwłaszcza wygenerowanego przez AI, przed scaleniem dużej zmiany.

Oryginalny opis (EN)

Use when asked to review, audit, clean up or refactor the structure of existing code, when inheriting an AI-generated codebase, when a single file holds most of a project, or before merging a large AI-written change.

Jak działa

  1. Scope guardrail
  2. Process
  3. Common mistakes
Sekcje z nagłówków SKILL.md, w oryginale · 53 linii, 527 słów
Podgląd SKILL.md
---
name: structure-review
description: Use when asked to review, audit, clean up or refactor the structure of existing code, when inheriting an AI-generated codebase, when a single file holds most of a project, or before merging a large AI-written change.
license: MIT
---

# Structure Review

Find structural slop in existing code, report it with rule IDs, then fix it in small, behavior-preserving steps.

**REQUIRED BACKGROUND:** structure-rules. Read its `reference.md` before scanning. For Java projects also java-package-structure.

## Scope guardrail

A structure refactor moves, splits and inlines code. It does **not** change behavior, public APIs, endpoints, CLI flags, config keys or output formats. If a fix would require one of those, report it and leave it for the user to decide.

## Process

1. **Baseline.** Find how the project builds and tests, and run it. Record the result. If there are no tests, say so in the report.
2. **Map.** List source files with line counts (`wc -l`, `find`). Note the entry point and which files hold which topics.
3. **Scan** for each rule:
   - S-01: files past ~300 lines, files with several unrelated top-level classes, an entry point holding logic.
   - S-02 / J-04: interface code doing business rules or data access, and services using HTTP types.
   - S-03 / J-09: for each private or module-level function, count its call sites with `grep -rnw "<name>"` (exclude the definition). Flag those with exactly one call site where no S-03 exception applies.
   - S-04: `utils` / `helpers` / `common` files holding domain code.
   - S-05: trivial forwarding files, one class per trivial function.
   - S-06: functions or classes with overlapping names or bodies (`grep` the key words of each suspicious one).
   - S-07: `grep -rnE "except Exception|except:|catch \\((Exception|Throwable)|catch \\([^)]*\\) *\\{ *\\}"` for broad and empty catches; log-and-rethrow pairs.
   - S-08: `grep -rnE "class (\\w*(Manager|Processor|Helper)|Handler)\\b"` and variables named `data`, `result`, `info`, `temp`.
   - S-09: parameters, options and flags with no caller; interfaces with one implementation that no convention requires.
   - Java: J-01 to J-11 against java-package-structure.
4. **Report** before changing anything, in this form:

   ```
   ## Structure review: <project>
   Baseline: <build/test command> → <result>

   | # | Rule | Location | Finding | Proposed fix |
   |---|------|----------|---------|--------------|
   | 1 | S-01 | main.py (870 lines) | discovery, SOAP, HTTP server and CLI in one file | split into discovery.py, renderer.py, media_server.py, cli.py |
   | 2 | S-03 | renderer.py:42 `build_url()` | 1 call site (renderer.py:88), 3 lines | inline into play() |

   Suggested order: <fix numbers, smallest and safest first>
   ```

5. **Fix** after the user approves. One finding per step: move or inline, update imports, run the build/tests, then go on to the next one. Stop and report if a step breaks the baseline.
6. **Close** with the final file tree, the build/test result, and any findings deliberately left open.

## Common mistakes

| Mistake | Fix |
|---|---|
| Rewriting logic while moving it | Move code verbatim. Clean up only in a separate, explicit step. |
| Inlining a helper that has tests or is used as a callback | Check S-03's exceptions before inlining. |
| One giant commit "restructure project" | One finding per step, verified each time. |
| Splitting a 100-line script into many files | S-05: small single-purpose scripts may stay in one file. |
| Counting call sites only in the same file | Search the whole repository, including tests and templates. |

Wersje

RepozytoriumWynikLicencja
Ta strona · tamerardall/groundwork100MIT
yuvarajsalla20/code-review-kit90MIT

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

  • 82review-code
    Przegląda kod pod kątem błędów, ryzyk i jakości przed scaleniem zmian.
  • 100code-review-and-quality
    Prowadzi wieloosiowy code review (poprawność, bezpieczeństwo, wydajność, projekt) przed scaleniem zmiany.
  • 100pr-review
    Wykonuje lokalny przegląd kodu PR z pełnym kontekstem projektu, po poleceniu /pr-review lub przed scaleniem zmian.
  • 100code-review-gate
    Stosuje surową bramkę przeglądu kodu przed commitem lub scaleniem PR, gdy użytkownik prosi o kontrolę zmian.
  • 100code-review-and-quality
    Prowadzi wielowymiarowy przegląd kodu przed scaleniem zmiany, niezależnie czy autorem jest człowiek, inny agent czy sam Claude.
  • 100code-review-and-quality
    Prowadzi wieloosiowy przegląd kodu przed scaleniem zmiany, także własnej, napisanej przez agenta lub przez człowieka.

Uwagi i zgłoszenia

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