Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tomevault-io/skills-registry --skill react-refactoring명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
SOC 직업 분류 기준
| name | react-refactoring |
| description | | Use when this capability is needed. |
사용자가 제시하는 문제점을 무조건 수용하지 않는다. 각 문제점에 대해 비판적으로 검토하고, 정말 문제인지, 제시된 방향이 최선인지 분석한 후 리팩토링을 수행한다.
모든 판단의 기준은 **"수정하기 좋은 코드인가?"**이다. 평가 기준 상세는 references/evaluation-criteria.md 참조.
사용자가 제시한 문제점의 수와 복잡도에 따라 모드를 선택한다.
| 조건 | 모드 | 설명 |
|---|---|---|
| 1-2개 단순 문제점 | Standard Mode | 기존 sequential-thinking 3회 방식 |
| 3개 이상 또는 복잡한 문제점 | Multi-Perspective Mode | 병렬 sub-agent 3관점 분석 |
각 문제점마다 mcp__sequential-thinking__sequentialthinking 도구를 사용하여 사고 과정을 기록한다.
각 문제점당 최소 3번의 thinking 루프를 수행한다.
sequential-thinking으로 다음을 분석:
이 문제가 정말 문제인가?
- 현재 코드가 실제로 어떤 불편/위험을 초래하는가?
- "수정하기 좋은 코드" 9가지 기준 중 어떤 것을 위반하는가?
- 위반이 없다면, 이건 취향의 문제인가 실질적 문제인가?
사용자가 방향을 제시했다면:
이 방향이 정말 개선인가?
- 제안된 변경이 "수정하기 좋은 코드" 기준을 충족하는가?
- 오히려 복잡성을 증가시키지는 않는가?
- 기존 코드베이스의 일관성을 해치지 않는가?
- 과한 추상화(Over-engineering)는 아닌가?
제안된 방향이 최선이 아니라면:
더 나은 대안은?
- 더 단순한 해결책이 있는가?
- 점진적으로 개선할 수 있는 방법은?
- 이 문제를 해결하지 않는 것도 선택지인가?
각 문제점에 대해 3개 관점의 Task sub-agent를 병렬 실행한다.
| Agent | subagent_type | model | 관점 |
|---|---|---|---|
| Readability Advocate | general-purpose | sonnet | 가독성, 의도의 명확성 |
| Architecture Purist | typescript-pro | sonnet | 타입 안전성, 패턴 일관성, 구조적 정합성 |
| Pragmatic Developer | frontend-developer | sonnet | 유지보수성, 실용성, 개발 경험 |
3개의 Task sub-agent를 단일 메시지에서 동시 실행 (run_in_background: true):
Agent: Readability Advocate
You are a Readability Advocate analyzing a React refactoring proposal.
Your lens: code readability, intent clarity, self-documenting code.
Read the target component at: [파일 경로]
The user's proposed issues and changes:
[문제점 목록]
For EACH issue, provide your verdict:
- Verdict: [수용/수정/기각]
- Reasoning: [Why, focused on readability impact]
- Alternative: [Better approach from readability perspective, if any]
Write your analysis. Focus on whether each change makes the code easier to READ and UNDERSTAND.
Agent: Architecture Purist
You are an Architecture Purist analyzing a React refactoring proposal.
Your lens: type safety, pattern consistency, structural integrity, SOLID principles.
Read the target component at: [파일 경로]
The user's proposed issues and changes:
[문제점 목록]
For EACH issue, provide your verdict:
- Verdict: [수용/수정/기각]
- Reasoning: [Why, focused on type safety and architectural patterns]
- Alternative: [Better approach from architecture perspective, if any]
Write your analysis. Focus on whether each change improves TYPE SAFETY and STRUCTURAL CONSISTENCY.
Agent: Pragmatic Developer
You are a Pragmatic Developer analyzing a React refactoring proposal.
Your lens: maintainability, practicality, developer experience, cost-benefit.
Read the target component at: [파일 경로]
The user's proposed issues and changes:
[문제점 목록]
For EACH issue, provide your verdict:
- Verdict: [수용/수정/기각]
- Reasoning: [Why, focused on practical maintenance impact]
- Alternative: [Better approach from practical perspective, if any]
Write your analysis. Focus on whether each change is WORTH THE EFFORT and improves MAINTAINABILITY.
3개 에이전트의 결과를 수집한 후 오케스트레이터가 종합:
| 합의 상황 | 행동 |
|---|---|
| 3개 일치 (수용/수정/기각) | 높은 확신으로 해당 판단 채택 |
| 2:1 (다수:소수) | 소수 의견의 근거를 검토 후 오케스트레이터가 최종 결정 |
| 3개 상이 | AskUserQuestion으로 사용자에게 선택지와 근거를 제시하여 판단 요청 |
분석 중 다음 상황이면 반드시 AskUserQuestion 도구로 질문:
모든 문제점 분석 완료 후:
계획서를 제시하고 AskUserQuestion으로 승인 요청:
리팩토링 계획을 검토해주세요.
- [수용] 문제 1: ... → 이렇게 변경
- [수정] 문제 2: ... → 제안과 다르게 이 방향으로
- [기각] 문제 3: ... → 현재 구조가 더 적절함
진행해도 될까요?
승인 후 계획에 따라 코드 수정. 각 단계마다:
훅 분리 시:
컴포넌트 분리 시:
폴더 구조 변경 시:
Converted and distributed by TomeVault — claim your Tome and manage your conversions.