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.
- package/package.json +1 -1
- package/src/commands/add.js +23 -16
- package/src/commands/doctor.js +15 -10
- package/src/commands/init.js +410 -64
- 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,167 +1,169 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: game-development
|
|
3
|
-
description: Game development orchestrator. Routes to platform-specific skills based
|
|
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
|
-
|
|
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
|
-
|
|
82
|
-
|
|
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
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
|
120
|
-
|
|
121
|
-
| **
|
|
122
|
-
| **
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
|
131
|
-
|
|
132
|
-
| **
|
|
133
|
-
| **
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
|
142
|
-
|
|
143
|
-
|
|
|
144
|
-
|
|
|
145
|
-
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
→
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
→ `game-development/
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
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: Idle→Walk→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.
|