본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)280k · #377

orch-refine-code

하는 일

이 도구는 코드를 더 깔끔하고 이해하기 쉽게 재정리하되, 하는 일은 바꾸지 않습니다. 모든 것이 전과 같이 계속 작동하도록 보장합니다.

사용하는 경우

  • ✓코드 구조를 개선하고 싶을 때.
  • ✓반복되는 코드가 있어서 제거할 수 있을 때.
  • ✓더 이상 쓰이지 않는 코드를 없애고 싶을 때.

스킬 링크

https://github.com/affaan-m/ECC/blob/main/skills/orch-refine-code/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/affaan-m/ECC/blob/main/skills/orch-refine-code/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“poller.py 파일에서 NWS HTTP 클라이언트 코드를 분리해 리팩터링해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

도구는 먼저 기존 테스트가 통과하는지 확인합니다. 그다음 작은 단계로 코드를 재구성하며, 각 변경 후 테스트합니다. 마지막으로 모든 것이 올바르게 작동하면 변경 사항을 저장합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

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

  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).
  3. Stop at Gate 1 (restructure plan) and Gate 2 (pre-commit).
  4. 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]
자주 묻는 질문

코드의 '동작'이란 무엇을 뜻하나요?

동작은 코드가 무엇을 하는지, 어떻게 기능하는지, 어떤 결과를 내는지입니다. 이 도구는 최종 결과가 바뀌지 않도록 보장합니다.

'tests'란 무엇인가요?

코드가 기대대로 작동하는지 확인하는 자동 검사입니다. 테스트가 실패하면 코드 어딘가가 망가졌다는 뜻입니다.

'commit'이란 무엇인가요?

코드 변경 사항 묶음을 저장하는 것과 같습니다. '게이트된 커밋(gated commit)'은 모든 검사(테스트)가 통과해야만 저장된다는 뜻입니다.

상세 정보

작성자의 원본 설명

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.

repo: affaan-m/ECC

인기도

GitHub 스타
280k
순위
#377
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