agent-creator · diff
git:20260926.64cea16 to git:20260928.c57eb9e
27 added, 62 removed. Audit A to A.
---
name: agent-creator
- description: Create Claude Code sub-agents with optimal configuration. Use when users ask to create a new agent, custom agent, specialized assistant, or want to configure task-specific AI workflows.
+ description: Create a Claude Code sub-agent definition for this project or user. Use when the user asks to create a new custom agent or a specialized sub-agent for a recurring task.
---
# Agent Creator
- 새로운 Claude Code 서브에이전트를 생성하고 최적화합니다.
-
- ## 생성 워크플로우
-
- 1. **요구사항 수집**
- - 에이전트의 목적
- - 사용 시점 (자동 위임 트리거)
- - 필요한 도구
- - 파일 수정 필요 여부
+ 이 프로젝트(또는 사용자)용 Claude Code 서브에이전트 정의 파일을 만든다.
- 2. **설정 결정**
- - 모델 선택 (Opus/Sonnet/Haiku)
- - 도구 화이트리스트/블랙리스트
+ > **서브에이전트가 없는 하네스**(Codex 등)에서는 에이전트 파일이 인식되지 않는다 — 그 경우
+ > 같은 절차를 스킬이나 진입점 문서(`AGENTS.md`)의 절로 만드는 편이 맞는지 사용자에게 먼저 묻는다.
- 3. **파일 생성**
- - 위치: `plugins/{domain}/agents/{category}/` (플러그인 구조 — 디렉토리에서 자동 발견됨,
- manifest 등록 불필요)
- - 또는 `.claude/agents/` (프로젝트 로컬)
- - 파일명: `agent-name.md`
+ ## 생성 워크플로우
- 4. **검증**
- - frontmatter 형식 확인 (`name`·`description`·`model`·`maxTurns` 필수)
- - 도구 이름 검증
- - 금지 필드 미사용 확인: `permissionMode`·`context_cache`·`output_schema`·`next_agents`·인라인 `hooks`
+ 1. **요구사항 수집** — 목적, 언제 위임할지(구체 조건), 필요한 도구, 파일 수정 여부.
+ 2. **위치 결정** — 프로젝트 공유면 `.claude/agents/<name>.md`, 개인용이면
+ `~/.claude/agents/<name>.md`. 설치된 플러그인 캐시 안에는 쓰지 않는다(업데이트 때 사라진다).
+ 같은 이름이 이미 있으면 덮어쓰지 말고 사용자에게 알린다.
+ 3. **설정 결정** — 도구는 필요한 최소만 허용한다. 읽기 전용 역할에는 `Edit`·`Write` 를 주지
+ 않는다. 모델·effort 는 생략하면 호스트 기본값을 따른다 — 지정은 이유가 있을 때만.
+ 4. **파일 생성 후 검증** — frontmatter 가 파싱되는지(`name`·`description` 필수, `name` 은
+ 파일명과 같은 kebab-case), 도구 이름이 호스트에 실제로 있는지 확인한다. 없는 MCP 도구를
+ allowlist 에 넣으면 그 서버가 없는 환경에서 에이전트가 환각한다.
- ## 모델 선택 가이드
+ ## description 쓰는 법
- | 작업 유형 | 권장 모델 | 이유 |
- | ------------------ | --------- | -------------------- |
- | 전략/분석/리뷰 | `opus` | 복잡한 추론 |
- | 코드 구현/수정 | `sonnet` | 균형잡힌 성능 |
- | 탐색/검증/단순작업 | `haiku` | 빠른 실행, 비용 효율 |
+ 위임은 description 으로 결정된다. **무엇이 주어졌을 때 쓰는지**를 구체적으로 쓴다.
+ "~해줘"·"확인"·"오류" 같은 일상 표현 단독 트리거는 대화형 요청까지 끌어가 느린 경로로
+ 빼돌린다 — 다른 에이전트와 트리거가 겹치지 않는지도 본다.
- ## 출력 형식 (플러그인 구조)
+ ## 출력 형식
```markdown
---
name: [소문자-하이픈]
- description: [역할]. MUST USE when: [트리거 조건].
- model: [sonnet|opus|haiku]
- effort: [low|medium|high|max]
- maxTurns: [20 for implementation, 10 for exploration/review]
+ description: [역할]. Use when [구체 조건 — 무엇이 주어졌을 때].
tools:
- [도구 목록]
- disallowedTools:
- - Task
---
- [시스템 프롬프트]
+ [시스템 프롬프트 — 역할, 절차, 출력 형식, 끝났음을 알리는 마지막 줄]
```
- 에이전트 파일은 `plugins/{domain}/agents/{category}/{name}.md`에 위치한다.
- **manifest(`plugin.json`)에는 agent/skill 레지스트리가 없다** — 디렉토리에서
- 자동 발견되므로 등록 단계가 없다.
-
- ## 자동 위임 최적화
-
- description에 포함하면 자동 위임 빈도 증가:
-
- - "MUST USE when:"
- - "Use PROACTIVELY"
- - "Use immediately after"
-
## 예제
```markdown
---
- name: test-runner
- description: Test execution specialist. MUST USE when: code changes are made and tests need to be run.
- model: haiku
- effort: low
- maxTurns: 10
+ name: migration-checker
+ description: Database migration reviewer. Use when a new migration file under db/migrations/ is added or changed and needs a safety review before merge.
tools:
- Read
- - Bash
- Grep
- Glob
- disallowedTools:
- - Task
---
- You are a test automation expert.
-
- When invoked:
+ You review database migrations for safety.
- 1. Identify changed files
- 2. Run relevant tests
- 3. Report results with fix suggestions if failed
+ 1. Read the changed migration files
+ 2. Flag locking operations, missing down-migrations, and destructive column changes
+ 3. Report findings as a list, then end with `## 완료: <N> findings`
```