bps-kit 1.0.2 → 1.0.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/bin/cli.js +4 -4
- package/package.json +1 -1
- package/templates/{.agents → agents-template}/rules/GEMINI.md +5 -5
- package/templates/skills_extra/nodejs-best-practices/SKILL.md +8 -2
- package/templates/skills_normal/api-patterns/SKILL.md +7 -2
- package/templates/skills_normal/app-builder/SKILL.md +8 -3
- package/templates/skills_normal/app-builder/tech-stack.md +2 -2
- package/templates/skills_normal/app-builder/templates/SKILL.md +7 -2
- package/templates/skills_normal/app-builder/templates/nextjs-fullstack/TEMPLATE.md +39 -79
- package/templates/skills_normal/app-builder/templates/nextjs-saas/TEMPLATE.md +53 -75
- package/templates/skills_normal/app-builder/templates/nextjs-static/TEMPLATE.md +56 -119
- package/templates/skills_normal/app-builder/templates/nuxt-app/TEMPLATE.md +61 -94
- package/templates/skills_normal/app-builder/templates/react-native-app/TEMPLATE.md +56 -82
- package/templates/skills_normal/behavioral-modes/SKILL.md +7 -2
- package/templates/skills_normal/brainstorming/SKILL.md +173 -104
- package/templates/skills_normal/clean-code/SKILL.md +90 -197
- package/templates/skills_normal/database-design/SKILL.md +7 -2
- package/templates/skills_normal/frontend-design/LICENSE.txt +177 -0
- package/templates/skills_normal/frontend-design/SKILL.md +172 -313
- package/templates/skills_normal/lint-and-validate/SKILL.md +7 -2
- package/templates/skills_normal/lint-and-validate/scripts/lint_runner.py +2 -14
- package/templates/skills_normal/performance-profiling/SKILL.md +7 -2
- package/templates/skills_normal/plan-writing/SKILL.md +4 -2
- package/templates/skills_normal/seo-fundamentals/SKILL.md +125 -79
- package/templates/skills_normal/systematic-debugging/CREATION-LOG.md +119 -0
- package/templates/skills_normal/systematic-debugging/SKILL.md +275 -85
- package/templates/skills_normal/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/templates/skills_normal/systematic-debugging/condition-based-waiting.md +115 -0
- package/templates/skills_normal/systematic-debugging/defense-in-depth.md +122 -0
- package/templates/skills_normal/systematic-debugging/find-polluter.sh +63 -0
- package/templates/skills_normal/systematic-debugging/root-cause-tracing.md +169 -0
- package/templates/skills_normal/systematic-debugging/test-academic.md +14 -0
- package/templates/skills_normal/systematic-debugging/test-pressure-1.md +58 -0
- package/templates/skills_normal/systematic-debugging/test-pressure-2.md +68 -0
- package/templates/skills_normal/systematic-debugging/test-pressure-3.md +69 -0
- package/templates/skills_normal/tailwind-patterns/SKILL.md +8 -2
- package/templates/skills_normal/testing-patterns/SKILL.md +212 -125
- package/templates/skills_normal/vulnerability-scanner/SKILL.md +7 -2
- package/templates/.agents/agents/backend-specialist.md +0 -263
- package/templates/.agents/agents/code-archaeologist.md +0 -106
- package/templates/.agents/agents/database-architect.md +0 -226
- package/templates/.agents/agents/debugger.md +0 -225
- package/templates/.agents/agents/devops-engineer.md +0 -242
- package/templates/.agents/agents/documentation-writer.md +0 -104
- package/templates/.agents/agents/explorer-agent.md +0 -73
- package/templates/.agents/agents/frontend-specialist.md +0 -593
- package/templates/.agents/agents/game-developer.md +0 -162
- package/templates/.agents/agents/mobile-developer.md +0 -377
- package/templates/.agents/agents/orchestrator.md +0 -416
- package/templates/.agents/agents/penetration-tester.md +0 -188
- package/templates/.agents/agents/performance-optimizer.md +0 -187
- package/templates/.agents/agents/product-manager.md +0 -112
- package/templates/.agents/agents/product-owner.md +0 -95
- package/templates/.agents/agents/project-planner.md +0 -406
- package/templates/.agents/agents/qa-automation-engineer.md +0 -103
- package/templates/.agents/agents/security-auditor.md +0 -170
- package/templates/.agents/agents/seo-specialist.md +0 -111
- package/templates/.agents/agents/test-engineer.md +0 -158
- package/templates/.agents/scripts/auto_preview.py +0 -148
- package/templates/.agents/scripts/checklist.py +0 -217
- package/templates/.agents/scripts/session_manager.py +0 -120
- package/templates/.agents/scripts/verify_all.py +0 -327
- package/templates/.agents/workflows/brainstorm.md +0 -113
- package/templates/.agents/workflows/create.md +0 -59
- package/templates/.agents/workflows/debug.md +0 -103
- package/templates/.agents/workflows/deploy.md +0 -176
- package/templates/.agents/workflows/enhance.md +0 -63
- package/templates/.agents/workflows/orchestrate.md +0 -237
- package/templates/.agents/workflows/plan.md +0 -89
- package/templates/.agents/workflows/preview.md +0 -81
- package/templates/.agents/workflows/status.md +0 -86
- package/templates/.agents/workflows/test.md +0 -144
- package/templates/.agents/workflows/ui-ux-pro-max.md +0 -296
- package/templates/skills_normal/brainstorming/dynamic-questioning.md +0 -350
- package/templates/skills_normal/frontend-design/animation-guide.md +0 -331
- package/templates/skills_normal/frontend-design/color-system.md +0 -311
- package/templates/skills_normal/frontend-design/decision-trees.md +0 -418
- package/templates/skills_normal/frontend-design/motion-graphics.md +0 -306
- package/templates/skills_normal/frontend-design/scripts/accessibility_checker.py +0 -183
- package/templates/skills_normal/frontend-design/scripts/ux_audit.py +0 -722
- package/templates/skills_normal/frontend-design/typography-system.md +0 -345
- package/templates/skills_normal/frontend-design/ux-psychology.md +0 -1116
- package/templates/skills_normal/frontend-design/visual-effects.md +0 -383
- package/templates/skills_normal/testing-patterns/scripts/test_runner.py +0 -219
- /package/templates/{.agents → agents-template}/workflows/setup-brain.md +0 -0
|
@@ -1,163 +1,232 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: brainstorming
|
|
3
|
-
description:
|
|
4
|
-
|
|
3
|
+
description: "Use before creative or constructive work (features, architecture, behavior). Transforms vague ideas into validated designs through disciplined reasoning and collaboration."
|
|
4
|
+
risk: unknown
|
|
5
|
+
source: community
|
|
6
|
+
date_added: "2026-02-27"
|
|
5
7
|
---
|
|
6
8
|
|
|
7
|
-
# Brainstorming
|
|
9
|
+
# Brainstorming Ideas Into Designs
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
## Purpose
|
|
12
|
+
|
|
13
|
+
Turn raw ideas into **clear, validated designs and specifications**
|
|
14
|
+
through structured dialogue **before any implementation begins**.
|
|
15
|
+
|
|
16
|
+
This skill exists to prevent:
|
|
17
|
+
- premature implementation
|
|
18
|
+
- hidden assumptions
|
|
19
|
+
- misaligned solutions
|
|
20
|
+
- fragile systems
|
|
21
|
+
|
|
22
|
+
You are **not allowed** to implement, code, or modify behavior while this skill is active.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Operating Mode
|
|
27
|
+
|
|
28
|
+
You are operating as a **design facilitator and senior reviewer**, not a builder.
|
|
29
|
+
|
|
30
|
+
- No creative implementation
|
|
31
|
+
- No speculative features
|
|
32
|
+
- No silent assumptions
|
|
33
|
+
- No skipping ahead
|
|
34
|
+
|
|
35
|
+
Your job is to **slow the process down just enough to get it right**.
|
|
10
36
|
|
|
11
37
|
---
|
|
12
38
|
|
|
13
|
-
##
|
|
39
|
+
## The Process
|
|
14
40
|
|
|
15
|
-
###
|
|
41
|
+
### 1️⃣ Understand the Current Context (Mandatory First Step)
|
|
16
42
|
|
|
17
|
-
|
|
18
|
-
|---------|--------|
|
|
19
|
-
| "Build/Create/Make [thing]" without details | 🛑 ASK 3 questions |
|
|
20
|
-
| Complex feature or architecture | 🛑 Clarify before implementing |
|
|
21
|
-
| Update/change request | 🛑 Confirm scope |
|
|
22
|
-
| Vague requirements | 🛑 Ask purpose, users, constraints |
|
|
43
|
+
Before asking any questions:
|
|
23
44
|
|
|
24
|
-
|
|
45
|
+
- Review the current project state (if available):
|
|
46
|
+
- files
|
|
47
|
+
- documentation
|
|
48
|
+
- plans
|
|
49
|
+
- prior decisions
|
|
50
|
+
- Identify what already exists vs. what is proposed
|
|
51
|
+
- Note constraints that appear implicit but unconfirmed
|
|
25
52
|
|
|
26
|
-
|
|
27
|
-
2. **ASK** - Minimum 3 questions:
|
|
28
|
-
- 🎯 Purpose: What problem are you solving?
|
|
29
|
-
- 👥 Users: Who will use this?
|
|
30
|
-
- 📦 Scope: Must-have vs nice-to-have?
|
|
31
|
-
3. **WAIT** - Get response before proceeding
|
|
53
|
+
**Do not design yet.**
|
|
32
54
|
|
|
33
55
|
---
|
|
34
56
|
|
|
35
|
-
|
|
57
|
+
### 2️⃣ Understanding the Idea (One Question at a Time)
|
|
36
58
|
|
|
37
|
-
|
|
59
|
+
Your goal here is **shared clarity**, not speed.
|
|
38
60
|
|
|
39
|
-
|
|
61
|
+
**Rules:**
|
|
40
62
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
| **Minimum Viable Questions** | Each question must eliminate implementation paths |
|
|
46
|
-
| **Generate Data, Not Assumptions** | Don't guess—ask with trade-offs |
|
|
63
|
+
- Ask **one question per message**
|
|
64
|
+
- Prefer **multiple-choice questions** when possible
|
|
65
|
+
- Use open-ended questions only when necessary
|
|
66
|
+
- If a topic needs depth, split it into multiple questions
|
|
47
67
|
|
|
48
|
-
|
|
68
|
+
Focus on understanding:
|
|
49
69
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
```
|
|
70
|
+
- purpose
|
|
71
|
+
- target users
|
|
72
|
+
- constraints
|
|
73
|
+
- success criteria
|
|
74
|
+
- explicit non-goals
|
|
56
75
|
|
|
57
|
-
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
### 3️⃣ Non-Functional Requirements (Mandatory)
|
|
79
|
+
|
|
80
|
+
You MUST explicitly clarify or propose assumptions for:
|
|
81
|
+
|
|
82
|
+
- Performance expectations
|
|
83
|
+
- Scale (users, data, traffic)
|
|
84
|
+
- Security or privacy constraints
|
|
85
|
+
- Reliability / availability needs
|
|
86
|
+
- Maintenance and ownership expectations
|
|
87
|
+
|
|
88
|
+
If the user is unsure:
|
|
89
|
+
|
|
90
|
+
- Propose reasonable defaults
|
|
91
|
+
- Clearly mark them as **assumptions**
|
|
92
|
+
|
|
93
|
+
---
|
|
58
94
|
|
|
59
|
-
|
|
60
|
-
### [PRIORITY] **[DECISION POINT]**
|
|
95
|
+
### 4️⃣ Understanding Lock (Hard Gate)
|
|
61
96
|
|
|
62
|
-
**
|
|
97
|
+
Before proposing **any design**, you MUST pause and do the following:
|
|
63
98
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
-
|
|
99
|
+
#### Understanding Summary
|
|
100
|
+
Provide a concise summary (5–7 bullets) covering:
|
|
101
|
+
- What is being built
|
|
102
|
+
- Why it exists
|
|
103
|
+
- Who it is for
|
|
104
|
+
- Key constraints
|
|
105
|
+
- Explicit non-goals
|
|
67
106
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|--------|------|------|----------|
|
|
71
|
-
| A | [+] | [-] | [Use case] |
|
|
107
|
+
#### Assumptions
|
|
108
|
+
List all assumptions explicitly.
|
|
72
109
|
|
|
73
|
-
|
|
74
|
-
|
|
110
|
+
#### Open Questions
|
|
111
|
+
List unresolved questions, if any.
|
|
75
112
|
|
|
76
|
-
|
|
113
|
+
Then ask:
|
|
114
|
+
|
|
115
|
+
> “Does this accurately reflect your intent?
|
|
116
|
+
> Please confirm or correct anything before we move to design.”
|
|
117
|
+
|
|
118
|
+
**Do NOT proceed until explicit confirmation is given.**
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
### 5️⃣ Explore Design Approaches
|
|
123
|
+
|
|
124
|
+
Once understanding is confirmed:
|
|
125
|
+
|
|
126
|
+
- Propose **2–3 viable approaches**
|
|
127
|
+
- Lead with your **recommended option**
|
|
128
|
+
- Explain trade-offs clearly:
|
|
129
|
+
- complexity
|
|
130
|
+
- extensibility
|
|
131
|
+
- risk
|
|
132
|
+
- maintenance
|
|
133
|
+
- Avoid premature optimization (**YAGNI ruthlessly**)
|
|
134
|
+
|
|
135
|
+
This is still **not** final design.
|
|
77
136
|
|
|
78
137
|
---
|
|
79
138
|
|
|
80
|
-
|
|
139
|
+
### 6️⃣ Present the Design (Incrementally)
|
|
81
140
|
|
|
82
|
-
|
|
141
|
+
When presenting the design:
|
|
83
142
|
|
|
84
|
-
|
|
143
|
+
- Break it into sections of **200–300 words max**
|
|
144
|
+
- After each section, ask:
|
|
85
145
|
|
|
86
|
-
|
|
87
|
-
|-------|--------|--------------|----------|
|
|
88
|
-
| [Agent Name] | ✅🔄⏳❌⚠️ | [Task description] | [% or count] |
|
|
146
|
+
> “Does this look right so far?”
|
|
89
147
|
|
|
90
|
-
|
|
148
|
+
Cover, as relevant:
|
|
91
149
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
| ⚠️ | Warning | Potential issue, not blocking |
|
|
150
|
+
- Architecture
|
|
151
|
+
- Components
|
|
152
|
+
- Data flow
|
|
153
|
+
- Error handling
|
|
154
|
+
- Edge cases
|
|
155
|
+
- Testing strategy
|
|
99
156
|
|
|
100
157
|
---
|
|
101
158
|
|
|
102
|
-
|
|
159
|
+
### 7️⃣ Decision Log (Mandatory)
|
|
103
160
|
|
|
104
|
-
**
|
|
161
|
+
Maintain a running **Decision Log** throughout the design discussion.
|
|
105
162
|
|
|
106
|
-
|
|
163
|
+
For each decision:
|
|
164
|
+
- What was decided
|
|
165
|
+
- Alternatives considered
|
|
166
|
+
- Why this option was chosen
|
|
107
167
|
|
|
108
|
-
|
|
109
|
-
1. Acknowledge the error
|
|
110
|
-
2. Explain what happened (user-friendly)
|
|
111
|
-
3. Offer specific solutions with trade-offs
|
|
112
|
-
4. Ask user to choose or provide alternative
|
|
113
|
-
```
|
|
168
|
+
This log should be preserved for documentation.
|
|
114
169
|
|
|
115
|
-
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## After the Design
|
|
173
|
+
|
|
174
|
+
### 📄 Documentation
|
|
175
|
+
|
|
176
|
+
Once the design is validated:
|
|
116
177
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
178
|
+
- Write the final design to a durable, shared format (e.g. Markdown)
|
|
179
|
+
- Include:
|
|
180
|
+
- Understanding summary
|
|
181
|
+
- Assumptions
|
|
182
|
+
- Decision log
|
|
183
|
+
- Final design
|
|
184
|
+
|
|
185
|
+
Persist the document according to the project’s standard workflow.
|
|
123
186
|
|
|
124
187
|
---
|
|
125
188
|
|
|
126
|
-
|
|
189
|
+
### 🛠️ Implementation Handoff (Optional)
|
|
127
190
|
|
|
128
|
-
|
|
191
|
+
Only after documentation is complete, ask:
|
|
129
192
|
|
|
130
|
-
|
|
193
|
+
> “Ready to set up for implementation?”
|
|
131
194
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
4. Next steps suggestion (proactive)
|
|
137
|
-
```
|
|
195
|
+
If yes:
|
|
196
|
+
- Create an explicit implementation plan
|
|
197
|
+
- Isolate work if the workflow supports it
|
|
198
|
+
- Proceed incrementally
|
|
138
199
|
|
|
139
200
|
---
|
|
140
201
|
|
|
141
|
-
##
|
|
202
|
+
## Exit Criteria (Hard Stop Conditions)
|
|
203
|
+
|
|
204
|
+
You may exit brainstorming mode **only when all of the following are true**:
|
|
142
205
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
206
|
+
- Understanding Lock has been confirmed
|
|
207
|
+
- At least one design approach is explicitly accepted
|
|
208
|
+
- Major assumptions are documented
|
|
209
|
+
- Key risks are acknowledged
|
|
210
|
+
- Decision Log is complete
|
|
211
|
+
|
|
212
|
+
If any criterion is unmet:
|
|
213
|
+
- Continue refinement
|
|
214
|
+
- **Do NOT proceed to implementation**
|
|
150
215
|
|
|
151
216
|
---
|
|
152
217
|
|
|
153
|
-
##
|
|
218
|
+
## Key Principles (Non-Negotiable)
|
|
154
219
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
220
|
+
- One question at a time
|
|
221
|
+
- Assumptions must be explicit
|
|
222
|
+
- Explore alternatives
|
|
223
|
+
- Validate incrementally
|
|
224
|
+
- Prefer clarity over cleverness
|
|
225
|
+
- Be willing to go back and clarify
|
|
226
|
+
- **YAGNI ruthlessly**
|
|
162
227
|
|
|
163
228
|
---
|
|
229
|
+
If the design is high-impact, high-risk, or requires elevated confidence, you MUST hand off the finalized design and Decision Log to the `multi-agent-brainstorming` skill before implementation.
|
|
230
|
+
|
|
231
|
+
## When to Use
|
|
232
|
+
This skill is applicable to execute the workflow or actions described in the overview.
|
|
@@ -1,201 +1,94 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: clean-code
|
|
3
|
-
description:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
description: "Applies principles from Robert C. Martin's 'Clean Code'. Use this skill when writing, reviewing, or refactoring code to ensure high quality, readability, and maintainability. Covers naming, functio..."
|
|
4
|
+
risk: safe
|
|
5
|
+
source: "ClawForge (https://github.com/jackjin1997/ClawForge)"
|
|
6
|
+
date_added: "2026-02-27"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
# Clean Code
|
|
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
|
-
| **What does this file import?** | Interface changes |
|
|
96
|
-
| **What tests cover this?** | Tests might fail |
|
|
97
|
-
| **Is this a shared component?** | Multiple places affected |
|
|
98
|
-
|
|
99
|
-
**Quick Check:**
|
|
100
|
-
```
|
|
101
|
-
File to edit: UserService.ts
|
|
102
|
-
└── Who imports this? → UserController.ts, AuthController.ts
|
|
103
|
-
└── Do they need changes too? → Check function signatures
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
> 🔴 **Rule:** Edit the file + all dependent files in the SAME task.
|
|
107
|
-
> 🔴 **Never leave broken imports or missing updates.**
|
|
108
|
-
|
|
109
|
-
---
|
|
110
|
-
|
|
111
|
-
## Summary
|
|
112
|
-
|
|
113
|
-
| Do | Don't |
|
|
114
|
-
|----|-------|
|
|
115
|
-
| Write code directly | Write tutorials |
|
|
116
|
-
| Let code self-document | Add obvious comments |
|
|
117
|
-
| Fix bugs immediately | Explain the fix first |
|
|
118
|
-
| Inline small things | Create unnecessary files |
|
|
119
|
-
| Name things clearly | Use abbreviations |
|
|
120
|
-
| Keep functions small | Write 100+ line functions |
|
|
121
|
-
|
|
122
|
-
> **Remember: The user wants working code, not a programming lesson.**
|
|
123
|
-
|
|
124
|
-
---
|
|
125
|
-
|
|
126
|
-
## 🔴 Self-Check Before Completing (MANDATORY)
|
|
127
|
-
|
|
128
|
-
**Before saying "task complete", verify:**
|
|
129
|
-
|
|
130
|
-
| Check | Question |
|
|
131
|
-
|-------|----------|
|
|
132
|
-
| ✅ **Goal met?** | Did I do exactly what user asked? |
|
|
133
|
-
| ✅ **Files edited?** | Did I modify all necessary files? |
|
|
134
|
-
| ✅ **Code works?** | Did I test/verify the change? |
|
|
135
|
-
| ✅ **No errors?** | Lint and TypeScript pass? |
|
|
136
|
-
| ✅ **Nothing forgotten?** | Any edge cases missed? |
|
|
137
|
-
|
|
138
|
-
> 🔴 **Rule:** If ANY check fails, fix it before completing.
|
|
139
|
-
|
|
140
|
-
---
|
|
141
|
-
|
|
142
|
-
## Verification Scripts (MANDATORY)
|
|
143
|
-
|
|
144
|
-
> 🔴 **CRITICAL:** Each agent runs ONLY their own skill's scripts after completing work.
|
|
145
|
-
|
|
146
|
-
### Agent → Script Mapping
|
|
147
|
-
|
|
148
|
-
| Agent | Script | Command |
|
|
149
|
-
|-------|--------|---------|
|
|
150
|
-
| **frontend-specialist** | UX Audit | `python .agent/skills/frontend-design/scripts/ux_audit.py .` |
|
|
151
|
-
| **frontend-specialist** | A11y Check | `python .agent/skills/frontend-design/scripts/accessibility_checker.py .` |
|
|
152
|
-
| **backend-specialist** | API Validator | `python .agent/skills/api-patterns/scripts/api_validator.py .` |
|
|
153
|
-
| **mobile-developer** | Mobile Audit | `python .agent/skills/mobile-design/scripts/mobile_audit.py .` |
|
|
154
|
-
| **database-architect** | Schema Validate | `python .agent/skills/database-design/scripts/schema_validator.py .` |
|
|
155
|
-
| **security-auditor** | Security Scan | `python .agent/skills/vulnerability-scanner/scripts/security_scan.py .` |
|
|
156
|
-
| **seo-specialist** | SEO Check | `python .agent/skills/seo-fundamentals/scripts/seo_checker.py .` |
|
|
157
|
-
| **seo-specialist** | GEO Check | `python .agent/skills/geo-fundamentals/scripts/geo_checker.py .` |
|
|
158
|
-
| **performance-optimizer** | Lighthouse | `python .agent/skills/performance-profiling/scripts/lighthouse_audit.py <url>` |
|
|
159
|
-
| **test-engineer** | Test Runner | `python .agent/skills/testing-patterns/scripts/test_runner.py .` |
|
|
160
|
-
| **test-engineer** | Playwright | `python .agent/skills/webapp-testing/scripts/playwright_runner.py <url>` |
|
|
161
|
-
| **Any agent** | Lint Check | `python .agent/skills/lint-and-validate/scripts/lint_runner.py .` |
|
|
162
|
-
| **Any agent** | Type Coverage | `python .agent/skills/lint-and-validate/scripts/type_coverage.py .` |
|
|
163
|
-
| **Any agent** | i18n Check | `python .agent/skills/i18n-localization/scripts/i18n_checker.py .` |
|
|
164
|
-
|
|
165
|
-
> ❌ **WRONG:** `test-engineer` running `ux_audit.py`
|
|
166
|
-
> ✅ **CORRECT:** `frontend-specialist` running `ux_audit.py`
|
|
167
|
-
|
|
168
|
-
---
|
|
169
|
-
|
|
170
|
-
### 🔴 Script Output Handling (READ → SUMMARIZE → ASK)
|
|
171
|
-
|
|
172
|
-
**When running a validation script, you MUST:**
|
|
173
|
-
|
|
174
|
-
1. **Run the script** and capture ALL output
|
|
175
|
-
2. **Parse the output** - identify errors, warnings, and passes
|
|
176
|
-
3. **Summarize to user** in this format:
|
|
177
|
-
|
|
178
|
-
```markdown
|
|
179
|
-
## Script Results: [script_name.py]
|
|
180
|
-
|
|
181
|
-
### ❌ Errors Found (X items)
|
|
182
|
-
- [File:Line] Error description 1
|
|
183
|
-
- [File:Line] Error description 2
|
|
184
|
-
|
|
185
|
-
### ⚠️ Warnings (Y items)
|
|
186
|
-
- [File:Line] Warning description
|
|
187
|
-
|
|
188
|
-
### ✅ Passed (Z items)
|
|
189
|
-
- Check 1 passed
|
|
190
|
-
- Check 2 passed
|
|
191
|
-
|
|
192
|
-
**Should I fix the X errors?**
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
4. **Wait for user confirmation** before fixing
|
|
196
|
-
5. **After fixing** → Re-run script to confirm
|
|
197
|
-
|
|
198
|
-
> 🔴 **VIOLATION:** Running script and ignoring output = FAILED task.
|
|
199
|
-
> 🔴 **VIOLATION:** Auto-fixing without asking = Not allowed.
|
|
200
|
-
> 🔴 **Rule:** Always READ output → SUMMARIZE → ASK → then fix.
|
|
201
|
-
|
|
9
|
+
# Clean Code Skill
|
|
10
|
+
|
|
11
|
+
This skill embodies the principles of "Clean Code" by Robert C. Martin (Uncle Bob). Use it to transform "code that works" into "code that is clean."
|
|
12
|
+
|
|
13
|
+
## 🧠 Core Philosophy
|
|
14
|
+
> "Code is clean if it can be read, and enhanced by a developer other than its original author." — Grady Booch
|
|
15
|
+
|
|
16
|
+
## When to Use
|
|
17
|
+
Use this skill when:
|
|
18
|
+
- **Writing new code**: To ensure high quality from the start.
|
|
19
|
+
- **Reviewing Pull Requests**: To provide constructive, principle-based feedback.
|
|
20
|
+
- **Refactoring legacy code**: To identify and remove code smells.
|
|
21
|
+
- **Improving team standards**: To align on industry-standard best practices.
|
|
22
|
+
|
|
23
|
+
## 1. Meaningful Names
|
|
24
|
+
- **Use Intention-Revealing Names**: `elapsedTimeInDays` instead of `d`.
|
|
25
|
+
- **Avoid Disinformation**: Don't use `accountList` if it's actually a `Map`.
|
|
26
|
+
- **Make Meaningful Distinctions**: Avoid `ProductData` vs `ProductInfo`.
|
|
27
|
+
- **Use Pronounceable/Searchable Names**: Avoid `genymdhms`.
|
|
28
|
+
- **Class Names**: Use nouns (`Customer`, `WikiPage`). Avoid `Manager`, `Data`.
|
|
29
|
+
- **Method Names**: Use verbs (`postPayment`, `deletePage`).
|
|
30
|
+
|
|
31
|
+
## 2. Functions
|
|
32
|
+
- **Small!**: Functions should be shorter than you think.
|
|
33
|
+
- **Do One Thing**: A function should do only one thing, and do it well.
|
|
34
|
+
- **One Level of Abstraction**: Don't mix high-level business logic with low-level details (like regex).
|
|
35
|
+
- **Descriptive Names**: `isPasswordValid` is better than `check`.
|
|
36
|
+
- **Arguments**: 0 is ideal, 1-2 is okay, 3+ requires a very strong justification.
|
|
37
|
+
- **No Side Effects**: Functions shouldn't secretly change global state.
|
|
38
|
+
|
|
39
|
+
## 3. Comments
|
|
40
|
+
- **Don't Comment Bad Code—Rewrite It**: Most comments are a sign of failure to express ourselves in code.
|
|
41
|
+
- **Explain Yourself in Code**:
|
|
42
|
+
```python
|
|
43
|
+
# Check if employee is eligible for full benefits
|
|
44
|
+
if employee.flags & HOURLY and employee.age > 65:
|
|
45
|
+
```
|
|
46
|
+
vs
|
|
47
|
+
```python
|
|
48
|
+
if employee.isEligibleForFullBenefits():
|
|
49
|
+
```
|
|
50
|
+
- **Good Comments**: Legal, Informative (regex intent), Clarification (external libraries), TODOs.
|
|
51
|
+
- **Bad Comments**: Mumbling, Redundant, Misleading, Mandated, Noise, Position Markers.
|
|
52
|
+
|
|
53
|
+
## 4. Formatting
|
|
54
|
+
- **The Newspaper Metaphor**: High-level concepts at the top, details at the bottom.
|
|
55
|
+
- **Vertical Density**: Related lines should be close to each other.
|
|
56
|
+
- **Distance**: Variables should be declared near their usage.
|
|
57
|
+
- **Indentation**: Essential for structural readability.
|
|
58
|
+
|
|
59
|
+
## 5. Objects and Data Structures
|
|
60
|
+
- **Data Abstraction**: Hide the implementation behind interfaces.
|
|
61
|
+
- **The Law of Demeter**: A module should not know about the innards of the objects it manipulates. Avoid `a.getB().getC().doSomething()`.
|
|
62
|
+
- **Data Transfer Objects (DTO)**: Classes with public variables and no functions.
|
|
63
|
+
|
|
64
|
+
## 6. Error Handling
|
|
65
|
+
- **Use Exceptions instead of Return Codes**: Keeps logic clean.
|
|
66
|
+
- **Write Try-Catch-Finally First**: Defines the scope of the operation.
|
|
67
|
+
- **Don't Return Null**: It forces the caller to check for null every time.
|
|
68
|
+
- **Don't Pass Null**: Leads to `NullPointerException`.
|
|
69
|
+
|
|
70
|
+
## 7. Unit Tests
|
|
71
|
+
- **The Three Laws of TDD**:
|
|
72
|
+
1. Don't write production code until you have a failing unit test.
|
|
73
|
+
2. Don't write more of a unit test than is sufficient to fail.
|
|
74
|
+
3. Don't write more production code than is sufficient to pass the failing test.
|
|
75
|
+
- **F.I.R.S.T. Principles**: Fast, Independent, Repeatable, Self-Validating, Timely.
|
|
76
|
+
|
|
77
|
+
## 8. Classes
|
|
78
|
+
- **Small!**: Classes should have a single responsibility (SRP).
|
|
79
|
+
- **The Stepdown Rule**: We want the code to read like a top-down narrative.
|
|
80
|
+
|
|
81
|
+
## 9. Smells and Heuristics
|
|
82
|
+
- **Rigidity**: Hard to change.
|
|
83
|
+
- **Fragility**: Breaks in many places.
|
|
84
|
+
- **Immobility**: Hard to reuse.
|
|
85
|
+
- **Viscosity**: Hard to do the right thing.
|
|
86
|
+
- **Needless Complexity/Repetition**.
|
|
87
|
+
|
|
88
|
+
## 🛠️ Implementation Checklist
|
|
89
|
+
- [ ] Is this function smaller than 20 lines?
|
|
90
|
+
- [ ] Does this function do exactly one thing?
|
|
91
|
+
- [ ] Are all names searchable and intention-revealing?
|
|
92
|
+
- [ ] Have I avoided comments by making the code clearer?
|
|
93
|
+
- [ ] Am I passing too many arguments?
|
|
94
|
+
- [ ] Is there a failing test for this change?
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: database-design
|
|
3
|
-
description: Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases.
|
|
4
|
-
|
|
3
|
+
description: "Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases."
|
|
4
|
+
risk: unknown
|
|
5
|
+
source: community
|
|
6
|
+
date_added: "2026-02-27"
|
|
5
7
|
---
|
|
6
8
|
|
|
7
9
|
# Database Design
|
|
@@ -50,3 +52,6 @@ Before designing schema:
|
|
|
50
52
|
❌ Use SELECT * in production
|
|
51
53
|
❌ Store JSON when structured data is better
|
|
52
54
|
❌ Ignore N+1 queries
|
|
55
|
+
|
|
56
|
+
## When to Use
|
|
57
|
+
This skill is applicable to execute the workflow or actions described in the overview.
|