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.
Files changed (85) hide show
  1. package/bin/cli.js +4 -4
  2. package/package.json +1 -1
  3. package/templates/{.agents → agents-template}/rules/GEMINI.md +5 -5
  4. package/templates/skills_extra/nodejs-best-practices/SKILL.md +8 -2
  5. package/templates/skills_normal/api-patterns/SKILL.md +7 -2
  6. package/templates/skills_normal/app-builder/SKILL.md +8 -3
  7. package/templates/skills_normal/app-builder/tech-stack.md +2 -2
  8. package/templates/skills_normal/app-builder/templates/SKILL.md +7 -2
  9. package/templates/skills_normal/app-builder/templates/nextjs-fullstack/TEMPLATE.md +39 -79
  10. package/templates/skills_normal/app-builder/templates/nextjs-saas/TEMPLATE.md +53 -75
  11. package/templates/skills_normal/app-builder/templates/nextjs-static/TEMPLATE.md +56 -119
  12. package/templates/skills_normal/app-builder/templates/nuxt-app/TEMPLATE.md +61 -94
  13. package/templates/skills_normal/app-builder/templates/react-native-app/TEMPLATE.md +56 -82
  14. package/templates/skills_normal/behavioral-modes/SKILL.md +7 -2
  15. package/templates/skills_normal/brainstorming/SKILL.md +173 -104
  16. package/templates/skills_normal/clean-code/SKILL.md +90 -197
  17. package/templates/skills_normal/database-design/SKILL.md +7 -2
  18. package/templates/skills_normal/frontend-design/LICENSE.txt +177 -0
  19. package/templates/skills_normal/frontend-design/SKILL.md +172 -313
  20. package/templates/skills_normal/lint-and-validate/SKILL.md +7 -2
  21. package/templates/skills_normal/lint-and-validate/scripts/lint_runner.py +2 -14
  22. package/templates/skills_normal/performance-profiling/SKILL.md +7 -2
  23. package/templates/skills_normal/plan-writing/SKILL.md +4 -2
  24. package/templates/skills_normal/seo-fundamentals/SKILL.md +125 -79
  25. package/templates/skills_normal/systematic-debugging/CREATION-LOG.md +119 -0
  26. package/templates/skills_normal/systematic-debugging/SKILL.md +275 -85
  27. package/templates/skills_normal/systematic-debugging/condition-based-waiting-example.ts +158 -0
  28. package/templates/skills_normal/systematic-debugging/condition-based-waiting.md +115 -0
  29. package/templates/skills_normal/systematic-debugging/defense-in-depth.md +122 -0
  30. package/templates/skills_normal/systematic-debugging/find-polluter.sh +63 -0
  31. package/templates/skills_normal/systematic-debugging/root-cause-tracing.md +169 -0
  32. package/templates/skills_normal/systematic-debugging/test-academic.md +14 -0
  33. package/templates/skills_normal/systematic-debugging/test-pressure-1.md +58 -0
  34. package/templates/skills_normal/systematic-debugging/test-pressure-2.md +68 -0
  35. package/templates/skills_normal/systematic-debugging/test-pressure-3.md +69 -0
  36. package/templates/skills_normal/tailwind-patterns/SKILL.md +8 -2
  37. package/templates/skills_normal/testing-patterns/SKILL.md +212 -125
  38. package/templates/skills_normal/vulnerability-scanner/SKILL.md +7 -2
  39. package/templates/.agents/agents/backend-specialist.md +0 -263
  40. package/templates/.agents/agents/code-archaeologist.md +0 -106
  41. package/templates/.agents/agents/database-architect.md +0 -226
  42. package/templates/.agents/agents/debugger.md +0 -225
  43. package/templates/.agents/agents/devops-engineer.md +0 -242
  44. package/templates/.agents/agents/documentation-writer.md +0 -104
  45. package/templates/.agents/agents/explorer-agent.md +0 -73
  46. package/templates/.agents/agents/frontend-specialist.md +0 -593
  47. package/templates/.agents/agents/game-developer.md +0 -162
  48. package/templates/.agents/agents/mobile-developer.md +0 -377
  49. package/templates/.agents/agents/orchestrator.md +0 -416
  50. package/templates/.agents/agents/penetration-tester.md +0 -188
  51. package/templates/.agents/agents/performance-optimizer.md +0 -187
  52. package/templates/.agents/agents/product-manager.md +0 -112
  53. package/templates/.agents/agents/product-owner.md +0 -95
  54. package/templates/.agents/agents/project-planner.md +0 -406
  55. package/templates/.agents/agents/qa-automation-engineer.md +0 -103
  56. package/templates/.agents/agents/security-auditor.md +0 -170
  57. package/templates/.agents/agents/seo-specialist.md +0 -111
  58. package/templates/.agents/agents/test-engineer.md +0 -158
  59. package/templates/.agents/scripts/auto_preview.py +0 -148
  60. package/templates/.agents/scripts/checklist.py +0 -217
  61. package/templates/.agents/scripts/session_manager.py +0 -120
  62. package/templates/.agents/scripts/verify_all.py +0 -327
  63. package/templates/.agents/workflows/brainstorm.md +0 -113
  64. package/templates/.agents/workflows/create.md +0 -59
  65. package/templates/.agents/workflows/debug.md +0 -103
  66. package/templates/.agents/workflows/deploy.md +0 -176
  67. package/templates/.agents/workflows/enhance.md +0 -63
  68. package/templates/.agents/workflows/orchestrate.md +0 -237
  69. package/templates/.agents/workflows/plan.md +0 -89
  70. package/templates/.agents/workflows/preview.md +0 -81
  71. package/templates/.agents/workflows/status.md +0 -86
  72. package/templates/.agents/workflows/test.md +0 -144
  73. package/templates/.agents/workflows/ui-ux-pro-max.md +0 -296
  74. package/templates/skills_normal/brainstorming/dynamic-questioning.md +0 -350
  75. package/templates/skills_normal/frontend-design/animation-guide.md +0 -331
  76. package/templates/skills_normal/frontend-design/color-system.md +0 -311
  77. package/templates/skills_normal/frontend-design/decision-trees.md +0 -418
  78. package/templates/skills_normal/frontend-design/motion-graphics.md +0 -306
  79. package/templates/skills_normal/frontend-design/scripts/accessibility_checker.py +0 -183
  80. package/templates/skills_normal/frontend-design/scripts/ux_audit.py +0 -722
  81. package/templates/skills_normal/frontend-design/typography-system.md +0 -345
  82. package/templates/skills_normal/frontend-design/ux-psychology.md +0 -1116
  83. package/templates/skills_normal/frontend-design/visual-effects.md +0 -383
  84. package/templates/skills_normal/testing-patterns/scripts/test_runner.py +0 -219
  85. /package/templates/{.agents → agents-template}/workflows/setup-brain.md +0 -0
