cp-toolkit 2.2.2 → 2.2.4

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.
Files changed (71) hide show
  1. package/package.json +1 -1
  2. package/src/commands/add.js +23 -16
  3. package/src/commands/doctor.js +15 -10
  4. package/src/commands/init.js +410 -64
  5. package/templates/AGENTS.md +47 -0
  6. package/templates/ARCHITECTURE.md +42 -0
  7. package/templates/agents/backend-specialist.md +1 -0
  8. package/templates/agents/code-archaeologist.md +116 -106
  9. package/templates/agents/database-architect.md +1 -0
  10. package/templates/agents/debugger.md +1 -0
  11. package/templates/agents/devops-engineer.md +1 -0
  12. package/templates/agents/documentation-writer.md +1 -0
  13. package/templates/agents/explorer-agent.md +83 -73
  14. package/templates/agents/frontend-specialist.md +1 -0
  15. package/templates/agents/game-developer.md +1 -0
  16. package/templates/agents/mobile-developer.md +1 -0
  17. package/templates/agents/orchestrator.md +426 -416
  18. package/templates/agents/penetration-tester.md +1 -0
  19. package/templates/agents/performance-optimizer.md +1 -0
  20. package/templates/agents/product-manager.md +122 -112
  21. package/templates/agents/product-owner.md +105 -95
  22. package/templates/agents/project-planner.md +416 -406
  23. package/templates/agents/qa-automation-engineer.md +113 -103
  24. package/templates/agents/security-auditor.md +1 -0
  25. package/templates/agents/seo-specialist.md +1 -0
  26. package/templates/agents/test-engineer.md +1 -0
  27. package/templates/skills/core/behavioral-modes/SKILL.md +244 -242
  28. package/templates/skills/core/brainstorming/SKILL.md +166 -163
  29. package/templates/skills/core/mcp-builder/SKILL.md +178 -176
  30. package/templates/skills/core/parallel-agents/SKILL.md +187 -175
  31. package/templates/skills/core/plan-writing/SKILL.md +154 -152
  32. package/templates/skills/optional/api-patterns/SKILL.md +83 -81
  33. package/templates/skills/optional/app-builder/SKILL.md +78 -75
  34. package/templates/skills/optional/app-builder/templates/SKILL.md +41 -39
  35. package/templates/skills/optional/architecture/SKILL.md +58 -55
  36. package/templates/skills/optional/bash-linux/SKILL.md +201 -199
  37. package/templates/skills/optional/code-review-checklist/SKILL.md +110 -109
  38. package/templates/skills/optional/database-design/SKILL.md +54 -52
  39. package/templates/skills/optional/deployment-procedures/SKILL.md +243 -241
  40. package/templates/skills/optional/documentation-templates/SKILL.md +196 -194
  41. package/templates/skills/optional/frontend-design/SKILL.md +421 -418
  42. package/templates/skills/optional/game-development/2d-games/SKILL.md +120 -119
  43. package/templates/skills/optional/game-development/3d-games/SKILL.md +136 -135
  44. package/templates/skills/optional/game-development/SKILL.md +169 -167
  45. package/templates/skills/optional/game-development/game-art/SKILL.md +187 -185
  46. package/templates/skills/optional/game-development/game-audio/SKILL.md +192 -190
  47. package/templates/skills/optional/game-development/game-design/SKILL.md +131 -129
  48. package/templates/skills/optional/game-development/mobile-games/SKILL.md +110 -108
  49. package/templates/skills/optional/game-development/multiplayer/SKILL.md +133 -132
  50. package/templates/skills/optional/game-development/pc-games/SKILL.md +146 -144
  51. package/templates/skills/optional/game-development/vr-ar/SKILL.md +124 -123
  52. package/templates/skills/optional/game-development/web-games/SKILL.md +152 -150
  53. package/templates/skills/optional/geo-fundamentals/SKILL.md +158 -156
  54. package/templates/skills/optional/i18n-localization/SKILL.md +156 -154
  55. package/templates/skills/optional/lint-and-validate/SKILL.md +48 -45
  56. package/templates/skills/optional/mobile-design/SKILL.md +397 -394
  57. package/templates/skills/optional/nextjs-react-expert/SKILL.md +271 -267
  58. package/templates/skills/optional/nodejs-best-practices/SKILL.md +335 -333
  59. package/templates/skills/optional/performance-profiling/SKILL.md +145 -143
  60. package/templates/skills/optional/powershell-windows/SKILL.md +169 -167
  61. package/templates/skills/optional/python-patterns/SKILL.md +443 -441
  62. package/templates/skills/optional/red-team-tactics/SKILL.md +201 -199
  63. package/templates/skills/optional/seo-fundamentals/SKILL.md +130 -129
  64. package/templates/skills/optional/server-management/SKILL.md +163 -161
  65. package/templates/skills/optional/systematic-debugging/SKILL.md +111 -109
  66. package/templates/skills/optional/tailwind-patterns/SKILL.md +271 -269
  67. package/templates/skills/optional/tdd-workflow/SKILL.md +150 -149
  68. package/templates/skills/optional/testing-patterns/SKILL.md +179 -178
  69. package/templates/skills/optional/vulnerability-scanner/SKILL.md +278 -276
  70. package/templates/skills/optional/web-design-guidelines/SKILL.md +60 -57
  71. package/templates/skills/optional/webapp-testing/SKILL.md +188 -187
