
Description
indexion-refactor is an agent skill from the indexion-skills collection by trkbt10, listed on skills.sh. It runs after code is written to find and remove duplication at three levels: textual copy-paste blocks, structural duplication such as shared code across packages, and conceptual duplication where one idea has more than one source of truth. The skill also flags unnecessary wrapper functions left over from a refactor. It uses indexion's analysis commands to do the detection, and then checks that the single source of truth is enforced. The skill lists when to run it: after adding a new abstraction such as a type, module or API layer, after introducing a new file format or I/O boundary, when a fix touched three or more files for the same reason, or when a guard or skip was added to work around a structural problem. It is also useful when filesystem errors such as ENOENT appear from unexpected paths, when extracting code shared across packages, and as a periodic health check. It suits maintainers who want an agent to keep a codebase tidy as it grows, rather than letting copies accumulate. The skill is free and open source.…
Highlights
- Finds copy-paste blocks and shared code
- Removes unnecessary wrapper functions
- Checks single source of truth
- Run after new abstractions or refactors
Ratings & Reviews
No ratings yet
Be the first to rate indexion-refactor.
People also visit

code-refactoring-refactor-clean
You are a code refactoring expert specializing in clean code principles
indexion-refactor FAQ
What does indexion-refactor do?
It finds and removes duplication in code at three levels, and checks that each concept has one source of truth.
How do I install it?
Run: npx skills add https://github.com/trkbt10/indexion-skills --skill indexion-refactor.
Is it free?
Yes. The skill is free and open source.
When should I run it?
After adding a new abstraction, after a fix touched three or more files for one reason, or as a periodic health check.
What are the three levels?
Textual copy-paste, structural duplication across packages, and conceptual duplication against the single source of truth.
Does it remove wrappers?
Yes. It looks for unnecessary trivial wrapper functions, which it flags for cleanup.
What are the best indexion-refactor alternatives?
Popular alternatives to indexion-refactor include dry-refactoring, clean-code and code-refactoring-refactor-clean. See all indexion-refactor alternatives














