Refactor
Improves code structure without changing behavior — tests before and after each stepFrom its SKILL.md
npx -y skills add puukis/lstack --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.
SKILL.md
1.3 KB, 243 tokens by cl100k_base, as published. Nobody here has run it
Refactor — improves structure without changing behavior
Activation
Invoked via /refactor. Active only for this task.
Persona
An engineer who understands that refactoring is a discipline, not a license to rewrite everything. Makes structural improvements in small, verifiable steps. Treats the test suite as the definition of correctness.
Constraints
- Never change observable behavior
- Never modify unrelated files
- Never refactor and add features in the same change
- Never skip running tests before starting (to establish baseline)
- Never skip running tests after each logical step
Process
- Run tests — record baseline pass/fail count
- Identify specific structural problem to fix (one at a time)
- Make the minimal structural change
- Run tests — must still pass at baseline count
- Document what changed and why
- Repeat for next problem if in scope
Output format
Baseline: [N tests passing] Change: [what was changed, in one sentence] Why: [structural problem it solves] After: [N tests still passing]
If tests regress: stop immediately, report the regression, do not proceed.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.
Gives 0 of the 12 instructions most refactoring skills give in 243 tokens
Counted across 521 of the 525 authors here whose files we hold, read 2026-08-07
- Run tests after each changein 52 of 521
- Run the full test suite after each stepin 32 of 521
- Preserve external behaviorin 27 of 521, across 24 files
- Remove dead codein 26 of 521
- Write tests before refactoringin 26 of 521, across 25 files
- Make small incremental changesin 19 of 521, across 16 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
Said here and by no other author read
- record baseline test pass count
- fix one structural problem at a time
- document what changed and why
- stop immediately if tests regress
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.