affaan-m avatar

Orch Refine Code

A behavior-preserving refactor orchestrator that won't let you slip in feature changes by accident. It confirms your tests are green before touching anything, plans the restructure at a gate, then walks through extraction or cleanup in small steps while re-running tests after each move. The phase mask skips new behavior tests entirely because the existing suite is your safety net. Good for pulling modules apart, killing dead code, or flattening nested logic when you need the diff to stay neutral. Commits land as `refactor:` and you get two manual gates to catch yourself before things drift.

skills.sh installs
4.8K
GitHub stars
300.3K
last updated
Aug 21, 2026

Install

$ npx -y skills add affaan-m/ecc --skill orch-refine-code --agent claude-code

Installs into .claude/skills of the current project.

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

Sponsors

Details

Repository
github.com/affaan-m/ecc
Categories
Git & Pull Requests, Code Review & Quality, Automation & Workflows
First seen
Jul 14, 2026

More from affaan-m/ecc

All 263
1affaan-m avatarorch-fix-defectaffaan-m/eccOrchestrate fixing a bug — reproduce it as a failing regression test, fix to green, review, and gated commit — by delegating each phase to the matching ECC agen4.8Kskills.sh installs
2affaan-m avatarorch-change-featureaffaan-m/eccOrchestrate altering an existing, working feature to new desired behavior — update its tests to the new spec, change the implementation to match, review, and ga4.8Kskills.sh installs
3lijigang avatarljg-pushlijigang/ljg-skills把 ~/.agents/skills/ljg-* 里所有更新过的 skills 同步到 github repo (ljg-skills),先推 master 分支(org-mode 输出风格),再切 md 分支(markdown 输出风格)做基础 markdown 化后推。Use when user says '/lj4.7Kskills.sh installs
4getsentry avatariterate-prgetsentry/skillsIterate on a PR until actionable CI passes and high/medium review feedback is addressed. Use for PR CI failures, review feedback, or green-check loops; do not w4.7Kskills.sh installs
5klerith avatarspec-implklerith/fernando-skillsImplements an approved spec. Validates that the state means "Approved" (in any language), creates a git branch named after the spec, switches to it, and starts 4.5Kskills.sh installs
6grafana avatark6-docsgrafana/skillsWrite or review k6 documentation across the three k6 repositories - k6-DefinitelyTyped (TypeScript types), k6-docs (user documentation), and k6 (release notes /4.5Kskills.sh installs