refactor-plan
하는 일
이 에이전트는 여러 코드 파일을 변경하기 전에 상세한 계획을 세웁니다. 기존 코드를 분석하고, 영향을 받는 파일을 찾아 안전한 변경 순서를 제안합니다.
사용하는 경우
- ✓큰 코드 변경을 계획하고 싶을 때.
- ✓여러 파일을 한꺼번에 건드리기 전에.
- ✓코드 변경이 안전하고 체계적으로 이루어지도록 하고 싶을 때.
스킬 링크
https://github.com/github/awesome-copilot/blob/main/skills/refactor-plan/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“로그인 시스템을 리팩터링하려고 합니다. 이를 위한 계획을 세워 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
먼저 코드가 어떻게 작동하는지 이해합니다. 그다음 안전한 단계(타입, 구현, 테스트, 정리)로 변경을 계획하고, 무언가 잘못되면 확인하고 되돌리는 단계도 포함합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Refactor Plan
Create a detailed plan before making any code changes.
Instructions
- Do not edit files while preparing the plan.
- Search the codebase to understand the current state. Read enough implementation, tests, configuration, and docs to make the plan specific to the repository.
- Identify affected files, ownership boundaries, dependencies, and likely hidden coupling.
- Plan changes in a safe sequence. Prefer contracts and types first, then implementations, then callers, then tests, then cleanup.
- Include verification steps between phases and a final validation command.
- Include rollback or recovery steps for the riskiest phases.
- Output the complete plan using the format below.
- Stop after the plan and ask for confirmation before implementing. If the user already asked you to implement, still produce the plan first and wait for confirmation unless they explicitly said to continue without review after the plan.
If the request is too ambiguous to plan safely, ask concise clarifying questions instead of editing files.
Output Format
## Refactor Plan: [title]
### Current State
[Brief description of how things work now]
### Target State
[Brief description of how things will work after]
### Affected Files
| File | Change Type | Dependencies |
|------|-------------|--------------|
| path | modify/create/delete | blocks X, blocked by Y |
### Execution Plan
#### Phase 1: Types and Interfaces
- [ ] Step 1.1: [action] in `file.ts`
- [ ] Verify: [how to check it worked]
#### Phase 2: Implementation
- [ ] Step 2.1: [action] in `file.ts`
- [ ] Verify: [how to check]
#### Phase 3: Tests
- [ ] Step 3.1: Update tests in `file.test.ts`
- [ ] Verify: Run `npm test`
#### Phase 4: Cleanup
- [ ] Remove deprecated code
- [ ] Update documentation
### Rollback Plan
If something fails:
1. [Step to undo]
2. [Step to undo]
### Risks
- [Potential issue and mitigation]
After the plan, ask: "Shall I proceed with Phase 1?"
자주 묻는 질문
'리팩터링'은 무엇인가요?
외부 동작은 바꾸지 않고 기존 코드를 재구성해, 이해하고 유지보수하기 쉽게 만드는 것입니다.
왜 코드를 바꾸기 전에 계획을 세우나요?
계획은 오류를 막고, 코드의 모든 부분을 고려하도록 하며, 변경 과정을 더 안전하고 예측 가능하게 만듭니다.
계획이 나온 뒤에는 무엇이 일어나나요?
에이전트는 여러분이 확인해 줄 때까지 기다렸다가, 계획의 첫 단계부터 코드 변경을 적용하기 시작합니다.
상세 정보
작성자의 원본 설명
Create a concrete plan before starting a multi-file refactor. Use when the user asks to plan, sequence, scope, or safely execute a refactor across multiple files; always investigate first, output the plan, and wait for confirmation before making code changes.
repo: github/awesome-copilot
인기도
- GitHub 스타
- 40k
- 순위
- #7395
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
acquire-codebase-knowledge
40k에이전트가 기존 코드 프로젝트를 이해하고 문서화하도록 돕습니다. 새 구성원을 맞이하거나 아키텍처를 개괄적으로 파악할 때 유용합니다.
acreadiness-assess
40k에이전트가 프로젝트의 AI 준비 상태를 평가하고 보고서를 만들도록 합니다. 프로젝트가 AI 도구를 쓸 준비가 얼마나 되어 있는지 이해하는 데 유용합니다.
acreadiness-generate-instructions
40k에이전트가 평가 결과를 바탕으로 AI 도구를 위한 지침을 만들도록 돕습니다. AI가 코드와 상호작용하는 방식을 개선하고 확인된 공백을 메울 때 유용합니다.
acreadiness-policy
40k에이전트가 AI 프로젝트 평가를 위한 정책을 정의하거나 적용하도록 돕습니다. 프로젝트 평가 방식을 표준화하고 규정 준수를 보장할 때 유용합니다.