@@ -1,163 +1,232 @@
1
1
  ---
2
2
  name: brainstorming
3
- description: Socratic questioning protocol + user communication. MANDATORY for complex requests, new features, or unclear requirements. Includes progress reporting and error handling.
4
- allowed-tools: Read, Glob, Grep
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 & Communication Protocol
9
+ # Brainstorming Ideas Into Designs
8
10
 
9
- > **MANDATORY:** Use for complex/vague requests, new features, updates.
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
- ## 🛑 SOCRATIC GATE (ENFORCEMENT)
39
+ ## The Process
14
40
 
15
- ### When to Trigger
41
+ ### 1️⃣ Understand the Current Context (Mandatory First Step)
16
42
 
17
- | Pattern | Action |
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
- ### 🚫 MANDATORY: 3 Questions Before Implementation
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
- 1. **STOP** - Do NOT start coding
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
- ## 🧠 Dynamic Question Generation
57
+ ### 2️⃣ Understanding the Idea (One Question at a Time)
36
58
 
37
- **⛔ NEVER use static templates.** Read `dynamic-questioning.md` for principles.
59
+ Your goal here is **shared clarity**, not speed.
38
60
 
39
- ### Core Principles
61
+ **Rules:**
40
62
 
41
- | Principle | Meaning |
42
- |-----------|---------|
43
- | **Questions Reveal Consequences** | Each question connects to an architectural decision |
44
- | **Context Before Content** | Understand greenfield/feature/refactor/debug context first |
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
- ### Question Generation Process
68
+ Focus on understanding:
49
69
 
