cp-toolkit 2.2.3 → 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.
- package/package.json +1 -1
- package/src/commands/add.js +23 -16
- package/src/commands/doctor.js +15 -10
- package/src/commands/init.js +55 -16
- package/templates/AGENTS.md +47 -0
- package/templates/ARCHITECTURE.md +42 -0
- package/templates/agents/backend-specialist.md +1 -0
- package/templates/agents/code-archaeologist.md +116 -106
- package/templates/agents/database-architect.md +1 -0
- package/templates/agents/debugger.md +1 -0
- package/templates/agents/devops-engineer.md +1 -0
- package/templates/agents/documentation-writer.md +1 -0
- package/templates/agents/explorer-agent.md +83 -73
- package/templates/agents/frontend-specialist.md +1 -0
- package/templates/agents/game-developer.md +1 -0
- package/templates/agents/mobile-developer.md +1 -0
- package/templates/agents/orchestrator.md +426 -416
- package/templates/agents/penetration-tester.md +1 -0
- package/templates/agents/performance-optimizer.md +1 -0
- package/templates/agents/product-manager.md +122 -112
- package/templates/agents/product-owner.md +105 -95
- package/templates/agents/project-planner.md +416 -406
- package/templates/agents/qa-automation-engineer.md +113 -103
- package/templates/agents/security-auditor.md +1 -0
- package/templates/agents/seo-specialist.md +1 -0
- package/templates/agents/test-engineer.md +1 -0
- package/templates/skills/core/behavioral-modes/SKILL.md +244 -242
- package/templates/skills/core/brainstorming/SKILL.md +166 -163
- package/templates/skills/core/mcp-builder/SKILL.md +178 -176
- package/templates/skills/core/parallel-agents/SKILL.md +187 -175
- package/templates/skills/core/plan-writing/SKILL.md +154 -152
- package/templates/skills/optional/api-patterns/SKILL.md +83 -81
- package/templates/skills/optional/app-builder/SKILL.md +78 -75
- package/templates/skills/optional/app-builder/templates/SKILL.md +41 -39
- package/templates/skills/optional/architecture/SKILL.md +58 -55
- package/templates/skills/optional/bash-linux/SKILL.md +201 -199
- package/templates/skills/optional/code-review-checklist/SKILL.md +110 -109
- package/templates/skills/optional/database-design/SKILL.md +54 -52
- package/templates/skills/optional/deployment-procedures/SKILL.md +243 -241
- package/templates/skills/optional/documentation-templates/SKILL.md +196 -194
- package/templates/skills/optional/frontend-design/SKILL.md +421 -418
- package/templates/skills/optional/game-development/2d-games/SKILL.md +120 -119
- package/templates/skills/optional/game-development/3d-games/SKILL.md +136 -135
- package/templates/skills/optional/game-development/SKILL.md +169 -167
- package/templates/skills/optional/game-development/game-art/SKILL.md +187 -185
- package/templates/skills/optional/game-development/game-audio/SKILL.md +192 -190
- package/templates/skills/optional/game-development/game-design/SKILL.md +131 -129
- package/templates/skills/optional/game-development/mobile-games/SKILL.md +110 -108
- package/templates/skills/optional/game-development/multiplayer/SKILL.md +133 -132
- package/templates/skills/optional/game-development/pc-games/SKILL.md +146 -144
- package/templates/skills/optional/game-development/vr-ar/SKILL.md +124 -123
- package/templates/skills/optional/game-development/web-games/SKILL.md +152 -150
- package/templates/skills/optional/geo-fundamentals/SKILL.md +158 -156
- package/templates/skills/optional/i18n-localization/SKILL.md +156 -154
- package/templates/skills/optional/lint-and-validate/SKILL.md +48 -45
- package/templates/skills/optional/mobile-design/SKILL.md +397 -394
- package/templates/skills/optional/nextjs-react-expert/SKILL.md +271 -267
- package/templates/skills/optional/nodejs-best-practices/SKILL.md +335 -333
- package/templates/skills/optional/performance-profiling/SKILL.md +145 -143
- package/templates/skills/optional/powershell-windows/SKILL.md +169 -167
- package/templates/skills/optional/python-patterns/SKILL.md +443 -441
- package/templates/skills/optional/red-team-tactics/SKILL.md +201 -199
- package/templates/skills/optional/seo-fundamentals/SKILL.md +130 -129
- package/templates/skills/optional/server-management/SKILL.md +163 -161
- package/templates/skills/optional/systematic-debugging/SKILL.md +111 -109
- package/templates/skills/optional/tailwind-patterns/SKILL.md +271 -269
- package/templates/skills/optional/tdd-workflow/SKILL.md +150 -149
- package/templates/skills/optional/testing-patterns/SKILL.md +179 -178
- package/templates/skills/optional/vulnerability-scanner/SKILL.md +278 -276
- package/templates/skills/optional/web-design-guidelines/SKILL.md +60 -57
- package/templates/skills/optional/webapp-testing/SKILL.md +188 -187
|
@@ -1,109 +1,110 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: code-review-checklist
|
|
3
|
-
description: Code review guidelines covering code quality, security, and best practices.
|
|
4
|
-
allowed-tools: Read, Glob, Grep
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
- [ ]
|
|
14
|
-
- [ ]
|
|
15
|
-
- [ ]
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
- [ ]
|
|
20
|
-
- [ ] No
|
|
21
|
-
- [ ] No
|
|
22
|
-
- [ ]
|
|
23
|
-
- [ ] **AI-Specific:**
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
- [ ] No
|
|
28
|
-
- [ ]
|
|
29
|
-
- [ ]
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
- [ ]
|
|
34
|
-
- [ ]
|
|
35
|
-
- [ ]
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
- [ ]
|
|
40
|
-
- [ ]
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
- [ ]
|
|
45
|
-
- [ ]
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
- [ ] **
|
|
52
|
-
- [ ] **
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
if (!
|
|
82
|
-
if (!
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
//
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
1
|
+
---
|
|
2
|
+
name: code-review-checklist
|
|
3
|
+
description: Code review guidelines covering code quality, security, and best practices.
|
|
4
|
+
allowed-tools: Read, Glob, Grep
|
|
5
|
+
version: '1.0'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Code Review Checklist
|
|
9
|
+
|
|
10
|
+
## Quick Review Checklist
|
|
11
|
+
|
|
12
|
+
### Correctness
|
|
13
|
+
- [ ] Code does what it's supposed to do
|
|
14
|
+
- [ ] Edge cases handled
|
|
15
|
+
- [ ] Error handling in place
|
|
16
|
+
- [ ] No obvious bugs
|
|
17
|
+
|
|
18
|
+
### Security
|
|
19
|
+
- [ ] Input validated and sanitized
|
|
20
|
+
- [ ] No SQL/NoSQL injection vulnerabilities
|
|
21
|
+
- [ ] No XSS or CSRF vulnerabilities
|
|
22
|
+
- [ ] No hardcoded secrets or sensitive credentials
|
|
23
|
+
- [ ] **AI-Specific:** Protection against Prompt Injection (if applicable)
|
|
24
|
+
- [ ] **AI-Specific:** Outputs are sanitized before being used in critical sinks
|
|
25
|
+
|
|
26
|
+
### Performance
|
|
27
|
+
- [ ] No N+1 queries
|
|
28
|
+
- [ ] No unnecessary loops
|
|
29
|
+
- [ ] Appropriate caching
|
|
30
|
+
- [ ] Bundle size impact considered
|
|
31
|
+
|
|
32
|
+
### Code Quality
|
|
33
|
+
- [ ] Clear naming
|
|
34
|
+
- [ ] DRY - no duplicate code
|
|
35
|
+
- [ ] SOLID principles followed
|
|
36
|
+
- [ ] Appropriate abstraction level
|
|
37
|
+
|
|
38
|
+
### Testing
|
|
39
|
+
- [ ] Unit tests for new code
|
|
40
|
+
- [ ] Edge cases tested
|
|
41
|
+
- [ ] Tests readable and maintainable
|
|
42
|
+
|
|
43
|
+
### Documentation
|
|
44
|
+
- [ ] Complex logic commented
|
|
45
|
+
- [ ] Public APIs documented
|
|
46
|
+
- [ ] README updated if needed
|
|
47
|
+
|
|
48
|
+
## AI & LLM Review Patterns (2025)
|
|
49
|
+
|
|
50
|
+
### Logic & Hallucinations
|
|
51
|
+
- [ ] **Chain of Thought:** Does the logic follow a verifiable path?
|
|
52
|
+
- [ ] **Edge Cases:** Did the AI account for empty states, timeouts, and partial failures?
|
|
53
|
+
- [ ] **External State:** Is the code making safe assumptions about file systems or networks?
|
|
54
|
+
|
|
55
|
+
### Prompt Engineering Review
|
|
56
|
+
```markdown
|
|
57
|
+
// ❌ Vague prompt in code
|
|
58
|
+
const response = await ai.generate(userInput);
|
|
59
|
+
|
|
60
|
+
// ✅ Structured & Safe prompt
|
|
61
|
+
const response = await ai.generate({
|
|
62
|
+
system: "You are a specialized parser...",
|
|
63
|
+
input: sanitize(userInput),
|
|
64
|
+
schema: ResponseSchema
|
|
65
|
+
});
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Anti-Patterns to Flag
|
|
69
|
+
|
|
70
|
+
```typescript
|
|
71
|
+
// ❌ Magic numbers
|
|
72
|
+
if (status === 3) { ... }
|
|
73
|
+
|
|
74
|
+
// ✅ Named constants
|
|
75
|
+
if (status === Status.ACTIVE) { ... }
|
|
76
|
+
|
|
77
|
+
// ❌ Deep nesting
|
|
78
|
+
if (a) { if (b) { if (c) { ... } } }
|
|
79
|
+
|
|
80
|
+
// ✅ Early returns
|
|
81
|
+
if (!a) return;
|
|
82
|
+
if (!b) return;
|
|
83
|
+
if (!c) return;
|
|
84
|
+
// do work
|
|
85
|
+
|
|
86
|
+
// ❌ Long functions (100+ lines)
|
|
87
|
+
// ✅ Small, focused functions
|
|
88
|
+
|
|
89
|
+
// ❌ any type
|
|
90
|
+
const data: any = ...
|
|
91
|
+
|
|
92
|
+
// ✅ Proper types
|
|
93
|
+
const data: UserData = ...
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Review Comments Guide
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
// Blocking issues use 🔴
|
|
100
|
+
🔴 BLOCKING: SQL injection vulnerability here
|
|
101
|
+
|
|
102
|
+
// Important suggestions use 🟡
|
|
103
|
+
🟡 SUGGESTION: Consider using useMemo for performance
|
|
104
|
+
|
|
105
|
+
// Minor nits use 🟢
|
|
106
|
+
🟢 NIT: Prefer const over let for immutable variable
|
|
107
|
+
|
|
108
|
+
// Questions use ❓
|
|
109
|
+
❓ QUESTION: What happens if user is null here?
|
|
110
|
+
```
|
|
@@ -1,52 +1,54 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: database-design
|
|
3
|
-
description: Database design principles and decision-making. Schema design, indexing
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
|
18
|
-
|
|
19
|
-
| `
|
|
20
|
-
| `
|
|
21
|
-
| `
|
|
22
|
-
| `
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
- [ ]
|
|
41
|
-
- [ ]
|
|
42
|
-
- [ ]
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
❌
|
|
51
|
-
❌
|
|
52
|
-
❌
|
|
1
|
+
---
|
|
2
|
+
name: database-design
|
|
3
|
+
description: Database design principles and decision-making. Schema design, indexing
|
|
4
|
+
strategy, ORM selection, serverless databases.
|
|
5
|
+
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
6
|
+
version: '1.0'
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Database Design
|
|
10
|
+
|
|
11
|
+
> **Learn to THINK, not copy SQL patterns.**
|
|
12
|
+
|
|
13
|
+
## 🎯 Selective Reading Rule
|
|
14
|
+
|
|
15
|
+
**Read ONLY files relevant to the request!** Check the content map, find what you need.
|
|
16
|
+
|
|
17
|
+
| File | Description | When to Read |
|
|
18
|
+
|------|-------------|--------------|
|
|
19
|
+
| `database-selection.md` | PostgreSQL vs Neon vs Turso vs SQLite | Choosing database |
|
|
20
|
+
| `orm-selection.md` | Drizzle vs Prisma vs Kysely | Choosing ORM |
|
|
21
|
+
| `schema-design.md` | Normalization, PKs, relationships | Designing schema |
|
|
22
|
+
| `indexing.md` | Index types, composite indexes | Performance tuning |
|
|
23
|
+
| `optimization.md` | N+1, EXPLAIN ANALYZE | Query optimization |
|
|
24
|
+
| `migrations.md` | Safe migrations, serverless DBs | Schema changes |
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## ⚠️ Core Principle
|
|
29
|
+
|
|
30
|
+
- ASK user for database preferences when unclear
|
|
31
|
+
- Choose database/ORM based on CONTEXT
|
|
32
|
+
- Don't default to PostgreSQL for everything
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Decision Checklist
|
|
37
|
+
|
|
38
|
+
Before designing schema:
|
|
39
|
+
|
|
40
|
+
- [ ] Asked user about database preference?
|
|
41
|
+
- [ ] Chosen database for THIS context?
|
|
42
|
+
- [ ] Considered deployment environment?
|
|
43
|
+
- [ ] Planned index strategy?
|
|
44
|
+
- [ ] Defined relationship types?
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Anti-Patterns
|
|
49
|
+
|
|
50
|
+
❌ Default to PostgreSQL for simple apps (SQLite may suffice)
|
|
51
|
+
❌ Skip indexing
|
|
52
|
+
❌ Use SELECT * in production
|
|
53
|
+
❌ Store JSON when structured data is better
|
|
54
|
+
❌ Ignore N+1 queries
|