Orch Refine Code
Behavior-preserving refactor that confirms green tests, restructures in small steps, and gates the commit.
- CCM score
- 69 of 100
- skills.sh installs
- 6.8K
- GitHub stars
- 312.6K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers confirming the relevant tests are green, planning the restructure, moving code in small steps, and review
- Delegates dead-code and duplication sweeps to the
refactor-cleaneragent, which runs knip, depcheck, and ts-prune - Adds characterization tests first when coverage is thin, and stops at two gates: restructure plan and pre-commit
- Designed for structure-only changes where behavior must not change, and commits are labeled
refactor:
Install
$ npx -y skills add affaan-m/ecc --skill orch-refine-code -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
orch-refine-code
Actor · action · target: orch · refine · code. Thin wrapper over the shared
engine in orch-pipeline.
When to Use
- Same behavior, better structure: extract modules, remove duplication, kill dead code, reduce nesting, rename for clarity.
- Distinguish from siblings: if behavior is meant to change at all, this is the
wrong skill (
orch-change-feature/orch-fix-defect).
Operation settings
- Default size floor: standard — restructures touch multiple files.
- Phase mask: 0 → 2 (plan the restructure) → 4 (keep green) → 5 → 6. No new behavior tests are written — the existing suite is the safety net.
- First move (phase 4): confirm the relevant tests exist and are green before touching code; if coverage is thin, add characterization tests first. Then restructure in small steps, re-running tests after each.
How It Works
Details
- Repository
- github.com/affaan-m/ecc
- Categories
- Code Review & Quality, Git & Releases, Agent Workflow & Planning
- First seen
- Jul 14, 2026
Questions
What does the orch-refine-code skill do?
It orchestrates a behavior-preserving refactor: it confirms the tests are green, restructures the code without changing behavior, keeps tests green, runs a review, and makes a gated commit. The skill is meant for cases where the structure should improve but behavior must stay the same.
When should I use orch-refine-code instead of a sibling skill?
Use it when you want better structure, such as extracting modules, removing duplication, killing dead code, reducing nesting, or renaming for clarity. If behavior is meant to change at all, the page points to orch-change-feature or orch-fix-defect instead.
How do I install orch-refine-code?
Run npx -y skills add affaan-m/ecc --skill orch-refine-code -y in your project. Once installed, the agent can run an orchestrated refactor that stops at a plan gate and a pre-commit gate before committing as refactor:.
How does orch-refine-code handle dead code and duplication sweeps?
For dead-code and duplication sweeps it delegates to the refactor-cleaner agent, which runs knip, depcheck, and ts-prune and removes code safely. If test coverage is thin, it adds characterization tests before restructuring in small steps.
More from affaan-m/ecc
All 257- Orch Change Feature6.8K
- Literature Review6.4K
- Scholar Evaluation5.8K
- Pubmed Database5.7K
- Gget5.5K
- Uspto Database5.5K
- Project Guidelines Example1.7K
- Agent Harness Construction1.1K
- Autonomous Agent Harness1.1K
- Continuous Learning V21.1K
- Security Review21.3K
- Video Editing19.2K
- Golang Patterns18.1K
- Backend Patterns17.8K
- Coding Standards17.6K
- Frontend Patterns17.6K
- Docker Patterns16.8K
- Golang Testing16.5K
- Python Patterns15.6K
- Springboot Patterns15.5K
- Api Design15.3K
- Market Research15.3K
- Postgres Patterns15.2K
- Frontend Slides15.2K
Similar to Orch Refine Code
More Code Review & Qualityorch-change-featureaffaan-m/ecc6.8K installsOrchestrated workflow that alters working behavior by updating tests to the new spec before changing code.
code-refactoring-refactor-cleansickn33/agentic-awesome-skills1.3K installsRefactoring playbook that analyzes code smells and applies incremental, behavior-preserving changes with test verification.
refactorparcadei/continuous-claude-v3625 installsSafe refactoring workflow that chains analysis, planning, implementation, review, and test validation through named agents.
codebase-cleanup-refactor-cleansickn33/agentic-awesome-skills972 installsStructured refactoring workflow that plans cleanup steps, prioritizes targets, and sets verification gates before changes land.