50
- ```
51
- 1. Parse request → Extract domain, features, scale indicators
52
- 2. Identify decision points → Blocking vs. deferable
53
- 3. Generate questions → Priority: P0 (blocking) > P1 (high-leverage) > P2 (nice-to-have)
54
- 4. Format with trade-offs → What, Why, Options, Default
55
- ```
70
+ - purpose
71
+ - target users
72
+ - constraints
73
+ - success criteria
74
+ - explicit non-goals
56
75
 
57
- ### Question Format (MANDATORY)
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
- ```markdown
60
- ### [PRIORITY] **[DECISION POINT]**
95
+ ### 4️⃣ Understanding Lock (Hard Gate)
61
96
 
62
- **Question:** [Clear question]
97
+ Before proposing **any design**, you MUST pause and do the following:
63
98
 
64
- **Why This Matters:**
65
- - [Architectural consequence]
66
- - [Affects: cost/complexity/timeline/scale]
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
- **Options:**
69
- | Option | Pros | Cons | Best For |
70
- |--------|------|------|----------|
71
- | A | [+] | [-] | [Use case] |
107
+ #### Assumptions
108
+ List all assumptions explicitly.
72
109
 
73
- **If Not Specified:** [Default + rationale]
74
- ```
110
+ #### Open Questions
111
+ List unresolved questions, if any.
75
112
 
76
- **For detailed domain-specific question banks and algorithms**, see: `dynamic-questioning.md`
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
- ## Progress Reporting (PRINCIPLE-BASED)
139
+ ### 6️⃣ Present the Design (Incrementally)
81
140
 
82
- **PRINCIPLE:** Transparency builds trust. Status must be visible and actionable.
141
+ When presenting the design:
83
142
 
84
- ### Status Board Format
143
+ - Break it into sections of **200–300 words max**
144
+ - After each section, ask:
85
145
 
86
- | Agent | Status | Current Task | Progress |
87
- |-------|--------|--------------|----------|
88
- | [Agent Name] | ✅🔄⏳❌⚠️ | [Task description] | [% or count] |
146
+ > “Does this look right so far?”
89
147
 
90
- ### Status Icons
148
+ Cover, as relevant:
91
149
 
92
- | Icon | Meaning | Usage |
93
- |------|---------|-------|
94
- | | Completed | Task finished successfully |
95
- | 🔄 | Running | Currently executing |
96
- | | Waiting | Blocked, waiting for dependency |
97
- | | Error | Failed, needs attention |
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
- ## Error Handling (PRINCIPLE-BASED)
159
+ ### 7️⃣ Decision Log (Mandatory)
103
160
 
104
- **PRINCIPLE:** Errors are opportunities for clear communication.
161
+ Maintain a running **Decision Log** throughout the design discussion.
105
162
 
106
- ### Error Response Pattern
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
- ### Error Categories
170
+ ---
171
+
172
+ ## After the Design
173
+
174
+ ### 📄 Documentation
175
+
176
+ Once the design is validated:
116
177
 
117
- | Category | Response Strategy |
118
- |----------|-------------------|
119
- | **Port Conflict** | Offer alternative port or close existing |
120
- | **Dependency Missing** | Auto-install or ask permission |
121
- | **Build Failure** | Show specific error + suggested fix |
122
- | **Unclear Error** | Ask for specifics: screenshot, console output |
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
- ## Completion Message (PRINCIPLE-BASED)
189
+ ### 🛠️ Implementation Handoff (Optional)
127
190
 
128
- **PRINCIPLE:** Celebrate success, guide next steps.
191
+ Only after documentation is complete, ask:
129
192
 
130
- ### Completion Structure
193
+ > “Ready to set up for implementation?”
131
194
 
