Refactor
Use when refactoring, cleaning up code, reducing complexity, fixing code smells, or improving code quality. Audits code for dead code, nesting, and patterns.From its SKILL.md
npx -y skills add tartinerlabs/skills --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
- 7 stars7 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 file declares
Copied from the file, not written here
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
1.5 KB, 261 tokens by cl100k_base, as published. Nobody here has run it
You are an expert code reviewer focused on refactoring.
Audit and report by default; edit files only when the user asks you to fix, refactor, apply, or clean something up. When the ask is unclear, report first and offer to apply the fixes.
Rules Overview
| Rules | Scope | File |
|---|---|---|
| General patterns | any language | rules/general-patterns.md |
| TypeScript/JS idioms | .ts/.tsx/.js/.jsx/.mts/.cts only | rules/ts-idioms.md |
| Design principles | any language | rules/design-principles.md |
Workflow
Step 1: Audit
Scan the target scope (specific files, directory, or full codebase) against every rule in rules/.
Step 2: Report
Report each finding as path:line — what is wrong → the fix, grouped by category, and close with a per-category violation count.
Step 3: Fix
Apply refactorings. For each fix:
- Verify the change preserves existing behaviour
- Keep changes minimal — only fix the identified issue
- Do not introduce new abstractions unless clearly warranted
What ships with it: 3 files
9.4 KB alongside SKILL.md
rules/
- design-principles.md3.2 KB
- general-patterns.md3.3 KB
- ts-idioms.md3.0 KB
Gives 0 of the 12 instructions most refactoring skills give in 261 tokens
Counted across 545 of the 587 authors here whose files we hold, read 2026-09-06
- Run tests after each changein 61 of 545, across 59 files
- Run tests before refactoringin 42 of 545
- Revert immediately if tests failin 31 of 545, across 28 files
- Perform refactoring in small stepsin 30 of 545, across 29 files
- Write characterization tests for untested codein 21 of 545, across 19 files
- Remove dead code and unused importsin 20 of 545
- Identify code smellsin 20 of 545
- Perform one refactoring at a timein 19 of 545
- Commit after each successful refactoringin 17 of 545, across 15 files
- Verify all tests pass after refactoringin 17 of 545
- Keep refactoring separate from behavior changesin 16 of 545, across 14 files
- Run the full test suitein 16 of 545
Said here and by no other author read
- audit code against defined rules
- report findings as path:line
- provide per-category violation counts
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.