본문으로 건너뛰기
Skillpedia
일반 코딩40k · #7395

refactor-plan

하는 일

이 에이전트는 여러 코드 파일을 변경하기 전에 상세한 계획을 세웁니다. 기존 코드를 분석하고, 영향을 받는 파일을 찾아 안전한 변경 순서를 제안합니다.

사용하는 경우

  • ✓큰 코드 변경을 계획하고 싶을 때.
  • ✓여러 파일을 한꺼번에 건드리기 전에.
  • ✓코드 변경이 안전하고 체계적으로 이루어지도록 하고 싶을 때.

스킬 링크

https://github.com/github/awesome-copilot/blob/main/skills/refactor-plan/SKILL.md

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

사용 방법

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

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

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

AI에게 요청하는 예시

“로그인 시스템을 리팩터링하려고 합니다. 이를 위한 계획을 세워 주세요.”

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

작동 방식

먼저 코드가 어떻게 작동하는지 이해합니다. 그다음 안전한 단계(타입, 구현, 테스트, 정리)로 변경을 계획하고, 무언가 잘못되면 확인하고 되돌리는 단계도 포함합니다.

기술 내용 (원본 SKILL.md)

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

Refactor Plan

Create a detailed plan before making any code changes.

Instructions

  1. Do not edit files while preparing the plan.
  2. Search the codebase to understand the current state. Read enough implementation, tests, configuration, and docs to make the plan specific to the repository.
  3. Identify affected files, ownership boundaries, dependencies, and likely hidden coupling.
  4. Plan changes in a safe sequence. Prefer contracts and types first, then implementations, then callers, then tests, then cleanup.
  5. Include verification steps between phases and a final validation command.
  6. Include rollback or recovery steps for the riskiest phases.
  7. Output the complete plan using the format below.
  8. 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.

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