Orchestrated Refactoring
A behavior-preserving refactor run by the orch engine: confirm tests are green, restructure in small steps, keep tests green, gated commit as refactor:.
- What
- A behavior-preserving refactor run by the orch engine: confirm tests are green, restructure in small steps, keep tests green, gated commit as refactor:.
- Cost
- Free
- Needs
- Use "Orchestrated Refactoring" with your Muse.
- Install
- Copy the installer prompt below into your Muse — your agent does the rest.
Curated by Skill Harbor: a thin, disciplined wrapper over the shared orch-pipeline engine for the one job where the diff must change nothing observable. The rule is absolute: same behavior, better structure. The operation runs a fixed phase mask: plan the restructure, then keep green, with two gates, one on the restructure plan and one pre-commit. The first move is always to confirm the relevant tests exist and are green before touching code; where coverage is thin, characterization tests are added first, because the existing suite is the safety net and no new behavior tests are written. Restructuring proceeds in small steps with the test suite re-run after each. For dead-code and duplication sweeps it delegates to the refactor-cleaner agent, which runs knip, depcheck, and ts-prune and removes safely. The commit lands as refactor:, and the diff must be behavior-neutral. If behavior is meant to change at all, this is the wrong skill; the siblings orch-change-feature and orch-fix-defect cover those. By @affaan-m, listed here with credit to its creator. From the affaan-m/ECC repository (MIT). Honest caveats: green tests prove the suite passes, not that behavior is truly preserved; thin coverage means a thinner safety net, add characterization tests. Skill Harbor never reviews the code, review it yourself before use.
Version:
Install
Copy the install package below, then paste it into MuseThe install prompt below already includes the vetting steps: your agent follows the community checklist before installing anything with executable code. Want more?
Use "Orchestrated Refactoring" with your Muse. Prerequisites: none to install. Pure guidance; a project with a test suite helps (thin coverage gets characterization tests first). 1. Open the skill: https://github.com/affaan-m/ECC/blob/main/skills/orch-refine-code/SKILL.md and copy the full SKILL.md text. 2. Paste it into a chat with Muse and add: "Refactor [module/file] without changing behavior: [what to improve]." 3. Confirm tests are green first, approve the restructure plan at Gate 1, keep tests green through the small steps, confirm the pre-commit review at Gate 2. Tip: if you want any behavior change at all, stop and switch to orch-change-feature; this skill's contract is behavior-neutral. Safety: a skill is plain-text instructions; it runs nothing by itself. Review the final diff before committing.
Saved to your recent installs. Find it anytime on /connect.
Questions
How do I install a build?
Every product page includes a copy-paste install prompt. Paste it into your Muse and it sets the build up for you — no manual configuration.
Where does my money go?
Straight to the seller. Skill Harbor never processes payments: checkout happens on the seller’s own page, usually Stripe.
What does the ✓ next to a creator’s name mean?
It means we confirmed the identity of the person behind the listing. It says nothing about the code itself — always check a build before installing it.