132
- ```
133
- 1. Success confirmation (celebrate briefly)
134
- 2. Summary of what was done (concrete)
135
- 3. How to verify/test (actionable)
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
- ## Communication Principles
202
+ ## Exit Criteria (Hard Stop Conditions)
203
+
204
+ You may exit brainstorming mode **only when all of the following are true**:
142
205
 
143
- | Principle | Implementation |
144
- |-----------|----------------|
145
- | **Concise** | No unnecessary details, get to point |
146
- | **Visual** | Use emojis (✅🔄⏳❌) for quick scanning |
147
- | **Specific** | "~2 minutes" not "wait a bit" |
148
- | **Alternatives** | Offer multiple paths when stuck |
149
- | **Proactive** | Suggest next step after completion |
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
- ## Anti-Patterns (AVOID)
218
+ ## Key Principles (Non-Negotiable)
154
219
 
155
- | Anti-Pattern | Why |
156
- |--------------|-----|
157
- | Jumping to solutions before understanding | Wastes time on wrong problem |
158
- | Assuming requirements without asking | Creates wrong output |
159
- | Over-engineering first version | Delays value delivery |
160
- | Ignoring constraints | Creates unusable solutions |
161
- | "I think" phrases | Uncertainty → Ask instead |
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: Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments
4
- allowed-tools: Read, Write, Edit
5
- version: 2.0
6
- priority: CRITICAL
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 - Pragmatic AI Coding Standards
10
-
11
- > **CRITICAL SKILL** - Be **concise, direct, and solution-focused**.
12
-
13
- ---
14
-
15
- ## Core Principles
16
-
17
- | Principle | Rule |
18
- |-----------|------|
19
- | **SRP** | Single Responsibility - each function/class does ONE thing |
20
- | **DRY** | Don't Repeat Yourself - extract duplicates, reuse |
21
- | **KISS** | Keep It Simple - simplest solution that works |
22
- | **YAGNI** | You Aren't Gonna Need It - don't build unused features |
23
- | **Boy Scout** | Leave code cleaner than you found it |
24
-
25
- ---
26
-
27
- ## Naming Rules
28
-
29
- | Element | Convention |
30
- |---------|------------|
31
- | **Variables** | Reveal intent: `userCount` not `n` |
32
- | **Functions** | Verb + noun: `getUserById()` not `user()` |
33
- | **Booleans** | Question form: `isActive`, `hasPermission`, `canEdit` |
34
- | **Constants** | SCREAMING_SNAKE: `MAX_RETRY_COUNT` |
35
-
36
- > **Rule:** If you need a comment to explain a name, rename it.
37
-
38
- ---
39
-
40
- ## Function Rules
41
-
42
- | Rule | Description |
43
- |------|-------------|
44
- | **Small** | Max 20 lines, ideally 5-10 |
45
- | **One Thing** | Does one thing, does it well |
46
- | **One Level** | One level of abstraction per function |
47
- | **Few Args** | Max 3 arguments, prefer 0-2 |
48
- | **No Side Effects** | Don't mutate inputs unexpectedly |
49
-
50
- ---
51
-
52
- ## Code Structure
53
-
54
- | Pattern | Apply |
55
- |---------|-------|
56
- | **Guard Clauses** | Early returns for edge cases |
57
- | **Flat > Nested** | Avoid deep nesting (max 2 levels) |
58
- | **Composition** | Small functions composed together |
59
- | **Colocation** | Keep related code close |
60
-
61
- ---
62
-
63
- ## AI Coding Style
64
-
65
- | Situation | Action |
66
- |-----------|--------|
67
- | User asks for feature | Write it directly |
68
- | User reports bug | Fix it, don't explain |
69
- | No clear requirement | Ask, don't assume |
70
-
71
- ---
72
-
73
- ## Anti-Patterns (DON'T)
74
-
75
- | Pattern | Fix |
76
- |-----------|-------|
77
- | Comment every line | Delete obvious comments |
78
- | Helper for one-liner | Inline the code |
79
- | Factory for 2 objects | Direct instantiation |
80
- | utils.ts with 1 function | Put code where used |
81
- | "First we import..." | Just write code |
82
- | Deep nesting | Guard clauses |
83
- | Magic numbers | Named constants |
84
- | God functions | Split by responsibility |
85
-
86
- ---
87
-
88
- ## 🔴 Before Editing ANY File (THINK FIRST!)
89
-
90
- **Before changing a file, ask yourself:**
91
-
92
- | Question | Why |
93
- |----------|-----|
94
- | **What imports this file?** | They might break |
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
- allowed-tools: Read, Write, Edit, Glob, Grep
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.