@@ -1,57 +1,60 @@
1
- ---
2
- name: web-design-guidelines
3
- description: Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
4
- metadata:
5
- author: vercel
6
- version: "1.0.0"
7
- argument-hint: <file-or-pattern>
8
- ---
9
-
10
- # Web Interface Guidelines
11
-
12
- Review files for compliance with Web Interface Guidelines.
13
-
14
- ## How It Works
15
-
16
- 1. Fetch the latest guidelines from the source URL below
17
- 2. Read the specified files (or prompt user for files/pattern)
18
- 3. Check against all rules in the fetched guidelines
19
- 4. Output findings in the terse `file:line` format
20
-
21
- ## Guidelines Source
22
-
23
- Fetch fresh guidelines before each review:
24
-
25
- ```
26
- https://raw.githubusercontent.com/vercel-labs/web-interface-guidelines/main/command.md
27
- ```
28
-
29
- Use WebFetch to retrieve the latest rules. The fetched content contains all the rules and output format instructions.
30
-
31
- ## Usage
32
-
33
- When a user provides a file or pattern argument:
34
- 1. Fetch guidelines from the source URL above
35
- 2. Read the specified files
36
- 3. Apply all rules from the fetched guidelines
37
- 4. Output findings using the format specified in the guidelines
38
-
39
- If no files specified, ask the user which files to review.
40
-
41
- ---
42
-
43
- ## Related Skills
44
-
45
- | Skill | When to Use |
46
- |-------|-------------|
47
- | **[frontend-design](../frontend-design/SKILL.md)** | Before coding - Learn design principles (color, typography, UX psychology) |
48
- | **web-design-guidelines** (this) | After coding - Audit for accessibility, performance, and best practices |
49
-
50
- ## Design Workflow
51
-
52
- ```
53
- 1. DESIGN → Read frontend-design principles
54
- 2. CODE → Implement the design
55
- 3. AUDIT → Run web-design-guidelines review ← YOU ARE HERE
56
- 4. FIX Address findings from audit
57
- ```
1
+ ---
2
+ name: web-design-guidelines
3
+ description: Review UI code for Web Interface Guidelines compliance. Use when asked
4
+ to "review my UI", "check accessibility", "audit design", "review UX", or "check
5
+ my site against best practices".
6
+ metadata:
7
+ author: vercel
8
+ version: 1.0.0
9
+ argument-hint: <file-or-pattern>
10
+ version: '1.0'
11
+ ---
12
+
13
+ # Web Interface Guidelines
14
+
15
+ Review files for compliance with Web Interface Guidelines.
16
+
17
+ ## How It Works
18
+
19
+ 1. Fetch the latest guidelines from the source URL below
20
+ 2. Read the specified files (or prompt user for files/pattern)
21
+ 3. Check against all rules in the fetched guidelines
22
+ 4. Output findings in the terse `file:line` format
23
+
24
+ ## Guidelines Source
25
+
26
+ Fetch fresh guidelines before each review:
27
+
28
+ ```
29
+ https://raw.githubusercontent.com/vercel-labs/web-interface-guidelines/main/command.md
30
+ ```
31
+
32
+ Use WebFetch to retrieve the latest rules. The fetched content contains all the rules and output format instructions.
33
+
34
+ ## Usage
35
+
36
+ When a user provides a file or pattern argument:
37
+ 1. Fetch guidelines from the source URL above
38
+ 2. Read the specified files
39
+ 3. Apply all rules from the fetched guidelines
40
+ 4. Output findings using the format specified in the guidelines
41
+
42
+ If no files specified, ask the user which files to review.
43
+
44
+ ---
45
+
46
+ ## Related Skills
47
+
48
+ | Skill | When to Use |
49
+ |-------|-------------|
50
+ | **[frontend-design](../frontend-design/SKILL.md)** | Before coding - Learn design principles (color, typography, UX psychology) |
51
+ | **web-design-guidelines** (this) | After coding - Audit for accessibility, performance, and best practices |
52
+
53
+ ## Design Workflow
54
+
55
+ ```
56
+ 1. DESIGN Read frontend-design principles
57
+ 2. CODE → Implement the design
58
+ 3. AUDIT → Run web-design-guidelines review ← YOU ARE HERE
59
+ 4. FIX → Address findings from audit
60
+ ```
@@ -1,187 +1,188 @@
1
- ---
2
- name: webapp-testing
3
- description: Web application testing principles. E2E, Playwright, deep audit strategies.
4
- allowed-tools: Read, Write, Edit, Glob, Grep, Bash
5
- ---
6
-
7
- # Web App Testing
8
-
9
- > Discover and test everything. Leave no route untested.
10
-
11
- ## 🔧 Runtime Scripts
12
-
13
- **Execute these for automated browser testing:**
14
-
15
- | Script | Purpose | Usage |
16
- |--------|---------|-------|
17
- | `scripts/playwright_runner.py` | Basic browser test | `python scripts/playwright_runner.py https://example.com` |
18
- | | With screenshot | `python scripts/playwright_runner.py <url> --screenshot` |
19
- | | Accessibility check | `python scripts/playwright_runner.py <url> --a11y` |
20
-
21
- **Requires:** `pip install playwright && playwright install chromium`
22
-
23
- ---
24
-
25
- ## 1. Deep Audit Approach
26
-
27
- ### Discovery First
28
-
29
- | Target | How to Find |
30
- |--------|-------------|
31
- | Routes | Scan app/, pages/, router files |
32
- | API endpoints | Grep for HTTP methods |
33
- | Components | Find component directories |
34
- | Features | Read documentation |
35
-
36
- ### Systematic Testing
37
-
38
- 1. **Map** - List all routes/APIs
39
- 2. **Scan** - Verify they respond
40
- 3. **Test** - Cover critical paths
41
-
42
- ---
43
-
44
- ## 2. Testing Pyramid for Web
45
-
46
- ```
47
- /\ E2E (Few)
48
- / \ Critical user flows
49
- /----\
50
- / \ Integration (Some)
51
- /--------\ API, data flow
52
- / \
53
- /------------\ Component (Many)
54
- Individual UI pieces
55
- ```
56
-
57
- ---
58
-
59
- ## 3. E2E Test Principles
60
-
61
- ### What to Test
62
-
63
- | Priority | Tests |
64
- |----------|-------|
65
- | 1 | Happy path user flows |
66
- | 2 | Authentication flows |
67
- | 3 | Critical business actions |
68
- | 4 | Error handling |
69
-
70
- ### E2E Best Practices
71
-
72
- | Practice | Why |
73
- |----------|-----|
74
- | Use data-testid | Stable selectors |
75
- | Wait for elements | Avoid flaky tests |
76
- | Clean state | Independent tests |
77
- | Avoid implementation details | Test user behavior |
78
-
79
- ---
80
-
81
- ## 4. Playwright Principles
82
-
83
- ### Core Concepts
84
-
85
- | Concept | Use |
86
- |---------|-----|
87
- | Page Object Model | Encapsulate page logic |
88
- | Fixtures | Reusable test setup |
89
- | Assertions | Built-in auto-wait |
90
- | Trace Viewer | Debug failures |
91
-
92
- ### Configuration
93
-
94
- | Setting | Recommendation |
95
- |---------|----------------|
96
- | Retries | 2 on CI |
97
- | Trace | on-first-retry |
98
- | Screenshots | on-failure |
99
- | Video | retain-on-failure |
100
-
101
- ---
102
-
103
- ## 5. Visual Testing
104
-
105
- ### When to Use
106
-
107
- | Scenario | Value |
108
- |----------|-------|
109
- | Design system | High |
110
- | Marketing pages | High |
111
- | Component library | Medium |
112
- | Dynamic content | Lower |
113
-
114
- ### Strategy
115
-
116
- - Baseline screenshots
117
- - Compare on changes
118
- - Review visual diffs
119
- - Update intentional changes
120
-
121
- ---
122
-
123
- ## 6. API Testing Principles
124
-
125
- ### Coverage Areas
126
-
127
- | Area | Tests |
128
- |------|-------|
129
- | Status codes | 200, 400, 404, 500 |
130
- | Response shape | Matches schema |
131
- | Error messages | User-friendly |
132
- | Edge cases | Empty, large, special chars |
133
-
134
- ---
135
-
136
- ## 7. Test Organization
137
-
138
- ### File Structure
139
-
140
- ```
141
- tests/
142
- ├── e2e/ # Full user flows
143
- ├── integration/ # API, data
144
- ├── component/ # UI units
145
- └── fixtures/ # Shared data
146
- ```
147
-
148
- ### Naming Convention
149
-
150
- | Pattern | Example |
151
- |---------|---------|
152
- | Feature-based | `login.spec.ts` |
153
- | Descriptive | `user-can-checkout.spec.ts` |
154
-
155
- ---
156
-
157
- ## 8. CI Integration
158
-
159
- ### Pipeline Steps
160
-
161
- 1. Install dependencies
162
- 2. Install browsers
163
- 3. Run tests
164
- 4. Upload artifacts (traces, screenshots)
165
-
166
- ### Parallelization
167
-
168
- | Strategy | Use |
169
- |----------|-----|
170
- | Per file | Playwright default |
171
- | Sharding | Large suites |
172
- | Workers | Multiple browsers |
173
-
174
- ---
175
-
176
- ## 9. Anti-Patterns
177
-
178
- | ❌ Don't | ✅ Do |
179
- |----------|-------|
180
- | Test implementation | Test behavior |
181
- | Hardcode waits | Use auto-wait |
182
- | Skip cleanup | Isolate tests |
183
- | Ignore flaky tests | Fix root cause |
184
-
185
- ---
186
-
187
- > **Remember:** E2E tests are expensive. Use them for critical paths only.
1
+ ---
2
+ name: webapp-testing
3
+ description: Web application testing principles. E2E, Playwright, deep audit strategies.
4
+ allowed-tools: Read, Write, Edit, Glob, Grep, Bash
5
+ version: '1.0'
6
+ ---
7
+
8
+ # Web App Testing
9
+
10
+ > Discover and test everything. Leave no route untested.
11
+
12
+ ## 🔧 Runtime Scripts
13
+
14
+ **Execute these for automated browser testing:**
15
+
16
+ | Script | Purpose | Usage |
17
+ |--------|---------|-------|
18
+ | `scripts/playwright_runner.py` | Basic browser test | `python scripts/playwright_runner.py https://example.com` |
19
+ | | With screenshot | `python scripts/playwright_runner.py <url> --screenshot` |
20
+ | | Accessibility check | `python scripts/playwright_runner.py <url> --a11y` |
21
+
22
+ **Requires:** `pip install playwright && playwright install chromium`
23
+
24
+ ---
25
+
26
+ ## 1. Deep Audit Approach
27
+
28
+ ### Discovery First
29
+
30
+ | Target | How to Find |
31
+ |--------|-------------|
32
+ | Routes | Scan app/, pages/, router files |
33
+ | API endpoints | Grep for HTTP methods |
34
+ | Components | Find component directories |
35
+ | Features | Read documentation |
36
+
37
+ ### Systematic Testing
38
+
39
+ 1. **Map** - List all routes/APIs
40
+ 2. **Scan** - Verify they respond
41
+ 3. **Test** - Cover critical paths
42
+
43
+ ---
44
+
45
+ ## 2. Testing Pyramid for Web
46
+
47
+ ```
48
+ /\ E2E (Few)
49
+ / \ Critical user flows
50
+ /----\
51
+ / \ Integration (Some)
52
+ /--------\ API, data flow
53
+ / \
54
+ /------------\ Component (Many)
55
+ Individual UI pieces
56
+ ```
57
+
58
+ ---
59
+
60
+ ## 3. E2E Test Principles
61
+
62
+ ### What to Test
63
+
64
+ | Priority | Tests |
65
+ |----------|-------|
66
+ | 1 | Happy path user flows |
67
+ | 2 | Authentication flows |
68
+ | 3 | Critical business actions |
69
+ | 4 | Error handling |
70
+
71
+ ### E2E Best Practices
72
+
73
+ | Practice | Why |
74
+ |----------|-----|
75
+ | Use data-testid | Stable selectors |
76
+ | Wait for elements | Avoid flaky tests |
77
+ | Clean state | Independent tests |
78
+ | Avoid implementation details | Test user behavior |
79
+
80
+ ---
81
+
82
+ ## 4. Playwright Principles
83
+
84
+ ### Core Concepts
85
+
86
+ | Concept | Use |
87
+ |---------|-----|
88
+ | Page Object Model | Encapsulate page logic |
89
+ | Fixtures | Reusable test setup |
90
+ | Assertions | Built-in auto-wait |
91
+ | Trace Viewer | Debug failures |
92
+
93
+ ### Configuration
94
+
95
+ | Setting | Recommendation |
96
+ |---------|----------------|
97
+ | Retries | 2 on CI |
98
+ | Trace | on-first-retry |
99
+ | Screenshots | on-failure |
100
+ | Video | retain-on-failure |
101
+
102
+ ---
103
+
104
+ ## 5. Visual Testing
105
+
106
+ ### When to Use
107
+
108
+ | Scenario | Value |
109
+ |----------|-------|
110
+ | Design system | High |
111
+ | Marketing pages | High |
112
+ | Component library | Medium |
113
+ | Dynamic content | Lower |
114
+
115
+ ### Strategy
116
+
117
+ - Baseline screenshots
118
+ - Compare on changes
119
+ - Review visual diffs
120
+ - Update intentional changes
121
+
122
+ ---
123
+
124
+ ## 6. API Testing Principles
125
+
126
+ ### Coverage Areas
127
+
128
+ | Area | Tests |
129
+ |------|-------|
130
+ | Status codes | 200, 400, 404, 500 |
131
+ | Response shape | Matches schema |
132
+ | Error messages | User-friendly |
133
+ | Edge cases | Empty, large, special chars |
134
+
135
+ ---
136
+
137
+ ## 7. Test Organization
138
+
139
+ ### File Structure
140
+
141
+ ```
142
+ tests/
143
+ ├── e2e/ # Full user flows
144
+ ├── integration/ # API, data
145
+ ├── component/ # UI units
146
+ └── fixtures/ # Shared data
147
+ ```
148
+
149
+ ### Naming Convention
150
+
151
+ | Pattern | Example |
152
+ |---------|---------|
153
+ | Feature-based | `login.spec.ts` |
154
+ | Descriptive | `user-can-checkout.spec.ts` |
155
+
156
+ ---
157
+
158
+ ## 8. CI Integration
159
+
160
+ ### Pipeline Steps
161
+
162
+ 1. Install dependencies
163
+ 2. Install browsers
164
+ 3. Run tests
165
+ 4. Upload artifacts (traces, screenshots)
166
+
167
+ ### Parallelization
168
+
169
+ | Strategy | Use |
170
+ |----------|-----|
171
+ | Per file | Playwright default |
172
+ | Sharding | Large suites |
173
+ | Workers | Multiple browsers |
174
+
175
+ ---
176
+
177
+ ## 9. Anti-Patterns
178
+
179
+ | ❌ Don't | ✅ Do |
180
+ |----------|-------|
181
+ | Test implementation | Test behavior |
182
+ | Hardcode waits | Use auto-wait |
183
+ | Skip cleanup | Isolate tests |
184
+ | Ignore flaky tests | Fix root cause |
185
+
186
+ ---
187
+
188
+ > **Remember:** E2E tests are expensive. Use them for critical paths only.