Refactor
Global Kiro steering + skills — portable AI engineering layer. Pairs with template-generic-project (spec → handoff → code).
npx -y skills add LaProgrammerie/ai-engineering-core --skill refactorAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Safe refactoring in small verifiable steps; no scope creep outside handoff or explicit request.
SKILL.md
1.3 KB, as published. Nobody here has run it
Refactor (global)
Objective
Improve structure and readability without changing observable behaviour, in verifiable steps.
When to use
- Hard-to-follow, duplicated, or overly coupled code
- Before adding a feature on brittle structure
Expected inputs
- Scope (files, module, or symptom)
- Tests or verification commands (if none, say so)
- Constraints (public API, backward compatibility, performance)
Scope discipline
- Do not refactor outside the defined scope (handoff, spec slice, or explicit user request).
- If broader cleanup is desirable, list it as follow-ups rather than doing it silently.
Steps
- Clarify goal: readability, layering, targeted performance — do not mix goals in one step.
- Phased plan if scope is large — propose before editing.
- Small steps: one transformation at a time; run tests / checks after each step when possible.
- Preserve public contracts unless a breaking change is explicitly requested (then document migration).
- Remove dead code only when sure it is unused.
Output format
- Ordered plan → changes made or proposed
- Risks and rollback lever
- Remaining work if partial
Gives 1 of the 12 instructions most refactoring skills give
Counted across 521 of the 525 authors here whose files we hold, read 2026-08-06
- run tests after each changehere, and in 59 of 521, across 56 files
- write tests before refactoringin 27 of 521, across 24 files
- preserve external behaviorin 26 of 521, across 22 files
- remove dead codein 25 of 521, across 24 files
- make small incremental changesin 20 of 521, across 17 files
- break the implementation into tiny commitsin 18 of 521, across 5 files
- ask the user about alternative optionsin 17 of 521, across 4 files
- create a GitHub issue with the planin 17 of 521, across 4 files
- explore the repository to verify assertionsin 17 of 521, across 4 files
- interview the user about the refactorin 16 of 521, across 3 files
- check the codebase for test coveragein 16 of 521, across 3 files
- refactor one thing at a timein 16 of 521, across 12 files
Said here and by no other author read
- clarify one goal before editing
- propose a phased plan for large scopes
- document breaking changes when explicitly requested
- list broader cleanup as follow-ups
- provide an ordered plan of changes
- identify risks and rollback lever
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once.