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,167 +1,169 @@
1
- ---
2
- name: game-development
3
- description: Game development orchestrator. Routes to platform-specific skills based on project needs.
4
- allowed-tools: Read, Write, Edit, Glob, Grep, Bash
5
- ---
6
-
7
- # Game Development
8
-
9
- > **Orchestrator skill** that provides core principles and routes to specialized sub-skills.
10
-
11
- ---
12
-
13
- ## When to Use This Skill
14
-
15
- You are working on a game development project. This skill teaches the PRINCIPLES of game development and directs you to the right sub-skill based on context.
16
-
17
- ---
18
-
19
- ## Sub-Skill Routing
20
-
21
- ### Platform Selection
22
-
23
- | If the game targets... | Use Sub-Skill |
24
- |------------------------|---------------|
25
- | Web browsers (HTML5, WebGL) | `game-development/web-games` |
26
- | Mobile (iOS, Android) | `game-development/mobile-games` |
27
- | PC (Steam, Desktop) | `game-development/pc-games` |
28
- | VR/AR headsets | `game-development/vr-ar` |
29
-
30
- ### Dimension Selection
31
-
32
- | If the game is... | Use Sub-Skill |
33
- |-------------------|---------------|
34
- | 2D (sprites, tilemaps) | `game-development/2d-games` |
35
- | 3D (meshes, shaders) | `game-development/3d-games` |
36
-
37
- ### Specialty Areas
38
-
39
- | If you need... | Use Sub-Skill |
40
- |----------------|---------------|
41
- | GDD, balancing, player psychology | `game-development/game-design` |
42
- | Multiplayer, networking | `game-development/multiplayer` |
43
- | Visual style, asset pipeline, animation | `game-development/game-art` |
44
- | Sound design, music, adaptive audio | `game-development/game-audio` |
45
-
46
- ---
47
-
48
- ## Core Principles (All Platforms)
49
-
50
- ### 1. The Game Loop
51
-
52
- Every game, regardless of platform, follows this pattern:
53
-
54
- ```
55
- INPUT → Read player actions
56
- UPDATE → Process game logic (fixed timestep)
57
- RENDER Draw the frame (interpolated)
58
- ```
59
-
60
- **Fixed Timestep Rule:**
61
- - Physics/logic: Fixed rate (e.g., 50Hz)
62
- - Rendering: As fast as possible
63
- - Interpolate between states for smooth visuals
64
-
65
- ---
66
-
67
- ### 2. Pattern Selection Matrix
68
-
69
- | Pattern | Use When | Example |
70
- |---------|----------|---------|
71
- | **State Machine** | 3-5 discrete states | Player: Idle→Walk→Jump |
72
- | **Object Pooling** | Frequent spawn/destroy | Bullets, particles |
73
- | **Observer/Events** | Cross-system communication | HealthUI updates |
74
- | **ECS** | Thousands of similar entities | RTS units, particles |
75
- | **Command** | Undo, replay, networking | Input recording |
76
- | **Behavior Tree** | Complex AI decisions | Enemy AI |
77
-
78
- **Decision Rule:** Start with State Machine. Add ECS only when performance demands.
79
-
80
- ---
81
-
82
- ### 3. Input Abstraction
83
-
84
- Abstract input into ACTIONS, not raw keys:
85
-
86
- ```
87
- "jump" → Space, Gamepad A, Touch tap
88
- "move" → WASD, Left stick, Virtual joystick
89
- ```
90
-
91
- **Why:** Enables multi-platform, rebindable controls.
92
-
93
- ---
94
-
95
- ### 4. Performance Budget (60 FPS = 16.67ms)
96
-
97
- | System | Budget |
98
- |--------|--------|
99
- | Input | 1ms |
100
- | Physics | 3ms |
101
- | AI | 2ms |
102
- | Game Logic | 4ms |
103
- | Rendering | 5ms |
104
- | Buffer | 1.67ms |
105
-
106
- **Optimization Priority:**
107
- 1. Algorithm (O(n²) → O(n log n))
108
- 2. Batching (reduce draw calls)
109
- 3. Pooling (avoid GC spikes)
110
- 4. LOD (detail by distance)
111
- 5. Culling (skip invisible)
112
-
113
- ---
114
-
115
- ### 5. AI Selection by Complexity
116
-
117
- | AI Type | Complexity | Use When |
118
- |---------|------------|----------|
119
- | **FSM** | Simple | 3-5 states, predictable behavior |
120
- | **Behavior Tree** | Medium | Modular, designer-friendly |
121
- | **GOAP** | High | Emergent, planning-based |
122
- | **Utility AI** | High | Scoring-based decisions |
123
-
124
- ---
125
-
126
- ### 6. Collision Strategy
127
-
128
- | Type | Best For |
129
- |------|----------|
130
- | **AABB** | Rectangles, fast checks |
131
- | **Circle** | Round objects, cheap |
132
- | **Spatial Hash** | Many similar-sized objects |
133
- | **Quadtree** | Large worlds, varying sizes |
134
-
135
- ---
136
-
137
- ## Anti-Patterns (Universal)
138
-
139
- | Don't | Do |
140
- |-------|-----|
141
- | Update everything every frame | Use events, dirty flags |
142
- | Create objects in hot loops | Object pooling |
143
- | Cache nothing | Cache references |
144
- | Optimize without profiling | Profile first |
145
- | Mix input with logic | Abstract input layer |
146
-
147
- ---
148
-
149
- ## Routing Examples
150
-
151
- ### Example 1: "I want to make a browser-based 2D platformer"
152
- → Start with `game-development/web-games` for framework selection
153
- Then `game-development/2d-games` for sprite/tilemap patterns
154
- Reference `game-development/game-design` for level design
155
-
156
- ### Example 2: "Mobile puzzle game for iOS and Android"
157
- → Start with `game-development/mobile-games` for touch input and stores
158
- Use `game-development/game-design` for puzzle balancing
159
-
160
- ### Example 3: "Multiplayer VR shooter"
161
- → `game-development/vr-ar` for comfort and immersion
162
- `game-development/3d-games` for rendering
163
- → `game-development/multiplayer` for networking
164
-
165
- ---
166
-
167
- > **Remember:** Great games come from iteration, not perfection. Prototype fast, then polish.
1
+ ---
2
+ name: game-development
3
+ description: Game development orchestrator. Routes to platform-specific skills based
4
+ on project needs.
5
+ allowed-tools: Read, Write, Edit, Glob, Grep, Bash
6
+ version: '1.0'
7
+ ---
8
+
9
+ # Game Development
10
+
11
+ > **Orchestrator skill** that provides core principles and routes to specialized sub-skills.
12
+
13
+ ---
14
+
15
+ ## When to Use This Skill
16
+
17
+ You are working on a game development project. This skill teaches the PRINCIPLES of game development and directs you to the right sub-skill based on context.
18
+
19
+ ---
20
+
21
+ ## Sub-Skill Routing
22
+
23
+ ### Platform Selection
24
+
25
+ | If the game targets... | Use Sub-Skill |
26
+ |------------------------|---------------|
27
+ | Web browsers (HTML5, WebGL) | `game-development/web-games` |
28
+ | Mobile (iOS, Android) | `game-development/mobile-games` |
29
+ | PC (Steam, Desktop) | `game-development/pc-games` |
30
+ | VR/AR headsets | `game-development/vr-ar` |
31
+
32
+ ### Dimension Selection
33
+
34
+ | If the game is... | Use Sub-Skill |
35
+ |-------------------|---------------|
36
+ | 2D (sprites, tilemaps) | `game-development/2d-games` |
37
+ | 3D (meshes, shaders) | `game-development/3d-games` |
38
+
39
+ ### Specialty Areas
40
+
41
+ | If you need... | Use Sub-Skill |
42
+ |----------------|---------------|
43
+ | GDD, balancing, player psychology | `game-development/game-design` |
44
+ | Multiplayer, networking | `game-development/multiplayer` |
45
+ | Visual style, asset pipeline, animation | `game-development/game-art` |
46
+ | Sound design, music, adaptive audio | `game-development/game-audio` |
47
+
48
+ ---
49
+
50
+ ## Core Principles (All Platforms)
51
+
52
+ ### 1. The Game Loop
53
+
54
+ Every game, regardless of platform, follows this pattern:
55
+
56
+ ```
57
+ INPUT Read player actions
58
+ UPDATE → Process game logic (fixed timestep)
59
+ RENDER → Draw the frame (interpolated)
60
+ ```
61
+
62
+ **Fixed Timestep Rule:**
63
+ - Physics/logic: Fixed rate (e.g., 50Hz)
64
+ - Rendering: As fast as possible
65
+ - Interpolate between states for smooth visuals
66
+
67
+ ---
68
+
69
+ ### 2. Pattern Selection Matrix
70
+
71
+ | Pattern | Use When | Example |
72
+ |---------|----------|---------|
73
+ | **State Machine** | 3-5 discrete states | Player: IdleWalk→Jump |
74
+ | **Object Pooling** | Frequent spawn/destroy | Bullets, particles |
75
+ | **Observer/Events** | Cross-system communication | Health→UI updates |
76
+ | **ECS** | Thousands of similar entities | RTS units, particles |
77
+ | **Command** | Undo, replay, networking | Input recording |
78
+ | **Behavior Tree** | Complex AI decisions | Enemy AI |
79
+
80
+ **Decision Rule:** Start with State Machine. Add ECS only when performance demands.
81
+
82
+ ---
83
+
84
+ ### 3. Input Abstraction
85
+
86
+ Abstract input into ACTIONS, not raw keys:
87
+
88
+ ```
89
+ "jump" → Space, Gamepad A, Touch tap
90
+ "move" → WASD, Left stick, Virtual joystick
91
+ ```
92
+
93
+ **Why:** Enables multi-platform, rebindable controls.
94
+
95
+ ---
96
+
97
+ ### 4. Performance Budget (60 FPS = 16.67ms)
98
+
99
+ | System | Budget |
100
+ |--------|--------|
101
+ | Input | 1ms |
102
+ | Physics | 3ms |
103
+ | AI | 2ms |
104
+ | Game Logic | 4ms |
105
+ | Rendering | 5ms |
106
+ | Buffer | 1.67ms |
107
+
108
+ **Optimization Priority:**
109
+ 1. Algorithm (O(n²) O(n log n))
110
+ 2. Batching (reduce draw calls)
111
+ 3. Pooling (avoid GC spikes)
112
+ 4. LOD (detail by distance)
113
+ 5. Culling (skip invisible)
114
+
115
+ ---
116
+
117
+ ### 5. AI Selection by Complexity
118
+
119
+ | AI Type | Complexity | Use When |
120
+ |---------|------------|----------|
121
+ | **FSM** | Simple | 3-5 states, predictable behavior |
122
+ | **Behavior Tree** | Medium | Modular, designer-friendly |
123
+ | **GOAP** | High | Emergent, planning-based |
124
+ | **Utility AI** | High | Scoring-based decisions |
125
+
126
+ ---
127
+
128
+ ### 6. Collision Strategy
129
+
130
+ | Type | Best For |
131
+ |------|----------|
132
+ | **AABB** | Rectangles, fast checks |
133
+ | **Circle** | Round objects, cheap |
134
+ | **Spatial Hash** | Many similar-sized objects |
135
+ | **Quadtree** | Large worlds, varying sizes |
136
+
137
+ ---
138
+
139
+ ## Anti-Patterns (Universal)
140
+
141
+ | Don't | Do |
142
+ |-------|-----|
143
+ | Update everything every frame | Use events, dirty flags |
144
+ | Create objects in hot loops | Object pooling |
145
+ | Cache nothing | Cache references |
146
+ | Optimize without profiling | Profile first |
147
+ | Mix input with logic | Abstract input layer |
148
+
149
+ ---
150
+
151
+ ## Routing Examples
152
+
153
+ ### Example 1: "I want to make a browser-based 2D platformer"
154
+ Start with `game-development/web-games` for framework selection
155
+ → Then `game-development/2d-games` for sprite/tilemap patterns
156
+ Reference `game-development/game-design` for level design
157
+
158
+ ### Example 2: "Mobile puzzle game for iOS and Android"
159
+ → Start with `game-development/mobile-games` for touch input and stores
160
+ Use `game-development/game-design` for puzzle balancing
161
+
162
+ ### Example 3: "Multiplayer VR shooter"
163
+ → `game-development/vr-ar` for comfort and immersion
164
+ → `game-development/3d-games` for rendering
165
+ → `game-development/multiplayer` for networking
166
+
167
+ ---
168
+
169
+ > **Remember:** Great games come from iteration, not perfection. Prototype fast, then polish.