Refactor
🧿 Minimal but effective AI agent skill definitions in 100 lines or less.
npx -y skills add kimtth/agent-skill-100-lines-or-less --skill refactorAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 2 stars2 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
Use when: improve code structure, readability, type safety, or maintainability without changing external behavior.
SKILL.md
1.1 KB, as published. Nobody here has run it
Goal: make code easier to change while preserving behavior.
Use for:
- long functions, duplicated logic, unclear names, weak types, or tangled modules
- extracting functions or deep modules
- replacing brittle conditionals with clearer structure
- gradual cleanup before or after a feature
Workflow:
- Identify the behavior that must not change.
- Find or add focused tests before risky edits.
- Make one small refactor at a time.
- Run targeted verification after each meaningful step.
- Stop if behavior changes or tests become unclear.
- Summarize the structural improvement and evidence.
Common moves:
- extract function or object
- rename for domain clarity
- remove duplication
- split orchestration from pure logic
- tighten types and invariants
- isolate side effects
Rules:
- do not mix refactor with feature work
- do not rewrite from scratch unless explicitly requested
- preserve public APIs unless deprecation is part of the plan
- if tests are absent, reduce scope and verify by behavior