@kood/claude-code 0.5.10 → 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/index.js +117 -67
- package/package.json +1 -1
- package/templates/.claude/agents/build-fixer.md +371 -0
- package/templates/.claude/agents/critic.md +223 -0
- package/templates/.claude/agents/deep-executor.md +320 -0
- package/templates/.claude/agents/git-operator.md +15 -0
- package/templates/.claude/agents/planner.md +11 -7
- package/templates/.claude/agents/qa-tester.md +488 -0
- package/templates/.claude/agents/researcher.md +189 -0
- package/templates/.claude/agents/scientist.md +544 -0
- package/templates/.claude/agents/security-reviewer.md +549 -0
- package/templates/.claude/agents/tdd-guide.md +413 -0
- package/templates/.claude/agents/vision.md +165 -0
- package/templates/.claude/commands/pre-deploy.md +79 -2
- package/templates/.claude/instructions/agent-patterns/model-routing.md +2 -2
- package/templates/.claude/skills/brainstorm/SKILL.md +889 -0
- package/templates/.claude/skills/bug-fix/SKILL.md +69 -0
- package/templates/.claude/skills/crawler/SKILL.md +156 -0
- package/templates/.claude/skills/crawler/references/anti-bot-checklist.md +162 -0
- package/templates/.claude/skills/crawler/references/code-templates.md +119 -0
- package/templates/.claude/skills/crawler/references/crawling-patterns.md +167 -0
- package/templates/.claude/skills/crawler/references/document-templates.md +147 -0
- package/templates/.claude/skills/crawler/references/network-crawling.md +141 -0
- package/templates/.claude/skills/crawler/references/playwriter-commands.md +172 -0
- package/templates/.claude/skills/crawler/references/pre-crawl-checklist.md +221 -0
- package/templates/.claude/skills/crawler/references/selector-strategies.md +140 -0
- package/templates/.claude/skills/execute/SKILL.md +5 -0
- package/templates/.claude/skills/feedback/SKILL.md +570 -0
- package/templates/.claude/skills/figma-to-code/SKILL.md +1 -0
- package/templates/.claude/skills/global-uiux-design/SKILL.md +1 -0
- package/templates/.claude/skills/korea-uiux-design/SKILL.md +1 -0
- package/templates/.claude/skills/nextjs-react-best-practices/SKILL.md +1 -0
- package/templates/.claude/skills/plan/SKILL.md +44 -0
- package/templates/.claude/skills/ralph/SKILL.md +16 -18
- package/templates/.claude/skills/refactor/SKILL.md +19 -0
- package/templates/.claude/skills/tanstack-start-react-best-practices/SKILL.md +1 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# Selector 전략
|
|
2
|
+
|
|
3
|
+
> Playwright Selector 우선순위 및 패턴
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<priority>
|
|
8
|
+
|
|
9
|
+
## 우선순위
|
|
10
|
+
|
|
11
|
+
| 순위 | 유형 | 예시 | 안정성 |
|
|
12
|
+
|------|------|------|--------|
|
|
13
|
+
| 1 | aria-ref | `aria-ref=e14` | 세션 한정 |
|
|
14
|
+
| 2 | data-testid | `[data-testid="submit"]` | 매우 높음 |
|
|
15
|
+
| 3 | Role + Name | `getByRole('button', { name: 'Save' })` | 높음 |
|
|
16
|
+
| 4 | Text/Label | `getByText('Sign in')` | 중간 |
|
|
17
|
+
| 5 | Semantic | `button[type="submit"]` | 중간 |
|
|
18
|
+
| 6 | Class/ID | `.btn-primary` | 낮음 |
|
|
19
|
+
|
|
20
|
+
</priority>
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
<extraction>
|
|
25
|
+
|
|
26
|
+
## Selector 추출
|
|
27
|
+
|
|
28
|
+
```javascript
|
|
29
|
+
// aria-ref → Playwright selector
|
|
30
|
+
const snapshot = await accessibilitySnapshot({ page });
|
|
31
|
+
// => button "Save" [ref=e14]
|
|
32
|
+
|
|
33
|
+
const selector = await getLocatorStringForElement(page.locator('aria-ref=e14'));
|
|
34
|
+
// => "getByRole('button', { name: 'Save' })"
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
</extraction>
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
<patterns>
|
|
42
|
+
|
|
43
|
+
## Locator 패턴
|
|
44
|
+
|
|
45
|
+
### Role 기반 (권장)
|
|
46
|
+
|
|
47
|
+
```javascript
|
|
48
|
+
page.getByRole('button', { name: 'Submit' })
|
|
49
|
+
page.getByRole('link', { name: 'Home' })
|
|
50
|
+
page.getByRole('textbox', { name: 'Email' })
|
|
51
|
+
page.getByRole('checkbox', { name: 'Remember' })
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### 텍스트 기반
|
|
55
|
+
|
|
56
|
+
```javascript
|
|
57
|
+
page.getByText('Sign in')
|
|
58
|
+
page.getByText(/sign in/i) // 정규식
|
|
59
|
+
page.getByLabel('Email')
|
|
60
|
+
page.getByPlaceholder('Enter email')
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### CSS Selector
|
|
64
|
+
|
|
65
|
+
```javascript
|
|
66
|
+
page.locator('[data-testid="submit"]')
|
|
67
|
+
page.locator('input[name="email"]')
|
|
68
|
+
page.locator('button:has-text("Save")')
|
|
69
|
+
page.locator('li:nth-child(2)')
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### 체이닝/필터
|
|
73
|
+
|
|
74
|
+
```javascript
|
|
75
|
+
page.locator('.card').locator('.price')
|
|
76
|
+
page.locator('tr').filter({ hasText: 'John' }).locator('button')
|
|
77
|
+
page.locator('.item').first()
|
|
78
|
+
page.locator('.item').nth(2)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
</patterns>
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
<crawling>
|
|
86
|
+
|
|
87
|
+
## 크롤링용 패턴
|
|
88
|
+
|
|
89
|
+
```javascript
|
|
90
|
+
// 목록 추출
|
|
91
|
+
const texts = await page.locator('.item').allTextContents();
|
|
92
|
+
|
|
93
|
+
// 구조화 데이터
|
|
94
|
+
const items = await page.$$eval('.card', cards =>
|
|
95
|
+
cards.map(c => ({
|
|
96
|
+
title: c.querySelector('h2')?.textContent?.trim(),
|
|
97
|
+
url: c.querySelector('a')?.href,
|
|
98
|
+
}))
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
// 속성 추출
|
|
102
|
+
const links = await page.$$eval('a', els => els.map(el => el.href));
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
</crawling>
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
<wait>
|
|
110
|
+
|
|
111
|
+
## 대기
|
|
112
|
+
|
|
113
|
+
```javascript
|
|
114
|
+
await page.waitForSelector('.loaded');
|
|
115
|
+
await page.waitForSelector('.loading', { state: 'hidden' });
|
|
116
|
+
await page.waitForLoadState('networkidle');
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
</wait>
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
<troubleshooting>
|
|
124
|
+
|
|
125
|
+
## 문제 해결
|
|
126
|
+
|
|
127
|
+
| 문제 | 해결 |
|
|
128
|
+
|------|------|
|
|
129
|
+
| 여러 요소 매칭 | `.first()`, `.nth(n)`, 더 구체적 selector |
|
|
130
|
+
| 요소 없음 | `waitForSelector`, iframe/Shadow DOM 확인 |
|
|
131
|
+
| 동적 클래스 | Role/Text 기반, data-testid 사용 |
|
|
132
|
+
|
|
133
|
+
```javascript
|
|
134
|
+
// 동적 클래스 해결
|
|
135
|
+
// ❌ page.locator('.Button_a1b2c3')
|
|
136
|
+
// ✅ page.getByRole('button', { name: 'Submit' })
|
|
137
|
+
// ✅ page.locator('[data-testid="submit"]')
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
</troubleshooting>
|
|
@@ -51,6 +51,10 @@ user-invocable: true
|
|
|
51
51
|
| **@architect** | sonnet/opus | 아키텍처 분석, 설계 검토 (READ-ONLY) | MEDIUM-HIGH |
|
|
52
52
|
| **@analyst** | sonnet | 요구사항 분석, 기술 조사, 가정 검증 | MEDIUM |
|
|
53
53
|
| **@document-writer** | haiku | 문서 작성 (README, API 문서) | LOW-MEDIUM |
|
|
54
|
+
| **@deep-executor** | opus | 자율적 딥 워커, 복잡한 작업 스스로 완료 | HIGH |
|
|
55
|
+
| **@researcher** | sonnet | 외부 문서/API 조사 | LOW-MEDIUM |
|
|
56
|
+
| **@scientist** | sonnet | Python 데이터 분석, 통계 연구 | MEDIUM |
|
|
57
|
+
| **@vision** | sonnet | 미디어 파일 분석 (이미지, PDF, 다이어그램) | LOW-MEDIUM |
|
|
54
58
|
|
|
55
59
|
---
|
|
56
60
|
|
|
@@ -449,6 +453,7 @@ Task({
|
|
|
449
453
|
|
|
450
454
|
| 복잡도 | 조건 | 사용 Agent |
|
|
451
455
|
|--------|------|-----------|
|
|
456
|
+
| **극도로 복잡** | 전체 시스템 재설계, 완전 자율 | Task (deep-executor) 단일 위임 |
|
|
452
457
|
| **매우 복잡** | 다중 시스템, 아키텍처 변경, 불확실성 높음 | Task (implementation-executor) 병렬 위임 |
|
|
453
458
|
| **복잡/보통** | 명확한 범위, 3-10 파일 | 직접 처리 (Task Explore 활용) + 병렬 구현 |
|
|
454
459
|
| **간단** | 1-2 파일, 명확한 변경 | 직접 처리 |
|