affaan-m/ecc

orch-refine-code

Orchestrate a behavior-preserving refactor — confirm tests are green, restructure without changing behavior, keep tests green, review, and gated commit. Use when the structure should improve but behavior must not change.

All-time #4162 Trending #2655 First seen Jun 7, 2026
8-week activity · all time api

Installation

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

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from affaan-m/ecc · top by installs.

npx skills add affaan-m/ecc

Browse all from affaan-m/ecc

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 254.3K
License LICENSE
Default branch main
Open issues 54
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

More metadata
origin
ECC

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,819 B
  • docs SUMMARY.md 243 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 3,139 installs

SKILL.md

orch-refine-code

Actor · action · target: orch · refine · code. Thin wrapper over the shared engine in [orch-pipeline](../orch-pipeline/SKILL.md).

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

  1. Run the orch-pipeline engine with the settings above.
  2. For dead-code / duplication sweeps, delegate to the refactor-cleaner agent

(it runs knip / depcheck / ts-prune and removes safely).

  1. Stop at Gate 1 (restructure plan) and Gate 2 (pre-commit).
  2. Commit as refactor: — the diff must be behavior-neutral.

Example

orch-refine-code: extract the NWS HTTP client out of poller.py
→ confirm tests green → plan extraction  [GATE 1: approve]
→ move in small steps, tests green throughout → code-review
→ commit refactor:  [GATE 2: confirm]