Orch refine code

From aaione/everything-claude-code-zh · View interactive version

Orch refine code is an AI agent skill from the GitHub repository aaione/everything-claude-code-zh. 编排行为保持不变的重构——确认测试为绿色,在不改变行为的前提下调整结构,保持测试绿色,审查并门控提交。用于结构需要改进但行为不能改变的场景。

How to use this skill

Skill file

orch-refine-code

Actor · action · target:orch · refine · code。这是共享引擎 CODE0 上的一层薄包装。

何时使用

运行设置

工作方式

  1. 使用上述设置运行 orch-pipeline 引擎。
  2. 对死代码 / 重复清理,委派给 refactor-cleaner 智能体(它会运行 knip / depcheck / ts-prune 并安全删除)。
  3. 在 Gate 1(重构计划)和 Gate 2(提交前)停止。
  4. 以 refactor: 提交——diff 必须保持行为中性。

示例

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]
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.