Communitygithub.com

orch-refine-code (코드 리파인 오케스트레이션)

동작을 유지하면서 코드 구조를 개선합니다. 테스트가 통과하는지 확인하고, 구조를 변경한 후에도 테스트가 계속 통과하는지 검증하며, 리뷰 후 게이트 커밋을 수행합니다. 동작 변경 없이 구조만 개선해야 할 때 사용하세요.

orch-refine-code (코드 리파인 오케스트레이션)란 무엇인가요?

이 스킬은 AI 에이전트가 코드의 동작을 변경하지 않고 구조를 개선하는 **행동 보존 리팩터링**을 오케스트레이션합니다. 개발자는 'orch-refine-code'라는 액터-액션-타겟 명령을 통해 호출하며, 내부적으로는 `orch-pipeline` 엔진을 기반으로 동작합니다. 이 스킬은 함수 추출, 중복 제거, 데드 코드 삭제, 중첩 감소, 명확한 이름 변경 등 구조 개선 작업에 최적화되어 있습니다. 새로운 기능 추가나 버그 수정(동작 변경)이 필요한 경우에는 `orch-change-feature`나 `orch-fix-defect`을 사용해야 합니다. 작동 방식은 다음과 같습니다: 먼저 대상 테스트가 존재하고 통과하는지 확인한 후, 작은 단계로 코드를 리팩터링하고 각 단계마다 테스트를 다시 실행하여 동작이 유지되는지 확인합니다. 데드 코드나 중복 제거를 위해서는 `refactor-cleaner` 에이전트(knip/depcheck/ts-prune 실행)에게 위임합니다. 두 개의 게이트(Gate 1: 리팩터링 계획 승인, Gate 2: 사전 커밋 확인)에서 중단되어 사용자 확인을 받으며, 최종 커밋 메시지는 `refactor:`로 지정됩니다. 이 스킬은 Claude Code, Cursor 등 `orch-pipeline` 엔진을 지원하는 모든 AI 에이전트 환경에서 사용할 수 있습니다.

지원 대상✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/everything-claude-code/tree/main/skills/orch-refine-code

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

orch-refine-code (코드 리파인 오케스트레이션)은(는) 무엇을 하나요?

Actor · action · target: orch · refine · code. orch-pipeline에 있는 공유 엔진의 간단한 래퍼입니다.

사용 시기

  • 동일한 동작, 더 나은 구조: 모듈 추출, 중복 제거, 데드 코드 삭제, 중첩 감소, 명확성을 위한 이름 변경
  • 형제 스킬과의 구분: 동작이 조금이라도 변경된다면 이 스킬은 적합하지 않습니다 (orch-change-feature / orch-fix-defect 사용)

운영 설정

  • 기본 크기 제한: 표준 — 구조 변경은 여러 파일에 걸쳐 있습니다.
  • 단계 마스크: 0 → 2 (구조 변경 계획) → 4 (초록색 유지) → 5 → 6. 새로운 동작 테스트는 작성되지 않으며, 기존 테스트 스위트가 안전망 역할을 합니다.
  • 첫 번째 단계 (phase 4): 코드를 건드리기 전에 관련 테스트가 존재하고 초록색인지 확인합니다. 커버리지가 부족하면 먼저 특성화 테스트를 추가합니다. 그런 다음 작은 단계로 구조를 변경하고 각 단계 후 테스트를 다시 실행합니다.

작동 방식

  1. 위 설정으로 orch-pipeline 엔진을 실행합니다.
  2. 데드 코드 / 중복 제거 작업의 경우 refactor-cleaner 에이전트(knip / depcheck / ts-prune을 실행하고 안전하게 제거)에게 위임합니다.
  3. 게이트 1 (구조 변경 계획)과 게이트 2 (커밋 전)에서 중단합니다.
  4. refactor:로 커밋합니다 — diff는 동작 중립적이어야 합니다.

예시

orch-refine-code: poller.py에서 NWS HTTP 클라이언트 추출
→ 테스트 초록색 확인 → 추출 계획  [게이트 1: 승인]
→ 작은 단계로 이동, 내내 테스트 초록색 → 코드 리뷰
→ refactor: 커밋  [게이트 2: 확인]

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

affaan-m/everything-claude-code

End-to-end marketing campaign planning and execution. Covers audience research, positioning, campaign angle definition, landing page copy, email sequences, social posts, ad copy, short-form video scripts, and content calendars. Use as the orchestration layer for multi-channel product launches. Use when planning or executing a multi-channel product launch, or producing landing page, email, social, or ad copy.

affaan-m/everything-claude-code

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/everything-claude-code-conventions

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use when the user asks to build web components, pages, or applications and the visual direction matters as much as the code quality.

affaan-m/gget

gget CLI and Python workflow for quick genomic database queries, sequence lookup, BLAST-style searches, enrichment checks, and reproducible bioinformatics evidence logs.

affaan-m/literature-review

Systematic literature-review workflow for academic, biomedical, technical, and scientific topics, including search planning, source screening, synthesis, citation checks, and evidence logging.

affaan-m/motion-ui

Production-ready UI motion system for React/Next.js. Use when implementing animations, transitions, or motion patterns.

affaan-m/project-guidelines-example

Example project-specific skill template based on a real production application.

affaan-m/pubmed-database

Direct PubMed and NCBI E-utilities search workflows for biomedical literature, MeSH queries, PMID lookup, citation retrieval, and API-backed literature monitoring.

affaan-m/scholar-evaluation

Structured scholarly-work evaluation for papers, proposals, literature reviews, methods sections, evidence quality, citation support, and research-writing feedback.

affaan-m/uspto-database

USPTO patent and trademark data workflow for official record lookup, PatentSearch queries, TSDR checks, assignment data, and reproducible IP research logs.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

관련 스킬