jun-claude-code 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__tests__/merge-settings.test.js +92 -0
- package/dist/copy.js +41 -6
- package/package.json +1 -1
- package/templates/global/CLAUDE.md +13 -17
- package/templates/global/agents/code-reviewer.md +3 -0
- package/templates/global/agents/code-writer.md +17 -0
- package/templates/global/agents/context-collector.md +4 -0
- package/templates/global/agents/context-manager.md +1 -1
- package/templates/global/agents/designer.md +9 -0
- package/templates/global/agents/explore.md +4 -0
- package/templates/global/agents/git-manager.md +13 -0
- package/templates/global/agents/impact-analyzer.md +2 -0
- package/templates/global/agents/plan-verifier.md +3 -0
- package/templates/global/agents/qa-tester.md +9 -0
- package/templates/global/agents/simple-code-writer.md +17 -0
- package/templates/global/agents/task-enricher.md +2 -0
- package/templates/global/agents/task-planner.md +2 -0
- package/templates/global/settings.json +0 -30
- package/templates/global/skills/Backend/SKILL.md +1 -1
- package/templates/global/skills/Backend/bdd-testing.md +0 -1
- package/templates/global/skills/Coding/SKILL.md +1 -1
- package/templates/global/skills/ContextHandoff/SKILL.md +3 -1
- package/templates/global/skills/Director/SKILL.md +1 -1
- package/templates/global/skills/Documentation/SKILL.md +1 -4
- package/templates/global/skills/Git/SKILL.md +1 -1
- package/templates/global/skills/Git/git.md +0 -1
- package/templates/global/skills/Git/pr-apply.md +6 -1
- package/templates/global/skills/Git/pr-review.md +7 -1
- package/templates/global/skills/PromptStructuring/SKILL.md +2 -1
- package/templates/global/skills/PromptStructuring/output-optimization.md +0 -1
- package/templates/global/skills/PromptStructuring/positive-phrasing.md +0 -1
- package/templates/global/skills/PromptStructuring/skills-frontmatter.md +173 -0
- package/templates/global/skills/PromptStructuring/xml-tags.md +0 -1
- package/templates/global/skills/React/SKILL.md +1 -1
- package/templates/global/skills/React/react-hook-form.md +0 -1
- package/templates/global/skills/React/tailwind-styled.md +0 -1
- package/templates/global/skills/React/tanstack-router.md +0 -1
- package/templates/global/skills/Reporting/SKILL.md +1 -1
- package/templates/global/skills/SessionWrap/SKILL.md +2 -1
- package/templates/project/skills/ContextGeneration/SKILL.md +0 -1
- package/templates/global/hooks/code-quality-reminder.sh +0 -40
- package/templates/global/hooks/skill-forced-subagent.sh +0 -98
|
@@ -403,6 +403,98 @@ function writeJson(filePath, data) {
|
|
|
403
403
|
(0, vitest_1.expect)(result.hooks.PreToolUse[0].matcher).toBe('Bash');
|
|
404
404
|
(0, vitest_1.expect)(result.hooks.PreToolUse[1].matcher).toBe('Write');
|
|
405
405
|
});
|
|
406
|
+
(0, vitest_1.it)('should skip source group when dest group contains all source commands plus extras', () => {
|
|
407
|
+
const sourceSettings = {
|
|
408
|
+
hooks: {
|
|
409
|
+
UserPromptSubmit: [
|
|
410
|
+
{
|
|
411
|
+
hooks: [
|
|
412
|
+
{ type: 'command', command: 'skill-forced.sh' },
|
|
413
|
+
{ type: 'command', command: 'workflow-enforced.sh' },
|
|
414
|
+
],
|
|
415
|
+
},
|
|
416
|
+
],
|
|
417
|
+
},
|
|
418
|
+
};
|
|
419
|
+
writeJson(path.join(sourceDir, 'settings.json'), sourceSettings);
|
|
420
|
+
// Dest has the same commands PLUS an extra custom hook (peon-ping)
|
|
421
|
+
const destSettings = {
|
|
422
|
+
hooks: {
|
|
423
|
+
UserPromptSubmit: [
|
|
424
|
+
{
|
|
425
|
+
hooks: [
|
|
426
|
+
{ type: 'command', command: 'peon.sh' },
|
|
427
|
+
{ type: 'command', command: 'skill-forced.sh' },
|
|
428
|
+
{ type: 'command', command: 'workflow-enforced.sh' },
|
|
429
|
+
],
|
|
430
|
+
},
|
|
431
|
+
],
|
|
432
|
+
},
|
|
433
|
+
};
|
|
434
|
+
writeJson(path.join(destDir, 'settings.json'), destSettings);
|
|
435
|
+
(0, copy_1.mergeSettingsJson)(sourceDir, destDir);
|
|
436
|
+
const result = readJson(path.join(destDir, 'settings.json'));
|
|
437
|
+
// Should remain 1 group, not duplicate
|
|
438
|
+
(0, vitest_1.expect)(result.hooks.UserPromptSubmit).toHaveLength(1);
|
|
439
|
+
(0, vitest_1.expect)(result.hooks.UserPromptSubmit[0].hooks).toHaveLength(3);
|
|
440
|
+
});
|
|
441
|
+
(0, vitest_1.it)('should skip source group when dest has commands split across multiple groups', () => {
|
|
442
|
+
const sourceSettings = {
|
|
443
|
+
hooks: {
|
|
444
|
+
UserPromptSubmit: [
|
|
445
|
+
{
|
|
446
|
+
hooks: [
|
|
447
|
+
{ type: 'command', command: 'skill-forced.sh' },
|
|
448
|
+
{ type: 'command', command: 'workflow-enforced.sh' },
|
|
449
|
+
],
|
|
450
|
+
},
|
|
451
|
+
],
|
|
452
|
+
},
|
|
453
|
+
};
|
|
454
|
+
writeJson(path.join(sourceDir, 'settings.json'), sourceSettings);
|
|
455
|
+
// Dest has the same commands spread across separate groups
|
|
456
|
+
const destSettings = {
|
|
457
|
+
hooks: {
|
|
458
|
+
UserPromptSubmit: [
|
|
459
|
+
{ hooks: [{ type: 'command', command: 'skill-forced.sh' }] },
|
|
460
|
+
{ hooks: [{ type: 'command', command: 'workflow-enforced.sh' }] },
|
|
461
|
+
],
|
|
462
|
+
},
|
|
463
|
+
};
|
|
464
|
+
writeJson(path.join(destDir, 'settings.json'), destSettings);
|
|
465
|
+
(0, copy_1.mergeSettingsJson)(sourceDir, destDir);
|
|
466
|
+
const result = readJson(path.join(destDir, 'settings.json'));
|
|
467
|
+
// Should remain 2 groups, source group not duplicated
|
|
468
|
+
(0, vitest_1.expect)(result.hooks.UserPromptSubmit).toHaveLength(2);
|
|
469
|
+
});
|
|
470
|
+
(0, vitest_1.it)('should add source group when dest only has some of its commands', () => {
|
|
471
|
+
const sourceSettings = {
|
|
472
|
+
hooks: {
|
|
473
|
+
UserPromptSubmit: [
|
|
474
|
+
{
|
|
475
|
+
hooks: [
|
|
476
|
+
{ type: 'command', command: 'skill-forced.sh' },
|
|
477
|
+
{ type: 'command', command: 'new-hook.sh' },
|
|
478
|
+
],
|
|
479
|
+
},
|
|
480
|
+
],
|
|
481
|
+
},
|
|
482
|
+
};
|
|
483
|
+
writeJson(path.join(sourceDir, 'settings.json'), sourceSettings);
|
|
484
|
+
// Dest has only one of the two source commands
|
|
485
|
+
const destSettings = {
|
|
486
|
+
hooks: {
|
|
487
|
+
UserPromptSubmit: [
|
|
488
|
+
{ hooks: [{ type: 'command', command: 'skill-forced.sh' }] },
|
|
489
|
+
],
|
|
490
|
+
},
|
|
491
|
+
};
|
|
492
|
+
writeJson(path.join(destDir, 'settings.json'), destSettings);
|
|
493
|
+
(0, copy_1.mergeSettingsJson)(sourceDir, destDir);
|
|
494
|
+
const result = readJson(path.join(destDir, 'settings.json'));
|
|
495
|
+
// Source group should be added since new-hook.sh is missing
|
|
496
|
+
(0, vitest_1.expect)(result.hooks.UserPromptSubmit).toHaveLength(2);
|
|
497
|
+
});
|
|
406
498
|
(0, vitest_1.it)('should dedup when dest has .claude/ paths and source has ~/.claude/ paths', () => {
|
|
407
499
|
const sourceSettings = {
|
|
408
500
|
hooks: {
|
package/dist/copy.js
CHANGED
|
@@ -43,7 +43,6 @@ const path = __importStar(require("path"));
|
|
|
43
43
|
const readline = __importStar(require("readline"));
|
|
44
44
|
const crypto = __importStar(require("crypto"));
|
|
45
45
|
const chalk_1 = __importDefault(require("chalk"));
|
|
46
|
-
const utils_1 = require("./utils");
|
|
47
46
|
/**
|
|
48
47
|
* Prompt user for confirmation using readline
|
|
49
48
|
*/
|
|
@@ -202,13 +201,49 @@ function mergeSettingsJson(sourceDir, destDir, options) {
|
|
|
202
201
|
destHooks[event] = [];
|
|
203
202
|
}
|
|
204
203
|
const destEntries = destHooks[event];
|
|
205
|
-
//
|
|
206
|
-
const
|
|
204
|
+
// Collect all individual commands from dest entries, grouped by matcher
|
|
205
|
+
const destCommandsByMatcher = new Map();
|
|
206
|
+
for (const entry of destEntries) {
|
|
207
|
+
const matcher = entry.matcher || '';
|
|
208
|
+
if (!destCommandsByMatcher.has(matcher)) {
|
|
209
|
+
destCommandsByMatcher.set(matcher, new Set());
|
|
210
|
+
}
|
|
211
|
+
const cmds = destCommandsByMatcher.get(matcher);
|
|
212
|
+
if (entry.hooks && Array.isArray(entry.hooks)) {
|
|
213
|
+
for (const h of entry.hooks) {
|
|
214
|
+
if (h.command)
|
|
215
|
+
cmds.add(h.command);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
else if (entry.command) {
|
|
219
|
+
cmds.add(entry.command);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
207
222
|
for (const entry of sourceEntries) {
|
|
208
|
-
const
|
|
209
|
-
|
|
223
|
+
const matcher = entry.matcher || '';
|
|
224
|
+
const existingCmds = destCommandsByMatcher.get(matcher) || new Set();
|
|
225
|
+
// Extract all commands from this source entry
|
|
226
|
+
const sourceCommands = [];
|
|
227
|
+
if (entry.hooks && Array.isArray(entry.hooks)) {
|
|
228
|
+
for (const h of entry.hooks) {
|
|
229
|
+
if (h.command)
|
|
230
|
+
sourceCommands.push(h.command);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
else if (entry.command) {
|
|
234
|
+
sourceCommands.push(entry.command);
|
|
235
|
+
}
|
|
236
|
+
// Skip if all source commands already exist in dest for the same matcher
|
|
237
|
+
const allExist = sourceCommands.length > 0 && sourceCommands.every((cmd) => existingCmds.has(cmd));
|
|
238
|
+
if (!allExist) {
|
|
210
239
|
destEntries.push(entry);
|
|
211
|
-
|
|
240
|
+
// Track newly added commands for subsequent source entries
|
|
241
|
+
if (!destCommandsByMatcher.has(matcher)) {
|
|
242
|
+
destCommandsByMatcher.set(matcher, existingCmds);
|
|
243
|
+
}
|
|
244
|
+
for (const cmd of sourceCommands) {
|
|
245
|
+
existingCmds.add(cmd);
|
|
246
|
+
}
|
|
212
247
|
}
|
|
213
248
|
}
|
|
214
249
|
}
|
package/package.json
CHANGED
|
@@ -43,21 +43,22 @@ Main agent는 **직접 코드를 읽거나 쓰지 않고**, 아래 역할에 집
|
|
|
43
43
|
- Critical 이슈 발견 시 해당 단계 subagent 재호출
|
|
44
44
|
- 모든 Git 작업(커밋, PR, 브랜치)은 git-manager에 위임
|
|
45
45
|
|
|
46
|
-
### Skill 위임 원칙 (
|
|
46
|
+
### Skill 위임 원칙 (Skills 2.0 Preload)
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
Agent frontmatter의 `skills` 필드에 선언된 Skill이 Agent 시작 시 자동으로 preload됩니다.
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
```yaml
|
|
51
|
+
# 예: code-writer.md frontmatter
|
|
52
|
+
skills: [Coding, Backend, Reporting]
|
|
53
|
+
```
|
|
51
54
|
|
|
52
|
-
|
|
55
|
+
**핵심 원칙**: 형식 규칙을 프롬프트에 직접 쓰지 말고, Agent의 `skills` 필드에 선언하라.
|
|
53
56
|
|
|
54
|
-
|
|
57
|
+
#### Subagent 위임 시 Skill 지시 방법
|
|
55
58
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
```
|
|
59
|
+
Agent frontmatter에 `skills` 필드가 설정되어 있으면 별도 지시 불필요.
|
|
60
|
+
추가 Skill 참조가 필요한 경우에만 프롬프트에 명시:
|
|
59
61
|
|
|
60
|
-
Execution Plan에 skill이 없는 경우:
|
|
61
62
|
```
|
|
62
63
|
먼저 ~/.claude/skills/ 에서 이 작업과 관련된 SKILL.md를 찾아 읽고 규칙을 따르세요.
|
|
63
64
|
```
|
|
@@ -207,16 +208,11 @@ Plan 파일의 Context 섹션에 위 내용을 명시하여 작업 목적이 희
|
|
|
207
208
|
|
|
208
209
|
## PHASE 4: 리뷰 (Review) - 구현 후 필수
|
|
209
210
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
### Step 4.1: Self Code Review
|
|
211
|
+
> 코드 품질 검토(Skill 규칙 준수, 보안, 에러 핸들링)는 PostToolUse agent hook이 매 Edit/Write마다 자동 수행합니다.
|
|
213
212
|
|
|
214
|
-
|
|
215
|
-
- [ ] 프로젝트 규칙 준수 확인
|
|
216
|
-
- [ ] Skill checklist 기준 검토
|
|
217
|
-
- [ ] lint 실행
|
|
213
|
+
<checklist>
|
|
218
214
|
|
|
219
|
-
### Step 4.
|
|
215
|
+
### Step 4.1: Task 완료 검증
|
|
220
216
|
|
|
221
217
|
- [ ] 원래 요청사항이 모두 충족되었는지 확인
|
|
222
218
|
- [ ] 예상한 동작이 구현되었는지 확인
|
|
@@ -4,6 +4,9 @@ description: 코드 작성 완료 후 품질 검토 시 호출. CLAUDE.md/Skills
|
|
|
4
4
|
keywords: [코드리뷰, 체크리스트, lint, 규칙검증, 품질검사, Critical, Warning, 수정제안]
|
|
5
5
|
model: opus
|
|
6
6
|
color: yellow
|
|
7
|
+
disallowedTools: [Edit, Write, NotebookEdit]
|
|
8
|
+
skills: [Coding, Reporting]
|
|
9
|
+
memory: project
|
|
7
10
|
---
|
|
8
11
|
|
|
9
12
|
# Code Reviewer Agent
|
|
@@ -4,6 +4,23 @@ description: 로직 작성, 기능 구현, 리팩토링 등 코드 수정이 필
|
|
|
4
4
|
keywords: [코드작성, 구현, 개발, Entity, Service, Controller, 컴포넌트, TypeScript, React, 훅, 페이지]
|
|
5
5
|
model: opus
|
|
6
6
|
color: cyan
|
|
7
|
+
skills: [Coding, Backend, Reporting]
|
|
8
|
+
permissionMode: acceptEdits
|
|
9
|
+
memory: project
|
|
10
|
+
hooks:
|
|
11
|
+
PostToolUse:
|
|
12
|
+
- matcher: "Edit|Write"
|
|
13
|
+
hooks:
|
|
14
|
+
- type: agent
|
|
15
|
+
model: claude-sonnet-4-6
|
|
16
|
+
prompt: "코드 품질 리뷰어로서 아래 단계를 수행하세요.\n\nStep 1: ~/.claude/skills/ 와 .claude/skills/ 두 디렉토리의 SKILL.md 파일 목록을 스캔하세요. 변경된 파일의 타입과 내용을 기준으로 관련 Skill을 판별하세요 (예: Coding, Backend, React 등).\n\nStep 2: 관련 SKILL.md를 읽고 규칙을 파악하세요.\n\nStep 3: 변경된 파일을 읽고 코드 변경 내용을 맥락과 함께 리뷰하세요.\n\nStep 4: 아래 항목을 검토하세요:\n- Skill에 명시된 규칙 위반 여부\n- 실패 가능한 작업의 에러 핸들링 누락\n- 보안 문제 (인젝션, XSS, 하드코딩된 시크릿)\n- 명백한 로직 오류 또는 오타\n\n문제 발견 시: {\"ok\": false, \"reason\": \"구체적 이슈와 개선 제안\"}\n문제 없을 시: {\"ok\": true}\n\n실제 문제만 지적하세요. 스타일, 네이밍, 사소한 선호도는 지적하지 마세요."
|
|
17
|
+
timeout: 60
|
|
18
|
+
Stop:
|
|
19
|
+
- hooks:
|
|
20
|
+
- type: agent
|
|
21
|
+
model: claude-sonnet-4-6
|
|
22
|
+
prompt: "작업 완료 후 다음 단계를 추천하는 어드바이저로서 아래를 수행하세요.\n\n<steps>\n\nStep 1: 아래 소스를 순서대로 확인하세요.\n- .claude/plan/ 폴더의 plan.md, checklist.md (존재 시)\n- TaskList (TaskList 도구 사용)\n- 최근 git log 5건 (git log --oneline -5)\n\nStep 2: 현재 상태를 판단하세요.\n- 미완료 Task가 있는가?\n- checklist에 체크되지 않은 항목이 있는가?\n- 최근 커밋 흐름에서 논리적 다음 단계가 보이는가?\n\nStep 3: 다음 작업을 2-3개 추천하세요.\n\n</steps>\n\n<output_format>\n\n## 추천 다음 작업\n\n| 우선순위 | 작업 | 근거 |\n|---------|------|------|\n| 1 | ... | ... |\n| 2 | ... | ... |\n| 3 | ... | ... |\n\n</output_format>\n\n<rules>\n- Plan/TaskList가 모두 없고 단순 질문 응답인 경우: 추천 없이 빈 응답 반환\n- 추천은 구체적이고 실행 가능해야 한다\n- 150줄 이내로 출력한다\n</rules>"
|
|
23
|
+
timeout: 60
|
|
7
24
|
---
|
|
8
25
|
|
|
9
26
|
# Code Writer Agent
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: context-collector
|
|
3
3
|
description: 소스 코드에서 패턴/구현 방식/도메인 지식을 수집. 파일 내용 분석/정리, Skill/Agent 식별, 코드 DEEP 탐색 전문.
|
|
4
|
+
skills: [Reporting]
|
|
4
5
|
keywords: [코드탐색, 패턴파악, Skill식별, 도메인지식, 아키텍처분석, DEEP탐색, 소스코드]
|
|
5
6
|
model: opus
|
|
6
7
|
color: blue
|
|
8
|
+
disallowedTools: [Edit, Write, NotebookEdit]
|
|
9
|
+
permissionMode: plan
|
|
10
|
+
maxTurns: 20
|
|
7
11
|
---
|
|
8
12
|
|
|
9
13
|
# Context Collector Agent
|
|
@@ -4,6 +4,7 @@ description: 기존 .claude/context/ 문서의 구조 최적화 시 호출. 큰
|
|
|
4
4
|
keywords: [Context관리, 문서정리, 파일분리, 토큰최적화, 구조개선, 문서품질]
|
|
5
5
|
model: sonnet
|
|
6
6
|
color: green
|
|
7
|
+
skills: [Reporting]
|
|
7
8
|
---
|
|
8
9
|
|
|
9
10
|
# Context Manager Agent
|
|
@@ -82,7 +83,6 @@ INDEX 파일에는 **핵심 요약**만 포함:
|
|
|
82
83
|
name: domain-order-index
|
|
83
84
|
description: 주문 도메인 개요
|
|
84
85
|
keywords: [주문, Order, 결제, Payment]
|
|
85
|
-
estimated_tokens: ~200
|
|
86
86
|
---
|
|
87
87
|
|
|
88
88
|
# 주문 도메인
|
|
@@ -4,6 +4,15 @@ description: UI 컴포넌트 구조 설계나 스타일링 작업 시 호출.
|
|
|
4
4
|
keywords: [UI, UX, 스타일링, 컴포넌트, 레이아웃, 반응형, 디자인시스템]
|
|
5
5
|
model: sonnet
|
|
6
6
|
color: pink
|
|
7
|
+
skills: [React, Reporting]
|
|
8
|
+
hooks:
|
|
9
|
+
PostToolUse:
|
|
10
|
+
- matcher: "Edit|Write"
|
|
11
|
+
hooks:
|
|
12
|
+
- type: agent
|
|
13
|
+
model: claude-sonnet-4-6
|
|
14
|
+
prompt: "코드 품질 리뷰어로서 아래 단계를 수행하세요.\n\nStep 1: ~/.claude/skills/ 와 .claude/skills/ 두 디렉토리의 SKILL.md 파일 목록을 스캔하세요. 변경된 파일의 타입과 내용을 기준으로 관련 Skill을 판별하세요 (예: Coding, Backend, React 등).\n\nStep 2: 관련 SKILL.md를 읽고 규칙을 파악하세요.\n\nStep 3: 변경된 파일을 읽고 코드 변경 내용을 맥락과 함께 리뷰하세요.\n\nStep 4: 아래 항목을 검토하세요:\n- Skill에 명시된 규칙 위반 여부\n- 실패 가능한 작업의 에러 핸들링 누락\n- 보안 문제 (인젝션, XSS, 하드코딩된 시크릿)\n- 명백한 로직 오류 또는 오타\n\n문제 발견 시: {\"ok\": false, \"reason\": \"구체적 이슈와 개선 제안\"}\n문제 없을 시: {\"ok\": true}\n\n실제 문제만 지적하세요. 스타일, 네이밍, 사소한 선호도는 지적하지 마세요."
|
|
15
|
+
timeout: 60
|
|
7
16
|
---
|
|
8
17
|
|
|
9
18
|
# Designer Agent
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: explore
|
|
3
3
|
description: 파일 위치/코드 검색이 필요할 때 호출. Glob/Grep으로 빠른 탐색, 파일 구조 파악. 내용 분석/정리는 context-collector 사용.
|
|
4
|
+
skills: [Reporting]
|
|
4
5
|
keywords: [탐색, 검색, 파일찾기, 패턴매칭, 구조파악, Glob, Grep, 빠른검색]
|
|
5
6
|
model: haiku
|
|
6
7
|
color: gray
|
|
8
|
+
disallowedTools: [Edit, Write, NotebookEdit]
|
|
9
|
+
permissionMode: plan
|
|
10
|
+
maxTurns: 5
|
|
7
11
|
---
|
|
8
12
|
|
|
9
13
|
# Explore Agent
|
|
@@ -4,6 +4,19 @@ description: 모든 Git 작업 시 필수 호출. 커밋 메시지 작성, PR
|
|
|
4
4
|
keywords: [커밋, PR생성, 브랜치, push, merge, git, GitHub, 풀리퀘스트, FEAT, FIX, REFACTOR]
|
|
5
5
|
model: sonnet
|
|
6
6
|
color: purple
|
|
7
|
+
skills: [Git, Reporting]
|
|
8
|
+
hooks:
|
|
9
|
+
PostToolUse:
|
|
10
|
+
- matcher: "Bash"
|
|
11
|
+
hooks:
|
|
12
|
+
- type: command
|
|
13
|
+
command: "~/.claude/hooks/session-wrap-suggester.sh"
|
|
14
|
+
Stop:
|
|
15
|
+
- hooks:
|
|
16
|
+
- type: agent
|
|
17
|
+
model: claude-sonnet-4-6
|
|
18
|
+
prompt: "작업 완료 후 다음 단계를 추천하는 어드바이저로서 아래를 수행하세요.\n\n<steps>\n\nStep 1: 아래 소스를 순서대로 확인하세요.\n- .claude/plan/ 폴더의 plan.md, checklist.md (존재 시)\n- TaskList (TaskList 도구 사용)\n- 최근 git log 5건 (git log --oneline -5)\n\nStep 2: 현재 상태를 판단하세요.\n- 미완료 Task가 있는가?\n- checklist에 체크되지 않은 항목이 있는가?\n- 최근 커밋 흐름에서 논리적 다음 단계가 보이는가?\n\nStep 3: 다음 작업을 2-3개 추천하세요.\n\n</steps>\n\n<output_format>\n\n## 추천 다음 작업\n\n| 우선순위 | 작업 | 근거 |\n|---------|------|------|\n| 1 | ... | ... |\n| 2 | ... | ... |\n| 3 | ... | ... |\n\n</output_format>\n\n<rules>\n- Plan/TaskList가 모두 없고 단순 질문 응답인 경우: 추천 없이 빈 응답 반환\n- 추천은 구체적이고 실행 가능해야 한다\n- 150줄 이내로 출력한다\n</rules>"
|
|
19
|
+
timeout: 60
|
|
7
20
|
---
|
|
8
21
|
|
|
9
22
|
# Git Manager Agent
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: impact-analyzer
|
|
3
3
|
description: 코드 수정 전 영향 범위 파악 시 호출. 호출 관계 추적, API 변경 영향, Breaking Change 탐지, 위험도 HIGH/MEDIUM/LOW 평가.
|
|
4
|
+
skills: [Reporting]
|
|
4
5
|
keywords: [사이드이펙트, CodeFlow, UserFlow, BreakingChange, 영향분석, 위험도평가, 호출관계, API변경]
|
|
5
6
|
model: opus
|
|
6
7
|
color: orange
|
|
8
|
+
disallowedTools: [Edit, Write, NotebookEdit]
|
|
7
9
|
---
|
|
8
10
|
|
|
9
11
|
# Impact Analyzer Agent
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: plan-verifier
|
|
3
3
|
description: Plan 수립 후 구현 전에 Plan 품질을 검증하는 Agent. 목적 정합성, 완전성, 논리적 일관성, 실현 가능성, 스코프 초과 여부를 코드베이스 탐색을 통해 능동적으로 검증.
|
|
4
|
+
skills: [Reporting]
|
|
4
5
|
keywords: [Plan검증, 목적정합성, 완전성, 논리적일관성, 실현가능성, 스코프검증, PlanReview]
|
|
5
6
|
model: opus
|
|
6
7
|
color: cyan
|
|
8
|
+
disallowedTools: [Edit, Write, NotebookEdit]
|
|
9
|
+
permissionMode: plan
|
|
7
10
|
---
|
|
8
11
|
|
|
9
12
|
# Plan Verifier Agent
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: qa-tester
|
|
3
3
|
description: 구현 완료 후 품질 검증 시 호출. 빌드 성공 확인, 단위/통합 테스트 실행, lint 검사, E2E 시나리오 검증 수행.
|
|
4
|
+
skills: [Reporting]
|
|
4
5
|
keywords: [테스트, QA, 품질검증, lint, 빌드, E2E, 시나리오테스트, 검증]
|
|
5
6
|
model: sonnet
|
|
6
7
|
color: teal
|
|
8
|
+
maxTurns: 20
|
|
9
|
+
hooks:
|
|
10
|
+
Stop:
|
|
11
|
+
- hooks:
|
|
12
|
+
- type: agent
|
|
13
|
+
model: claude-sonnet-4-6
|
|
14
|
+
prompt: "작업 완료 후 다음 단계를 추천하는 어드바이저로서 아래를 수행하세요.\n\n<steps>\n\nStep 1: 아래 소스를 순서대로 확인하세요.\n- .claude/plan/ 폴더의 plan.md, checklist.md (존재 시)\n- TaskList (TaskList 도구 사용)\n- 최근 git log 5건 (git log --oneline -5)\n\nStep 2: 현재 상태를 판단하세요.\n- 미완료 Task가 있는가?\n- checklist에 체크되지 않은 항목이 있는가?\n- 최근 커밋 흐름에서 논리적 다음 단계가 보이는가?\n\nStep 3: 다음 작업을 2-3개 추천하세요.\n\n</steps>\n\n<output_format>\n\n## 추천 다음 작업\n\n| 우선순위 | 작업 | 근거 |\n|---------|------|------|\n| 1 | ... | ... |\n| 2 | ... | ... |\n| 3 | ... | ... |\n\n</output_format>\n\n<rules>\n- Plan/TaskList가 모두 없고 단순 질문 응답인 경우: 추천 없이 빈 응답 반환\n- 추천은 구체적이고 실행 가능해야 한다\n- 150줄 이내로 출력한다\n</rules>"
|
|
15
|
+
timeout: 60
|
|
7
16
|
---
|
|
8
17
|
|
|
9
18
|
# QA Tester Agent
|
|
@@ -4,6 +4,23 @@ description: lint/build 오류, 오타, 설정값 등 간단한 코드 수정
|
|
|
4
4
|
keywords: [간단수정, 단순수정, 설정변경, 오타수정, 1-2파일, 소규모수정]
|
|
5
5
|
model: haiku
|
|
6
6
|
color: cyan
|
|
7
|
+
skills: [Coding, Reporting]
|
|
8
|
+
permissionMode: acceptEdits
|
|
9
|
+
maxTurns: 10
|
|
10
|
+
hooks:
|
|
11
|
+
PostToolUse:
|
|
12
|
+
- matcher: "Edit|Write"
|
|
13
|
+
hooks:
|
|
14
|
+
- type: agent
|
|
15
|
+
model: claude-sonnet-4-6
|
|
16
|
+
prompt: "코드 품질 리뷰어로서 아래 단계를 수행하세요.\n\nStep 1: ~/.claude/skills/ 와 .claude/skills/ 두 디렉토리의 SKILL.md 파일 목록을 스캔하세요. 변경된 파일의 타입과 내용을 기준으로 관련 Skill을 판별하세요 (예: Coding, Backend, React 등).\n\nStep 2: 관련 SKILL.md를 읽고 규칙을 파악하세요.\n\nStep 3: 변경된 파일을 읽고 코드 변경 내용을 맥락과 함께 리뷰하세요.\n\nStep 4: 아래 항목을 검토하세요:\n- Skill에 명시된 규칙 위반 여부\n- 실패 가능한 작업의 에러 핸들링 누락\n- 보안 문제 (인젝션, XSS, 하드코딩된 시크릿)\n- 명백한 로직 오류 또는 오타\n\n문제 발견 시: {\"ok\": false, \"reason\": \"구체적 이슈와 개선 제안\"}\n문제 없을 시: {\"ok\": true}\n\n실제 문제만 지적하세요. 스타일, 네이밍, 사소한 선호도는 지적하지 마세요."
|
|
17
|
+
timeout: 60
|
|
18
|
+
Stop:
|
|
19
|
+
- hooks:
|
|
20
|
+
- type: agent
|
|
21
|
+
model: claude-sonnet-4-6
|
|
22
|
+
prompt: "작업 완료 후 다음 단계를 추천하는 어드바이저로서 아래를 수행하세요.\n\n<steps>\n\nStep 1: 아래 소스를 순서대로 확인하세요.\n- .claude/plan/ 폴더의 plan.md, checklist.md (존재 시)\n- TaskList (TaskList 도구 사용)\n- 최근 git log 5건 (git log --oneline -5)\n\nStep 2: 현재 상태를 판단하세요.\n- 미완료 Task가 있는가?\n- checklist에 체크되지 않은 항목이 있는가?\n- 최근 커밋 흐름에서 논리적 다음 단계가 보이는가?\n\nStep 3: 다음 작업을 2-3개 추천하세요.\n\n</steps>\n\n<output_format>\n\n## 추천 다음 작업\n\n| 우선순위 | 작업 | 근거 |\n|---------|------|------|\n| 1 | ... | ... |\n| 2 | ... | ... |\n| 3 | ... | ... |\n\n</output_format>\n\n<rules>\n- Plan/TaskList가 모두 없고 단순 질문 응답인 경우: 추천 없이 빈 응답 반환\n- 추천은 구체적이고 실행 가능해야 한다\n- 150줄 이내로 출력한다\n</rules>"
|
|
23
|
+
timeout: 60
|
|
7
24
|
---
|
|
8
25
|
|
|
9
26
|
# Simple Code Writer Agent
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: task-enricher
|
|
3
3
|
description: task-planner가 생성한 TaskList의 각 Task에 subagent 실행 계획(순차/병렬 조합)과 참조 skill을 할당. Main agent가 PM으로 여러 subagent를 조율할 수 있도록 Execution Plan을 작성.
|
|
4
|
+
skills: [Reporting]
|
|
4
5
|
keywords: [TaskList, agent할당, skill할당, task분석, 위임계획, 실행순서, PM, 병렬, 순차]
|
|
5
6
|
model: opus
|
|
6
7
|
color: purple
|
|
8
|
+
disallowedTools: [Edit, Write, NotebookEdit]
|
|
7
9
|
---
|
|
8
10
|
|
|
9
11
|
<role>
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: task-planner
|
|
3
3
|
description: 복잡한 작업 시작 전 계획 수립 시 호출. 요구사항 명확화 질문, TaskList 생성, 파일별 수정 계획 작성, 의존성 순서 정의.
|
|
4
|
+
skills: [Reporting]
|
|
4
5
|
keywords: [TaskList, 계획수립, 요구사항명확화, 작업분해, 질문, 수정계획, 파일목록, 의존성]
|
|
5
6
|
model: opus
|
|
6
7
|
color: green
|
|
8
|
+
disallowedTools: [Edit, Write, NotebookEdit]
|
|
7
9
|
---
|
|
8
10
|
|
|
9
11
|
# Task Planner Agent
|
|
@@ -18,16 +18,6 @@
|
|
|
18
18
|
]
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
|
-
"SubagentStart": [
|
|
22
|
-
{
|
|
23
|
-
"hooks": [
|
|
24
|
-
{
|
|
25
|
-
"type": "command",
|
|
26
|
-
"command": "~/.claude/hooks/skill-forced-subagent.sh"
|
|
27
|
-
}
|
|
28
|
-
]
|
|
29
|
-
}
|
|
30
|
-
],
|
|
31
21
|
"PreToolUse": [
|
|
32
22
|
{
|
|
33
23
|
"matcher": "Bash",
|
|
@@ -38,26 +28,6 @@
|
|
|
38
28
|
}
|
|
39
29
|
]
|
|
40
30
|
}
|
|
41
|
-
],
|
|
42
|
-
"PostToolUse": [
|
|
43
|
-
{
|
|
44
|
-
"matcher": "Edit|Write",
|
|
45
|
-
"hooks": [
|
|
46
|
-
{
|
|
47
|
-
"type": "command",
|
|
48
|
-
"command": "~/.claude/hooks/code-quality-reminder.sh"
|
|
49
|
-
}
|
|
50
|
-
]
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"matcher": "Bash",
|
|
54
|
-
"hooks": [
|
|
55
|
-
{
|
|
56
|
-
"type": "command",
|
|
57
|
-
"command": "~/.claude/hooks/session-wrap-suggester.sh"
|
|
58
|
-
}
|
|
59
|
-
]
|
|
60
|
-
}
|
|
61
31
|
]
|
|
62
32
|
}
|
|
63
33
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: Backend
|
|
3
3
|
description: NestJS/TypeORM 백엔드 개발 시 사용. 레이어 객체 변환, find vs queryBuilder 선택 기준, BDD 테스트 작성 규칙 제공.
|
|
4
4
|
keywords: [Backend, 백엔드, 레이어, DTO, Entity, Service, Controller, TypeORM, find, queryBuilder, test, BDD, 테스트, Jest]
|
|
5
|
-
|
|
5
|
+
user-invocable: false
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# 백엔드 개발 원칙
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
name: bdd-testing
|
|
3
3
|
description: NestJS + Jest BDD 스타일 테스트 작성 시 사용. describe 네스팅 구조, Given/When/Then 패턴, Testing Module Mock 설정 규칙 제공.
|
|
4
4
|
keywords: [BDD, test, 테스트, Jest, NestJS, describe, it, Given, When, Then, mock, TestingModule]
|
|
5
|
-
estimated_tokens: ~500
|
|
6
5
|
---
|
|
7
6
|
|
|
8
7
|
# BDD 테스트 작성 규칙
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
name: context-handoff
|
|
3
3
|
description: 컨텍스트 압축을 위한 HANDOFF.md 작성 가이드
|
|
4
4
|
keywords: [HANDOFF, 컨텍스트, context, 압축, handoff, 세션, clear, 토큰]
|
|
5
|
-
|
|
5
|
+
user-invocable: true
|
|
6
|
+
disable-model-invocation: true
|
|
7
|
+
argument-hint: "[handoff-name]"
|
|
6
8
|
---
|
|
7
9
|
|
|
8
10
|
# Context Handoff
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: Documentation
|
|
3
3
|
description: .claude 폴더 내 문서 생성/수정 시 사용. frontmatter 형식, Context/Skill/Agent 템플릿, 파일 분리 기준 제공.
|
|
4
4
|
keywords: [문서, 작성, CLAUDE.md, context, skill, agent, frontmatter, 템플릿]
|
|
5
|
-
|
|
5
|
+
user-invocable: false
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# .claude 문서 작성 스킬
|
|
@@ -54,7 +54,6 @@ estimated_tokens: ~1200
|
|
|
54
54
|
name: file-name # 파일 식별자 (kebab-case)
|
|
55
55
|
description: 한 줄 설명 # 파일 목적 (50자 이내)
|
|
56
56
|
keywords: [키워드1, 키워드2] # 검색/매칭용 (한글, 영문 혼용)
|
|
57
|
-
estimated_tokens: ~500 # 예상 토큰 수
|
|
58
57
|
---
|
|
59
58
|
```
|
|
60
59
|
|
|
@@ -102,7 +101,6 @@ user-invocable: true # 사용자가 /skill-name으로 호출 가능
|
|
|
102
101
|
name: context-name
|
|
103
102
|
description: 설명
|
|
104
103
|
keywords: [키워드1, 키워드2]
|
|
105
|
-
estimated_tokens: ~300
|
|
106
104
|
---
|
|
107
105
|
|
|
108
106
|
# 제목
|
|
@@ -141,7 +139,6 @@ estimated_tokens: ~300
|
|
|
141
139
|
name: skill-name
|
|
142
140
|
description: 설명
|
|
143
141
|
keywords: [키워드1, 키워드2]
|
|
144
|
-
estimated_tokens: ~400
|
|
145
142
|
---
|
|
146
143
|
|
|
147
144
|
# 스킬 제목
|
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
name: pr-apply
|
|
3
3
|
description: PR 리뷰 피드백 적용 스킬. 리뷰 코멘트 확인, 코드 수정, 커밋 생성.
|
|
4
4
|
keywords: [PR피드백, 리뷰적용, 코드수정, 코멘트, 변경요청, 재커밋]
|
|
5
|
-
estimated_tokens: ~250
|
|
6
5
|
user-invocable: true
|
|
6
|
+
context: fork
|
|
7
|
+
argument-hint: "[PR-number]"
|
|
7
8
|
---
|
|
8
9
|
|
|
10
|
+
## PR Context
|
|
11
|
+
- Diff: !`gh pr diff $ARGUMENTS`
|
|
12
|
+
- Comments: !`gh pr view $ARGUMENTS --comments`
|
|
13
|
+
|
|
9
14
|
# PR Apply Skill
|
|
10
15
|
|
|
11
16
|
PR 리뷰 피드백을 코드에 반영하는 가이드.
|
|
@@ -2,10 +2,16 @@
|
|
|
2
2
|
name: pr-review
|
|
3
3
|
description: PR 코드 리뷰 스킬. 체크리스트 기반 구조적 리뷰 수행.
|
|
4
4
|
keywords: [PR리뷰, 코드리뷰, MR, 머지리퀘스트, 체크리스트, Critical, Warning, Approved]
|
|
5
|
-
estimated_tokens: ~300
|
|
6
5
|
user-invocable: true
|
|
6
|
+
context: fork
|
|
7
|
+
agent: code-reviewer
|
|
8
|
+
argument-hint: "[PR-number]"
|
|
7
9
|
---
|
|
8
10
|
|
|
11
|
+
## PR Context
|
|
12
|
+
- Diff: !`gh pr diff $ARGUMENTS`
|
|
13
|
+
- Description: !`gh pr view $ARGUMENTS`
|
|
14
|
+
|
|
9
15
|
# PR Review Skill
|
|
10
16
|
|
|
11
17
|
체크리스트 기반 Pull Request 리뷰.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: PromptStructuring
|
|
3
3
|
description: "Claude Code 프롬프트의 XML 태그 구조화, 긍정 표현 전환, 출력 최적화 가이드"
|
|
4
4
|
keywords: [prompt, xml-tags, positive-phrasing, output-optimization, 프롬프트, 구조화, 긍정표현, XML, 출력최적화]
|
|
5
|
-
|
|
5
|
+
user-invocable: false
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# 프롬프트 구조화 스킬
|
|
@@ -17,3 +17,4 @@ estimated_tokens: 300
|
|
|
17
17
|
| 2. 긍정 표현 | "~금지" 대신 "~한다"로 행동 직접 유도 | `positive-phrasing.md` |
|
|
18
18
|
| 3. 흐름 기호 | 단계/변환/위임에 `->` 사용: 계획 -> 구현 -> 검증 | - |
|
|
19
19
|
| 4. 출력 최적화 | 반복 제거, 테이블 > 산문, Hook 출력 150줄 이내 | `output-optimization.md` |
|
|
20
|
+
| 5. Frontmatter | Skill/Agent YAML frontmatter 필드 선택과 작성 기준 | `skills-frontmatter.md` |
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: PromptStructuring-skills-frontmatter
|
|
3
|
+
description: Skills 2.0 Skill/Agent frontmatter 필드 레퍼런스. 작성 시 필드 선택 기준과 예시 제공.
|
|
4
|
+
keywords: [frontmatter, SKILL.md, agent, yaml, skills-2.0, hooks, context-fork, tools, permissionMode]
|
|
5
|
+
user-invocable: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Skills/Agent Frontmatter 레퍼런스
|
|
9
|
+
|
|
10
|
+
SKILL.md와 Agent .md 파일의 YAML frontmatter 필드 가이드.
|
|
11
|
+
|
|
12
|
+
## Skill Frontmatter (SKILL.md)
|
|
13
|
+
|
|
14
|
+
<fields>
|
|
15
|
+
|
|
16
|
+
| 필드 | 타입 | 기본값 | 설명 |
|
|
17
|
+
|------|------|--------|------|
|
|
18
|
+
| `name` | string | 디렉토리명 | 스킬 이름. `/slash-command`가 됨. 소문자+하이픈, 최대 64자 |
|
|
19
|
+
| `description` | string | 첫 단락 | 용도 및 트리거 조건. Claude가 자동 호출 판단에 사용 |
|
|
20
|
+
| `argument-hint` | string | - | 자동완성 시 인자 힌트. 예: `[PR-number]` |
|
|
21
|
+
| `disable-model-invocation` | boolean | `false` | `true` -> Claude 자동 호출 차단. description이 컨텍스트에 로딩되지 않아 토큰 절약 |
|
|
22
|
+
| `user-invocable` | boolean | `true` | `false` -> `/` 메뉴에서 숨김. Claude만 자동 호출 가능 |
|
|
23
|
+
| `allowed-tools` | array | 전체 상속 | Skill 활성 시 허용 도구 제한. 예: `[Read, Grep, Glob]` |
|
|
24
|
+
| `model` | string | `inherit` | `sonnet`, `opus`, `haiku`, 모델 ID, `inherit` |
|
|
25
|
+
| `context` | string | - | `fork` -> 격리된 subagent에서 실행 |
|
|
26
|
+
| `agent` | string | `general-purpose` | `context: fork` 시 사용할 agent 타입 |
|
|
27
|
+
| `hooks` | object | - | Skill 라이프사이클에 스코프된 훅 |
|
|
28
|
+
|
|
29
|
+
</fields>
|
|
30
|
+
|
|
31
|
+
### 호출 제어 매트릭스
|
|
32
|
+
|
|
33
|
+
| 설정 | 사용자 호출 | Claude 호출 | 컨텍스트 로딩 |
|
|
34
|
+
|------|:-:|:-:|------|
|
|
35
|
+
| (기본값) | O | O | description 항상 로드, 호출 시 전체 로드 |
|
|
36
|
+
| `disable-model-invocation: true` | O | X | description 미로드 -> 토큰 절약 |
|
|
37
|
+
| `user-invocable: false` | X | O | description 항상 로드, 호출 시 전체 로드 |
|
|
38
|
+
|
|
39
|
+
### 치환 변수
|
|
40
|
+
|
|
41
|
+
| 변수 | 설명 |
|
|
42
|
+
|------|------|
|
|
43
|
+
| `$ARGUMENTS` | Skill 호출 시 전달된 모든 인자 |
|
|
44
|
+
| `$ARGUMENTS[N]` / `$N` | N번째 인자 (0-based) |
|
|
45
|
+
| `${CLAUDE_SESSION_ID}` | 현재 세션 ID |
|
|
46
|
+
| `${CLAUDE_SKILL_DIR}` | SKILL.md가 위치한 디렉토리 경로 |
|
|
47
|
+
|
|
48
|
+
### Dynamic Context Injection
|
|
49
|
+
|
|
50
|
+
셸 명령을 즉시 실행하여 결과를 프롬프트에 주입한다.
|
|
51
|
+
|
|
52
|
+
```yaml
|
|
53
|
+
---
|
|
54
|
+
name: pr-review
|
|
55
|
+
context: fork
|
|
56
|
+
agent: general-purpose
|
|
57
|
+
argument-hint: "[PR-number]"
|
|
58
|
+
---
|
|
59
|
+
## PR Context
|
|
60
|
+
- Diff: !`gh pr diff $ARGUMENTS`
|
|
61
|
+
- Description: !`gh pr view $ARGUMENTS`
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
`` !`command` `` -> 실행 결과로 치환 -> Claude가 완성된 프롬프트를 수신.
|
|
65
|
+
|
|
66
|
+
## Agent Frontmatter (.claude/agents/*.md)
|
|
67
|
+
|
|
68
|
+
<fields>
|
|
69
|
+
|
|
70
|
+
| 필드 | 타입 | 기본값 | 설명 |
|
|
71
|
+
|------|------|--------|------|
|
|
72
|
+
| `name` | string | **필수** | Agent 이름. 소문자+하이픈 |
|
|
73
|
+
| `description` | string | **필수** | 위임 판단 기준. 언제 이 Agent를 사용하는지 명시 |
|
|
74
|
+
| `disallowedTools` | array | - | 명시적 거부 도구 목록 |
|
|
75
|
+
| `model` | string | `inherit` | `sonnet`, `opus`, `haiku`, 모델 ID |
|
|
76
|
+
| `permissionMode` | string | `default` | 권한 모드 |
|
|
77
|
+
| `maxTurns` | number | - | 최대 턴 수. 초과 시 결과 반환 후 종료 |
|
|
78
|
+
| `skills` | array | - | 시작 시 사전 로드할 Skill 목록 |
|
|
79
|
+
| `mcpServers` | object/array | - | 사용 가능 MCP 서버 |
|
|
80
|
+
| `hooks` | object | - | Agent 라이프사이클 훅 |
|
|
81
|
+
| `memory` | string | - | 영속 메모리 스코프: `user`, `project`, `local` |
|
|
82
|
+
| `background` | boolean | `false` | `true` -> 백그라운드 작업으로 실행 |
|
|
83
|
+
| `isolation` | string | - | `worktree` -> 임시 git worktree에서 격리 실행 |
|
|
84
|
+
|
|
85
|
+
</fields>
|
|
86
|
+
|
|
87
|
+
### permissionMode 옵션
|
|
88
|
+
|
|
89
|
+
| 모드 | 동작 | 적용 대상 예시 |
|
|
90
|
+
|------|------|------------|
|
|
91
|
+
| `default` | 표준 권한 확인 | 기본값 |
|
|
92
|
+
| `plan` | 읽기 전용 탐색 | explore, context-collector |
|
|
93
|
+
| `acceptEdits` | 파일 수정 자동 승인 | code-writer, simple-code-writer |
|
|
94
|
+
| `dontAsk` | 권한 프롬프트 자동 거부 | - |
|
|
95
|
+
| `bypassPermissions` | 모든 권한 검사 건너뜀 | 주의 필요 |
|
|
96
|
+
|
|
97
|
+
### skills preload
|
|
98
|
+
|
|
99
|
+
Agent 시작 시 Skill 전체 내용을 컨텍스트에 주입한다.
|
|
100
|
+
|
|
101
|
+
```yaml
|
|
102
|
+
# code-writer.md
|
|
103
|
+
skills: [Coding, Backend]
|
|
104
|
+
|
|
105
|
+
# git-manager.md
|
|
106
|
+
skills: [Git]
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
-> hook으로 "Skill을 먼저 읽으세요"라고 안내하는 간접 방식 대신, frontmatter로 자동 주입.
|
|
110
|
+
|
|
111
|
+
## Hooks in Skills/Agents
|
|
112
|
+
|
|
113
|
+
Skill과 Agent의 frontmatter에 `hooks` 필드를 정의하면 해당 컴포넌트가 활성화된 동안에만 실행된다.
|
|
114
|
+
|
|
115
|
+
<rules>
|
|
116
|
+
|
|
117
|
+
- 모든 hook 이벤트 지원: PreToolUse, PostToolUse, Stop, UserPromptSubmit 등
|
|
118
|
+
- Agent의 `Stop` hook은 자동으로 `SubagentStop`으로 변환
|
|
119
|
+
- `once: true` 옵션: Skill 전용, 세션당 1회만 실행
|
|
120
|
+
- 형식은 settings.json hooks와 동일하되 YAML로 작성
|
|
121
|
+
|
|
122
|
+
</rules>
|
|
123
|
+
|
|
124
|
+
### 예시: Agent에 hooks 추가
|
|
125
|
+
|
|
126
|
+
```yaml
|
|
127
|
+
---
|
|
128
|
+
name: git-manager
|
|
129
|
+
skills: [Git]
|
|
130
|
+
hooks:
|
|
131
|
+
PostToolUse:
|
|
132
|
+
- matcher: "Bash"
|
|
133
|
+
hooks:
|
|
134
|
+
- type: command
|
|
135
|
+
command: "~/.claude/hooks/session-wrap-suggester.sh"
|
|
136
|
+
---
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### 예시: Skill에 hooks 추가
|
|
140
|
+
|
|
141
|
+
```yaml
|
|
142
|
+
---
|
|
143
|
+
name: secure-deploy
|
|
144
|
+
description: 보안 검증 후 배포
|
|
145
|
+
hooks:
|
|
146
|
+
PreToolUse:
|
|
147
|
+
- matcher: "Bash"
|
|
148
|
+
hooks:
|
|
149
|
+
- type: command
|
|
150
|
+
command: "./scripts/security-check.sh"
|
|
151
|
+
---
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## 미존재 필드 (FAQ)
|
|
155
|
+
|
|
156
|
+
| 필드 | 상태 |
|
|
157
|
+
|------|------|
|
|
158
|
+
| `import` / `imports` | 존재하지 않음. `skills` preload, 지원 파일, dynamic injection으로 대체 |
|
|
159
|
+
| `include` / `require` | 존재하지 않음 |
|
|
160
|
+
| `dependencies` | 런타임 패키지 의존성용. Skill 간 참조용 아님 |
|
|
161
|
+
| `extends` | 존재하지 않음 |
|
|
162
|
+
| `estimated_tokens` | 공식 필드 아님. 사용하지 않음 |
|
|
163
|
+
| `tools` (Agent) | `disallowedTools`만 사용하여 최대한 도구 활용 |
|
|
164
|
+
|
|
165
|
+
## Skill 콘텐츠 유형 가이드
|
|
166
|
+
|
|
167
|
+
| 유형 | 설명 | 실행 방식 | 예시 |
|
|
168
|
+
|------|------|----------|------|
|
|
169
|
+
| 참조 콘텐츠 | 규칙, 패턴, 스타일 가이드 | 인라인 (메인 컨텍스트) | Coding, Backend, React |
|
|
170
|
+
| 작업 콘텐츠 | 배포, 커밋, 코드 생성 | `context: fork` 또는 직접 호출 | deploy, pr-review |
|
|
171
|
+
|
|
172
|
+
참조 콘텐츠는 `user-invocable: false`로 배경 지식으로 활용한다.
|
|
173
|
+
작업 콘텐츠는 `disable-model-invocation: true`로 수동 트리거만 허용한다.
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
name: session-wrap
|
|
3
3
|
description: PR diff 기반으로 반복 패턴, 학습 포인트, 후속 작업을 분석하여 Skill/Context 후보를 제안
|
|
4
4
|
keywords: [세션정리, PR분석, 자동화, 학습, 후속작업, session-wrap, 회고]
|
|
5
|
-
estimated_tokens: ~800
|
|
6
5
|
user-invocable: true
|
|
6
|
+
disable-model-invocation: true
|
|
7
|
+
context: fork
|
|
7
8
|
---
|
|
8
9
|
|
|
9
10
|
# Session Wrap Skill
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# .claude/hooks/code-quality-reminder.sh
|
|
4
|
-
# 코드 수정 후 품질 체크 리마인더 - PostToolUse hook (Edit/Write)
|
|
5
|
-
|
|
6
|
-
# Dedup: project 우선, global은 project 버전 존재 시 양보
|
|
7
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
8
|
-
if [ -f "$SCRIPT_DIR/_dedup.sh" ]; then
|
|
9
|
-
source "$SCRIPT_DIR/_dedup.sh"
|
|
10
|
-
_hook_dedup_check "${BASH_SOURCE[0]}" || exit 0
|
|
11
|
-
fi
|
|
12
|
-
|
|
13
|
-
INPUT=$(cat)
|
|
14
|
-
|
|
15
|
-
# tool_name 추출
|
|
16
|
-
TOOL_NAME=$(echo "$INPUT" | sed -n 's/.*"tool_name"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' | head -1)
|
|
17
|
-
|
|
18
|
-
# Edit 또는 Write가 아니면 스킵
|
|
19
|
-
if [ "$TOOL_NAME" != "Edit" ] && [ "$TOOL_NAME" != "Write" ]; then
|
|
20
|
-
exit 0
|
|
21
|
-
fi
|
|
22
|
-
|
|
23
|
-
# file_path 추출
|
|
24
|
-
FILE_PATH=$(echo "$INPUT" | sed -n 's/.*"file_path"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' | head -1)
|
|
25
|
-
|
|
26
|
-
if [ -z "$FILE_PATH" ]; then
|
|
27
|
-
exit 0
|
|
28
|
-
fi
|
|
29
|
-
|
|
30
|
-
# 확장자 추출
|
|
31
|
-
EXT="${FILE_PATH##*.}"
|
|
32
|
-
|
|
33
|
-
# 코드 파일 확장자 매칭
|
|
34
|
-
case "$EXT" in
|
|
35
|
-
ts|tsx|js|jsx|py|go|rs|java|rb|php|swift|kt|sh)
|
|
36
|
-
echo "[code-quality] 수정된 파일의 에러 핸들링, 불변성 패턴, 입력 검증을 확인하세요." >&2
|
|
37
|
-
;;
|
|
38
|
-
esac
|
|
39
|
-
|
|
40
|
-
exit 0
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# .claude/hooks/skill-forced-subagent.sh
|
|
4
|
-
# Subagent용 Skill 평가 프로토콜 - SubagentStart hook
|
|
5
|
-
# Subagent가 작업 시작 전 관련 Skills를 평가하고 활성화하도록 유도
|
|
6
|
-
|
|
7
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
8
|
-
CLAUDE_DIR="$(dirname "$SCRIPT_DIR")"
|
|
9
|
-
GLOBAL_CLAUDE_DIR="$HOME/.claude"
|
|
10
|
-
PROJECT_ROOT="$(git rev-parse --show-toplevel 2>/dev/null)"
|
|
11
|
-
PROJECT_CLAUDE_DIR="${PROJECT_ROOT:-.}/.claude"
|
|
12
|
-
|
|
13
|
-
# Dedup: project 우선, global은 project 버전 존재 시 양보
|
|
14
|
-
if [ -f "$SCRIPT_DIR/_dedup.sh" ]; then
|
|
15
|
-
source "$SCRIPT_DIR/_dedup.sh"
|
|
16
|
-
_hook_dedup_check "${BASH_SOURCE[0]}" || exit 0
|
|
17
|
-
fi
|
|
18
|
-
|
|
19
|
-
echo "✅ [Hook] Subagent Skill 평가 프로토콜 실행됨"
|
|
20
|
-
|
|
21
|
-
cat << 'EOF'
|
|
22
|
-
SKILL EVALUATION (Subagent)
|
|
23
|
-
|
|
24
|
-
<phase name="Skill 평가">
|
|
25
|
-
|
|
26
|
-
## Skill 참조 방법
|
|
27
|
-
|
|
28
|
-
### 우선: TaskList에서 명시된 Skill 확인
|
|
29
|
-
|
|
30
|
-
현재 실행 중인 task의 `## Execution Plan` 섹션을 확인하세요.
|
|
31
|
-
task description에 skill 경로가 명시되어 있다면 해당 Skill만 읽으세요.
|
|
32
|
-
|
|
33
|
-
확인 방법:
|
|
34
|
-
1. `TaskList` 도구로 현재 task 목록 조회
|
|
35
|
-
2. 자신이 담당한 task 찾기 (description의 Execution Plan 확인)
|
|
36
|
-
3. 해당 subagent 항목의 `skill:` 필드에 명시된 SKILL.md만 읽기
|
|
37
|
-
|
|
38
|
-
### 폴백: Task에 Skill 정보 없을 경우
|
|
39
|
-
|
|
40
|
-
task description에 Execution Plan이 없거나 skill이 "없음"으로 명시된 경우,
|
|
41
|
-
아래 전체 Skill 목록에서 현재 작업과 관련된 Skill을 YES/NO로 평가하세요.
|
|
42
|
-
|
|
43
|
-
### 사용 가능한 Skills (자동 탐색됨)
|
|
44
|
-
|
|
45
|
-
</phase>
|
|
46
|
-
EOF
|
|
47
|
-
|
|
48
|
-
# skills 폴더에서 SKILL.md 파일들의 frontmatter 자동 탐색
|
|
49
|
-
# 프로젝트 .claude/ 와 ~/.claude/ 양쪽에서 탐색 (프로젝트 우선, 중복 제거)
|
|
50
|
-
SEEN_SKILLS=""
|
|
51
|
-
for search_dir in "$PROJECT_CLAUDE_DIR" "$GLOBAL_CLAUDE_DIR"; do
|
|
52
|
-
if [ -d "$search_dir/skills" ]; then
|
|
53
|
-
for skill_dir in "$search_dir/skills"/*/; do
|
|
54
|
-
if [ -d "$skill_dir" ]; then
|
|
55
|
-
skill_name=$(basename "$skill_dir")
|
|
56
|
-
skill_file="$skill_dir/SKILL.md"
|
|
57
|
-
|
|
58
|
-
# 이미 탐색된 Skill은 건너뜀
|
|
59
|
-
case "$SEEN_SKILLS" in
|
|
60
|
-
*"|${skill_name}|"*) continue ;;
|
|
61
|
-
esac
|
|
62
|
-
SEEN_SKILLS="${SEEN_SKILLS}|${skill_name}|"
|
|
63
|
-
|
|
64
|
-
if [ -f "$skill_file" ]; then
|
|
65
|
-
# 출처 표시
|
|
66
|
-
if [ "$search_dir" = "$PROJECT_CLAUDE_DIR" ]; then
|
|
67
|
-
display_path=".claude/skills/$skill_name/SKILL.md"
|
|
68
|
-
else
|
|
69
|
-
display_path="~/.claude/skills/$skill_name/SKILL.md"
|
|
70
|
-
fi
|
|
71
|
-
echo "**[$skill_name]** \`$display_path\`"
|
|
72
|
-
echo '```yaml'
|
|
73
|
-
head -6 "$skill_file"
|
|
74
|
-
echo '```'
|
|
75
|
-
echo ""
|
|
76
|
-
fi
|
|
77
|
-
fi
|
|
78
|
-
done
|
|
79
|
-
fi
|
|
80
|
-
done
|
|
81
|
-
|
|
82
|
-
cat << 'EOF'
|
|
83
|
-
|
|
84
|
-
Skill 규칙을 준수하여 작업을 시작하세요.
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
|
|
88
|
-
REPORT FORMAT PROTOCOL (작업 완료 시 필수)
|
|
89
|
-
|
|
90
|
-
작업 완료 후 반드시 아래 3가지를 구조화하여 보고하세요:
|
|
91
|
-
|
|
92
|
-
1. **Discoveries** — 발견한 것 (탐색 결과, 패턴, 참고 코드)
|
|
93
|
-
2. **Changes** — 변경한 것 (수정/생성/삭제한 파일과 내용 요약)
|
|
94
|
-
3. **Reasoning** — 판단 근거 (왜 그렇게 결정했는지, 검토한 대안)
|
|
95
|
-
|
|
96
|
-
해당 없는 항목은 "해당 없음"으로 표시하세요.
|
|
97
|
-
상세 형식은 ~/.claude/skills/Reporting/SKILL.md를 참조하세요.
|
|
98
|
-
EOF
|