name: orch-refine-code
description: 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.
origin: ECC
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
Run the orch-pipeline engine with the settings above.
For dead-code / duplication sweeps, delegate to the refactor-cleaner agent
(it runs knip / depcheck / ts-prune and removes safely).
Stop at Gate 1 (restructure plan) and Gate 2 (pre-commit).
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]
1---2name: ecc-orch-refine-code3description: "Vibe Toolkit skill: ecc-orch-refine-code"4metadata:5 source: https://skillmd.com/skills/tano2026/ecc-orch-refine-code6---78---9name: orch-refine-code10description: 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.11origin: ECC12---1314# orch-refine-code1516Actor · action · target: **orch · refine · code**. Thin wrapper over the shared17engine in [`orch-pipeline`](../orch-pipeline/SKILL.md).1819## When to Use2021- Same behavior, **better structure**: extract modules, remove duplication, kill22 dead code, reduce nesting, rename for clarity.23- Distinguish from siblings: if behavior is meant to change at all, this is the24 wrong skill (`orch-change-feature` / `orch-fix-defect`).2526## Operation settings2728- **Default size floor:** standard — restructures touch multiple files.29- **Phase mask:** 0 → 2 (plan the restructure) → 4 (keep green) → 5 → 6. No new30 behavior tests are written — the existing suite is the safety net.31- **First move (phase 4):** confirm the relevant tests exist and are **green32 before** touching code; if coverage is thin, add characterization tests first.33 Then restructure in small steps, re-running tests after each.3435## How It Works36371. Run the `orch-pipeline` engine with the settings above.382. For dead-code / duplication sweeps, delegate to the `refactor-cleaner` agent39 (it runs knip / depcheck / ts-prune and removes safely).403. Stop at **Gate 1** (restructure plan) and **Gate 2** (pre-commit).414. Commit as `refactor:` — the diff must be behavior-neutral.4243## Example4445```46orch-refine-code: extract the NWS HTTP client out of poller.py47→ confirm tests green → plan extraction [GATE 1: approve]48→ move in small steps, tests green throughout → code-review49→ commit refactor: [GATE 2: confirm]50```51
Run npx get-skill add tano2026/ecc-orch-refine-code in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
name: orch-refine-code It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: docs only. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
tano2026 (@tano2026) published this skill. Their other Agent Skills are listed on their SkillMD profile.