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

devops-cleanup

/devops-cleanup

Porządkuje kod bez zmiany zachowania: skraca komentarze, scala duplikaty, dzieli długie funkcje i usuwa martwy kod.

Licencja
MIT
Ostatnia zmiana repozytorium
05.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
2
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 05.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

Porządkuje kod bez zmiany zachowania: skraca komentarze, scala duplikaty, dzieli długie funkcje i usuwa martwy kod.

Oryginalny opis (EN)

Behavior-preserving code cleanup driven by a plain-English statement: reduce comments, replace duplicated code with calls to one implementation, split large functions into helpers, cut nesting and long parameter lists, delete dead and commented-out code. Researchers scan and pick targets, Coders change one thing per step in a side worktree, Reviewers check that nothing but structure changed, QA proves the tests and the before/after numbers. Use when the user says clean up, tidy, refactor, reduce comments, remove duplicate code, split big functions, simplify, or runs /cleanup.

Jak działa

  1. The statement
  2. The flow
  3. Lean (optional)
  4. What cleanup is not
Sekcje z nagłówków SKILL.md, w oryginale · 73 linii, 696 słów
Podgląd SKILL.md
---
name: devops-cleanup
description: >-
  Behavior-preserving code cleanup driven by a plain-English statement: reduce
  comments, replace duplicated code with calls to one implementation, split large
  functions into helpers, cut nesting and long parameter lists, delete dead and
  commented-out code. Researchers scan and pick targets, Coders change one thing
  per step in a side worktree, Reviewers check that nothing but structure changed,
  QA proves the tests and the before/after numbers. Use when the user says clean
  up, tidy, refactor, reduce comments, remove duplicate code, split big functions,
  simplify, or runs /cleanup.
---

# Cleanup

You are the **Orchestrator**. Cleanup changes how code is written, never what it
does. It runs on the same team, worktrees, gates and rules as the
`devops-multi-agent-team` skill (read its `SKILL.md` and the project profile
`.devops/project.md` first); this skill adds the method.

## The statement

The person says in plain English how the code should be cleaned, for example:

- "Reduce the comments in src/api, keep only the ones that explain why."
- "Find code that is written twice and call one function instead."
- "Split any function over 40 lines into helpers. Don't touch vendor/."
- "Clean up the billing module: duplicates, big functions and noisy comments, but keep the public API."

Turn it into a brief with `cleanup_brief` (MCP) or
`node scripts/devops-cleanup.mjs brief --statement "..."`. The brief holds the
**goals** (comments, duplicates, split, constants, dead code, naming), the **scope** (paths
named in the statement that exist, and what to leave alone), the **thresholds**
(function length, nesting, parameters, duplicate size; numbers in the statement
win), the **constraints** (your own sentences about what must not change, plus
the standing ones), and any sentence it did not understand. Show the brief to the
person. Ask about anything in `unrecognized`; do not guess. A vague statement
("tidy this up") or "follow clean code principles" uses all six scanned goals: comments, duplicates, split, constants, naming and oop (type switches that close code to extension, children that refuse what their parent promises, functions named for two jobs).
The standard being applied is [clean-code.md](../devops-multi-agent-team/references/clean-code.md); its thresholds are the defaults.

## The flow

The scan reports six kinds of candidate: duplicated blocks, functions over the length, nesting or
parameter limits, flag arguments, magic numbers, vague names, and noisy or commented-out code.

1. **Baseline.** Run the profile's validation in the sandbox. It must be green.
   If it is red, stop and report; cleanup does not start on a failing project.
   Run `cleanup_scan` with `save` so the numbers before are kept.
2. **Researcher: scan and choose.** Run `cleanup_scan` for the brief. For each
   candidate decide whether it is worth doing (a duplicate that is two
   different things by accident is not), pick the refactor, and rate the risk.
   Duplicates: search for an existing function first (`reuse_search`, the reuse
   map); the best fix is a call to code that exists. Comments: apply
   [comment-standards](../devops-multi-agent-team/references/comment-standards.md)
   and mark comments that explain *why* as keepers. Output a **cleanup plan**: an
   ordered list of small steps, each with `path:line`, the refactor, the test
   that covers it (or "no test: characterization test first"), and the risk.
3. **Coder (cleaner): one step at a time** in a detached worktree. Follow
   [cleanup-rules.md](references/cleanup-rules.md). Run the tests after every
   step. List every comment you keep in the Push JSON `comments`.
4. **Reviewers** confirm only structure changed: moved code is the same code,
   no condition, order, error path, lock scope or side effect differs, each
   duplicate now calls the one implementation, each new helper has a name that
   says what it does, and comments follow the standard. Remarks go on the
   virtual PR as line remarks.
5. **QA** reruns everything, runs `cleanup_scan` with `compare` and shows the
   numbers went the right way and nothing got worse, and checks the diff is
   free of unrelated churn. **Security** reviews only if the plan touched the
   profile's sensitive paths; a refactor of authentication or crypto code is a
   security change.
6. Nobody pushes before QA's PASS and the person's go.

## Lean (optional)

If the person said yes to Lean for this goal ([formal-check.md](../devops-multi-agent-team/references/formal-check.md)),
the plan adds an equivalence theorem for each step that changes a pure function, and the Cleaner (an AI Coder, never the person) writes and proves it before
the step counts as done. A step that cannot be proved in the time-box goes ahead on its tests and the plan says
"tests only". Proofs never replace the tests, the Reviewers' check or QA's `compare`.

## What cleanup is not

A feature, a bug fix, a performance change, a rename the person did not ask for,
a reformat of whole files, a dependency update. If cleanup finds a bug, record
it in a triage note and leave it; fix it in its own change.
Pliki w paczce (2)
  • SKILL.md 5 KB
  • references/cleanup-rules.md 6 KB

Wersje

W bazie nie ma innych skilli o nazwie devops-cleanup.

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

  • 100refactor
    Poprawia istniejący kod bez zmiany zachowania: dzieli duże funkcje, uzupełnia testy i upraszcza logikę, obniżając złożoność.
  • 100refactor-clean
    Porządkuje rozrośnięty, zduplikowany lub zaśmiecony kod: poprawia strukturę i usuwa martwy kod bez zmiany obserwowalnego zachowania.
  • 100code-simplification
    Redukuje złożoność działającego kodu bez zmiany zachowania: głębokie zagnieżdżenia, długie funkcje, duplikaty, martwy kod, niejasne nazwy i funkcje trudne do testowania.
  • 100awesome-code-cleanup
    Czyści kod ze śladów AI bez zmiany jego działania: komentarze narracyjne, martwy kod, niejasne nazwy i nadmierna abstrakcja.
  • 90refactor-safely
    Refaktoryzuje kod bez zmiany jego działania: zmienia nazwy, wyodrębnia, dzieli pliki, usuwa duplikaty i upraszcza funkcje.
  • 100spine-simplify
    Upraszcza kod po dodaniu funkcji: zwija zbędną pośredniość, usuwa martwy kod, spłaszcza zagnieżdżenia i ujawnia zduplikowaną logikę, bez zmiany zachowania.

Uwagi i zgłoszenia

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