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.
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 +55 -16
  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,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
- # Code Review Checklist
8
-
9
- ## Quick Review Checklist
10
-
11
- ### Correctness
12
- - [ ] Code does what it's supposed to do
13
- - [ ] Edge cases handled
14
- - [ ] Error handling in place
15
- - [ ] No obvious bugs
16
-
17
- ### Security
18
- - [ ] Input validated and sanitized
19
- - [ ] No SQL/NoSQL injection vulnerabilities
20
- - [ ] No XSS or CSRF vulnerabilities
21
- - [ ] No hardcoded secrets or sensitive credentials
22
- - [ ] **AI-Specific:** Protection against Prompt Injection (if applicable)
23
- - [ ] **AI-Specific:** Outputs are sanitized before being used in critical sinks
24
-
25
- ### Performance
26
- - [ ] No N+1 queries
27
- - [ ] No unnecessary loops
28
- - [ ] Appropriate caching
29
- - [ ] Bundle size impact considered
30
-
31
- ### Code Quality
32
- - [ ] Clear naming
33
- - [ ] DRY - no duplicate code
34
- - [ ] SOLID principles followed
35
- - [ ] Appropriate abstraction level
36
-
37
- ### Testing
38
- - [ ] Unit tests for new code
39
- - [ ] Edge cases tested
40
- - [ ] Tests readable and maintainable
41
-
42
- ### Documentation
43
- - [ ] Complex logic commented
44
- - [ ] Public APIs documented
45
- - [ ] README updated if needed
46
-
47
- ## AI & LLM Review Patterns (2025)
48
-
49
- ### Logic & Hallucinations
50
- - [ ] **Chain of Thought:** Does the logic follow a verifiable path?
51
- - [ ] **Edge Cases:** Did the AI account for empty states, timeouts, and partial failures?
52
- - [ ] **External State:** Is the code making safe assumptions about file systems or networks?
53
-
54
- ### Prompt Engineering Review
55
- ```markdown
56
- // ❌ Vague prompt in code
57
- const response = await ai.generate(userInput);
58
-
59
- // ✅ Structured & Safe prompt
60
- const response = await ai.generate({
61
- system: "You are a specialized parser...",
62
- input: sanitize(userInput),
63
- schema: ResponseSchema
64
- });
65
- ```
66
-
67
- ## Anti-Patterns to Flag
68
-
69
- ```typescript
70
- // ❌ Magic numbers
71
- if (status === 3) { ... }
72
-
73
- // ✅ Named constants
74
- if (status === Status.ACTIVE) { ... }
75
-
76
- // ❌ Deep nesting
77
- if (a) { if (b) { if (c) { ... } } }
78
-
79
- // ✅ Early returns
80
- if (!a) return;
81
- if (!b) return;
82
- if (!c) return;
83
- // do work
84
-
85
- // ❌ Long functions (100+ lines)
86
- // Small, focused functions
87
-
88
- // ❌ any type
89
- const data: any = ...
90
-
91
- // ✅ Proper types
92
- const data: UserData = ...
93
- ```
94
-
95
- ## Review Comments Guide
96
-
97
- ```
98
- // Blocking issues use 🔴
99
- 🔴 BLOCKING: SQL injection vulnerability here
100
-
101
- // Important suggestions use 🟡
102
- 🟡 SUGGESTION: Consider using useMemo for performance
103
-
104
- // Minor nits use 🟢
105
- 🟢 NIT: Prefer const over let for immutable variable
106
-
107
- // Questions use ❓
108
- QUESTION: What happens if user is null here?
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 strategy, ORM selection, serverless databases.
4
- allowed-tools: Read, Write, Edit, Glob, Grep
5
- ---
6
-
7
- # Database Design
8
-
9
- > **Learn to THINK, not copy SQL patterns.**
10
-
11
- ## 🎯 Selective Reading Rule
12
-
13
- **Read ONLY files relevant to the request!** Check the content map, find what you need.
14
-
15
- | File | Description | When to Read |
16
- |------|-------------|--------------|
17
- | `database-selection.md` | PostgreSQL vs Neon vs Turso vs SQLite | Choosing database |
18
- | `orm-selection.md` | Drizzle vs Prisma vs Kysely | Choosing ORM |
19
- | `schema-design.md` | Normalization, PKs, relationships | Designing schema |
20
- | `indexing.md` | Index types, composite indexes | Performance tuning |
21
- | `optimization.md` | N+1, EXPLAIN ANALYZE | Query optimization |
22
- | `migrations.md` | Safe migrations, serverless DBs | Schema changes |
23
-
24
- ---
25
-
26
- ## ⚠️ Core Principle
27
-
28
- - ASK user for database preferences when unclear
29
- - Choose database/ORM based on CONTEXT
30
- - Don't default to PostgreSQL for everything
31
-
32
- ---
33
-
34
- ## Decision Checklist
35
-
36
- Before designing schema:
37
-
38
- - [ ] Asked user about database preference?
39
- - [ ] Chosen database for THIS context?
40
- - [ ] Considered deployment environment?
41
- - [ ] Planned index strategy?
42
- - [ ] Defined relationship types?
43
-
44
- ---
45
-
46
- ## Anti-Patterns
47
-
48
- Default to PostgreSQL for simple apps (SQLite may suffice)
49
- ❌ Skip indexing
50
- Use SELECT * in production
51
- Store JSON when structured data is better
52
- Ignore N+1 queries
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