@iamnishankhan/opencode-kit-grok 1.0.0

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 (198) hide show
  1. package/bin/cli.js +46 -0
  2. package/kit/.opencode/AGENTS.md +392 -0
  3. package/kit/.opencode/README.md +71 -0
  4. package/kit/.opencode/USAGE.md +405 -0
  5. package/kit/.opencode/agents/backend-specialist.md +278 -0
  6. package/kit/.opencode/agents/code-archaeologist.md +114 -0
  7. package/kit/.opencode/agents/database-architect.md +233 -0
  8. package/kit/.opencode/agents/debugger.md +234 -0
  9. package/kit/.opencode/agents/devops-engineer.md +252 -0
  10. package/kit/.opencode/agents/documentation-writer.md +111 -0
  11. package/kit/.opencode/agents/explorer-agent.md +83 -0
  12. package/kit/.opencode/agents/frontend-specialist.md +606 -0
  13. package/kit/.opencode/agents/game-developer.md +169 -0
  14. package/kit/.opencode/agents/mobile-developer.md +385 -0
  15. package/kit/.opencode/agents/orchestrator.md +213 -0
  16. package/kit/.opencode/agents/penetration-tester.md +197 -0
  17. package/kit/.opencode/agents/performance-optimizer.md +194 -0
  18. package/kit/.opencode/agents/product-manager.md +120 -0
  19. package/kit/.opencode/agents/product-owner.md +103 -0
  20. package/kit/.opencode/agents/project-planner.md +418 -0
  21. package/kit/.opencode/agents/qa-automation-engineer.md +113 -0
  22. package/kit/.opencode/agents/security-auditor.md +179 -0
  23. package/kit/.opencode/agents/seo-specialist.md +119 -0
  24. package/kit/.opencode/agents/test-engineer.md +169 -0
  25. package/kit/.opencode/commands/brainstorm.md +113 -0
  26. package/kit/.opencode/commands/coordinate.md +72 -0
  27. package/kit/.opencode/commands/create.md +63 -0
  28. package/kit/.opencode/commands/debug.md +102 -0
  29. package/kit/.opencode/commands/deploy.md +175 -0
  30. package/kit/.opencode/commands/enhance.md +62 -0
  31. package/kit/.opencode/commands/orchestrate.md +241 -0
  32. package/kit/.opencode/commands/plan.md +89 -0
  33. package/kit/.opencode/commands/preview.md +80 -0
  34. package/kit/.opencode/commands/remember.md +67 -0
  35. package/kit/.opencode/commands/status.md +86 -0
  36. package/kit/.opencode/commands/test.md +143 -0
  37. package/kit/.opencode/commands/verify.md +71 -0
  38. package/kit/.opencode/memory/MEMORY.md +6 -0
  39. package/kit/.opencode/memory/feedback-history.md +9 -0
  40. package/kit/.opencode/memory/project-conventions.md +16 -0
  41. package/kit/.opencode/memory/tech-decisions.md +10 -0
  42. package/kit/.opencode/memory/user-preferences.md +9 -0
  43. package/kit/.opencode/opencode.json +15 -0
  44. package/kit/.opencode/scripts/README.md +95 -0
  45. package/kit/.opencode/scripts/auto_preview.py +149 -0
  46. package/kit/.opencode/scripts/checklist.py +75 -0
  47. package/kit/.opencode/scripts/component_registry.py +238 -0
  48. package/kit/.opencode/scripts/dependency_graph.py +73 -0
  49. package/kit/.opencode/scripts/generate_manifest.py +44 -0
  50. package/kit/.opencode/scripts/session_manager.py +120 -0
  51. package/kit/.opencode/scripts/tests/test_toolkit.py +238 -0
  52. package/kit/.opencode/scripts/validate_kit.py +397 -0
  53. package/kit/.opencode/scripts/validation_runner.py +216 -0
  54. package/kit/.opencode/scripts/verify_all.py +85 -0
  55. package/kit/.opencode/skills/api-patterns/SKILL.md +83 -0
  56. package/kit/.opencode/skills/api-patterns/api-style.md +42 -0
  57. package/kit/.opencode/skills/api-patterns/auth.md +24 -0
  58. package/kit/.opencode/skills/api-patterns/documentation.md +26 -0
  59. package/kit/.opencode/skills/api-patterns/graphql.md +41 -0
  60. package/kit/.opencode/skills/api-patterns/rate-limiting.md +31 -0
  61. package/kit/.opencode/skills/api-patterns/response.md +37 -0
  62. package/kit/.opencode/skills/api-patterns/rest.md +40 -0
  63. package/kit/.opencode/skills/api-patterns/scripts/api_validator.py +211 -0
  64. package/kit/.opencode/skills/api-patterns/security-testing.md +122 -0
  65. package/kit/.opencode/skills/api-patterns/trpc.md +41 -0
  66. package/kit/.opencode/skills/api-patterns/versioning.md +22 -0
  67. package/kit/.opencode/skills/app-builder/SKILL.md +78 -0
  68. package/kit/.opencode/skills/app-builder/agent-coordination.md +71 -0
  69. package/kit/.opencode/skills/app-builder/feature-building.md +53 -0
  70. package/kit/.opencode/skills/app-builder/project-detection.md +45 -0
  71. package/kit/.opencode/skills/app-builder/scaffolding.md +110 -0
  72. package/kit/.opencode/skills/app-builder/tech-stack.md +41 -0
  73. package/kit/.opencode/skills/app-builder/templates/SKILL.md +39 -0
  74. package/kit/.opencode/skills/app-builder/templates/astro-static/TEMPLATE.md +78 -0
  75. package/kit/.opencode/skills/app-builder/templates/chrome-extension/TEMPLATE.md +96 -0
  76. package/kit/.opencode/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
  77. package/kit/.opencode/skills/app-builder/templates/electron-desktop/TEMPLATE.md +97 -0
  78. package/kit/.opencode/skills/app-builder/templates/express-api/TEMPLATE.md +89 -0
  79. package/kit/.opencode/skills/app-builder/templates/flutter-app/TEMPLATE.md +93 -0
  80. package/kit/.opencode/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +97 -0
  81. package/kit/.opencode/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +126 -0
  82. package/kit/.opencode/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +125 -0
  83. package/kit/.opencode/skills/app-builder/templates/nextjs-static/TEMPLATE.md +174 -0
  84. package/kit/.opencode/skills/app-builder/templates/nuxt-app/TEMPLATE.md +127 -0
  85. package/kit/.opencode/skills/app-builder/templates/python-fastapi/TEMPLATE.md +94 -0
  86. package/kit/.opencode/skills/app-builder/templates/react-native-app/TEMPLATE.md +121 -0
  87. package/kit/.opencode/skills/architecture/SKILL.md +57 -0
  88. package/kit/.opencode/skills/architecture/context-discovery.md +43 -0
  89. package/kit/.opencode/skills/architecture/examples.md +94 -0
  90. package/kit/.opencode/skills/architecture/pattern-selection.md +68 -0
  91. package/kit/.opencode/skills/architecture/patterns-reference.md +50 -0
  92. package/kit/.opencode/skills/architecture/trade-off-analysis.md +77 -0
  93. package/kit/.opencode/skills/bash-linux/SKILL.md +201 -0
  94. package/kit/.opencode/skills/batch-operations/SKILL.md +105 -0
  95. package/kit/.opencode/skills/behavioral-modes/SKILL.md +253 -0
  96. package/kit/.opencode/skills/brainstorming/SKILL.md +178 -0
  97. package/kit/.opencode/skills/brainstorming/dynamic-questioning.md +350 -0
  98. package/kit/.opencode/skills/clean-code/SKILL.md +201 -0
  99. package/kit/.opencode/skills/code-review-checklist/SKILL.md +111 -0
  100. package/kit/.opencode/skills/code-review-graph/SKILL.md +305 -0
  101. package/kit/.opencode/skills/context-compression/SKILL.md +145 -0
  102. package/kit/.opencode/skills/coordinator-mode/SKILL.md +208 -0
  103. package/kit/.opencode/skills/database-design/SKILL.md +54 -0
  104. package/kit/.opencode/skills/database-design/database-selection.md +43 -0
  105. package/kit/.opencode/skills/database-design/indexing.md +39 -0
  106. package/kit/.opencode/skills/database-design/migrations.md +48 -0
  107. package/kit/.opencode/skills/database-design/optimization.md +36 -0
  108. package/kit/.opencode/skills/database-design/orm-selection.md +30 -0
  109. package/kit/.opencode/skills/database-design/schema-design.md +56 -0
  110. package/kit/.opencode/skills/database-design/scripts/schema_validator.py +172 -0
  111. package/kit/.opencode/skills/deployment-procedures/SKILL.md +243 -0
  112. package/kit/.opencode/skills/design-spec/SKILL.md +185 -0
  113. package/kit/.opencode/skills/design-spec/collection.md +106 -0
  114. package/kit/.opencode/skills/documentation-templates/SKILL.md +196 -0
  115. package/kit/.opencode/skills/frontend-architecture/SKILL.md +245 -0
  116. package/kit/.opencode/skills/frontend-design/SKILL.md +1222 -0
  117. package/kit/.opencode/skills/frontend-design/redesign.md +178 -0
  118. package/kit/.opencode/skills/frontend-design/scripts/accessibility_checker.py +145 -0
  119. package/kit/.opencode/skills/frontend-design/scripts/ux_audit.py +722 -0
  120. package/kit/.opencode/skills/frontend-design/style-brutalist.md +92 -0
  121. package/kit/.opencode/skills/frontend-design/style-minimalist.md +85 -0
  122. package/kit/.opencode/skills/game-development/2d-games/SKILL.md +118 -0
  123. package/kit/.opencode/skills/game-development/3d-games/SKILL.md +134 -0
  124. package/kit/.opencode/skills/game-development/SKILL.md +169 -0
  125. package/kit/.opencode/skills/game-development/game-art/SKILL.md +184 -0
  126. package/kit/.opencode/skills/game-development/game-audio/SKILL.md +189 -0
  127. package/kit/.opencode/skills/game-development/game-design/SKILL.md +128 -0
  128. package/kit/.opencode/skills/game-development/mobile-games/SKILL.md +107 -0
  129. package/kit/.opencode/skills/game-development/multiplayer/SKILL.md +131 -0
  130. package/kit/.opencode/skills/game-development/pc-games/SKILL.md +143 -0
  131. package/kit/.opencode/skills/game-development/vr-ar/SKILL.md +122 -0
  132. package/kit/.opencode/skills/game-development/web-games/SKILL.md +149 -0
  133. package/kit/.opencode/skills/geo-fundamentals/SKILL.md +158 -0
  134. package/kit/.opencode/skills/geo-fundamentals/scripts/geo_checker.py +273 -0
  135. package/kit/.opencode/skills/i18n-localization/SKILL.md +156 -0
  136. package/kit/.opencode/skills/i18n-localization/scripts/i18n_checker.py +223 -0
  137. package/kit/.opencode/skills/intelligent-routing/SKILL.md +337 -0
  138. package/kit/.opencode/skills/lint-and-validate/SKILL.md +47 -0
  139. package/kit/.opencode/skills/lint-and-validate/scripts/lint_runner.py +184 -0
  140. package/kit/.opencode/skills/lint-and-validate/scripts/type_coverage.py +245 -0
  141. package/kit/.opencode/skills/mcp-builder/SKILL.md +205 -0
  142. package/kit/.opencode/skills/memory-system/SKILL.md +181 -0
  143. package/kit/.opencode/skills/mobile-design/SKILL.md +396 -0
  144. package/kit/.opencode/skills/mobile-design/decision-trees.md +516 -0
  145. package/kit/.opencode/skills/mobile-design/mobile-backend.md +491 -0
  146. package/kit/.opencode/skills/mobile-design/mobile-color-system.md +420 -0
  147. package/kit/.opencode/skills/mobile-design/mobile-debugging.md +122 -0
  148. package/kit/.opencode/skills/mobile-design/mobile-design-thinking.md +357 -0
  149. package/kit/.opencode/skills/mobile-design/mobile-navigation.md +458 -0
  150. package/kit/.opencode/skills/mobile-design/mobile-performance.md +767 -0
  151. package/kit/.opencode/skills/mobile-design/mobile-testing.md +356 -0
  152. package/kit/.opencode/skills/mobile-design/mobile-typography.md +433 -0
  153. package/kit/.opencode/skills/mobile-design/platform-android.md +666 -0
  154. package/kit/.opencode/skills/mobile-design/platform-ios.md +561 -0
  155. package/kit/.opencode/skills/mobile-design/scripts/mobile_audit.py +670 -0
  156. package/kit/.opencode/skills/mobile-design/touch-psychology.md +537 -0
  157. package/kit/.opencode/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +351 -0
  158. package/kit/.opencode/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
  159. package/kit/.opencode/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
  160. package/kit/.opencode/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
  161. package/kit/.opencode/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
  162. package/kit/.opencode/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
  163. package/kit/.opencode/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
  164. package/kit/.opencode/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
  165. package/kit/.opencode/skills/nextjs-react-expert/9-cache-components.md +103 -0
  166. package/kit/.opencode/skills/nextjs-react-expert/SKILL.md +293 -0
  167. package/kit/.opencode/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
  168. package/kit/.opencode/skills/nextjs-react-expert/scripts/react_performance_checker.py +281 -0
  169. package/kit/.opencode/skills/nodejs-best-practices/SKILL.md +336 -0
  170. package/kit/.opencode/skills/parallel-agents/SKILL.md +192 -0
  171. package/kit/.opencode/skills/performance-profiling/SKILL.md +145 -0
  172. package/kit/.opencode/skills/performance-profiling/scripts/bundle_analyzer.py +120 -0
  173. package/kit/.opencode/skills/performance-profiling/scripts/lighthouse_audit.py +108 -0
  174. package/kit/.opencode/skills/plan-writing/SKILL.md +153 -0
  175. package/kit/.opencode/skills/powershell-windows/SKILL.md +169 -0
  176. package/kit/.opencode/skills/python-patterns/SKILL.md +443 -0
  177. package/kit/.opencode/skills/red-team-tactics/SKILL.md +201 -0
  178. package/kit/.opencode/skills/rust-pro/SKILL.md +177 -0
  179. package/kit/.opencode/skills/seo-fundamentals/SKILL.md +131 -0
  180. package/kit/.opencode/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
  181. package/kit/.opencode/skills/server-management/SKILL.md +163 -0
  182. package/kit/.opencode/skills/simplify-code/SKILL.md +131 -0
  183. package/kit/.opencode/skills/skillify/SKILL.md +115 -0
  184. package/kit/.opencode/skills/systematic-debugging/SKILL.md +111 -0
  185. package/kit/.opencode/skills/tailwind-patterns/SKILL.md +271 -0
  186. package/kit/.opencode/skills/tdd-workflow/SKILL.md +151 -0
  187. package/kit/.opencode/skills/testing-patterns/SKILL.md +180 -0
  188. package/kit/.opencode/skills/testing-patterns/scripts/test_runner.py +219 -0
  189. package/kit/.opencode/skills/verify-changes/SKILL.md +127 -0
  190. package/kit/.opencode/skills/vulnerability-scanner/SKILL.md +278 -0
  191. package/kit/.opencode/skills/vulnerability-scanner/checklists.md +124 -0
  192. package/kit/.opencode/skills/vulnerability-scanner/scripts/dependency_analyzer.py +144 -0
  193. package/kit/.opencode/skills/vulnerability-scanner/scripts/security_scan.py +410 -0
  194. package/kit/.opencode/skills/web-design-guidelines/SKILL.md +56 -0
  195. package/kit/.opencode/skills/webapp-testing/SKILL.md +189 -0
  196. package/kit/.opencode/skills/webapp-testing/scripts/playwright_runner.py +123 -0
  197. package/lib/init.js +61 -0
  198. package/package.json +21 -0
@@ -0,0 +1,131 @@
1
+ ---
2
+ name: simplify-code
3
+ description: Reduce complexity of over-engineered code. Identify unnecessary abstractions, remove dead code, flatten deep nesting, and simplify logic while preserving behavior.
4
+ compatibility: opencode
5
+ metadata:
6
+ when_to_use: "\"When code is over-engineered, overly abstract, deeply nested, or more complex than needed. When user asks to 'simplify', 'clean up', 'reduce complexity', or 'make this simpler'. NOT for adding new fe"
7
+ version: "1.0.0"
8
+ ---
9
+ # Simplify Code — Reduce Unnecessary Complexity
10
+
11
+ > The best code is the code you don't have to write. The second best is the code anyone can read.
12
+
13
+ ## Core Principle
14
+
15
+ ```
16
+ Complexity is a cost. Every abstraction, every indirection, every clever pattern
17
+ adds cognitive load. Simplify ruthlessly unless complexity serves a clear purpose.
18
+ ```
19
+
20
+ ---
21
+
22
+ ## Simplification Checklist
23
+
24
+ ### 1. Unnecessary Abstractions
25
+ | Smell | Simplification |
26
+ |---|---|
27
+ | Wrapper class that just delegates | Remove wrapper, use the inner class directly |
28
+ | Factory that creates only one type | Replace with direct constructor |
29
+ | Strategy pattern with one strategy | Replace with simple function |
30
+ | Interface with one implementation | Remove interface, use the class |
31
+ | Abstract class with one child | Merge into the child class |
32
+ | Config object for 2 values | Use function parameters |
33
+
34
+ ### 2. Dead Code
35
+ | Smell | Action |
36
+ |---|---|
37
+ | Unused imports | Remove |
38
+ | Unreachable branches | Remove (check tests first) |
39
+ | Commented-out code | Remove (it's in git history) |
40
+ | Unused variables/functions | Remove |
41
+ | TODO comments older than 6 months | Remove or create issue |
42
+ | Feature flags for launched features | Remove flag, keep the code |
43
+
44
+ ### 3. Deep Nesting
45
+ ```javascript
46
+ // ❌ Before: 4 levels deep
47
+ function process(data) {
48
+ if (data) {
49
+ if (data.items) {
50
+ for (const item of data.items) {
51
+ if (item.active) {
52
+ doSomething(item)
53
+ }
54
+ }
55
+ }
56
+ }
57
+ }
58
+
59
+ // ✅ After: Early returns + filter
60
+ function process(data) {
61
+ if (!data?.items) return
62
+
63
+ data.items
64
+ .filter(item => item.active)
65
+ .forEach(doSomething)
66
+ }
67
+ ```
68
+
69
+ ### 4. Over-Parameterized Functions
70
+ ```typescript
71
+ // ❌ Before: 8 parameters
72
+ function createUser(name, email, age, role, dept, active, verified, avatar) { }
73
+
74
+ // ✅ After: Object parameter
75
+ function createUser(opts: CreateUserOpts) { }
76
+ ```
77
+
78
+ ### 5. Premature Optimization
79
+ | Smell | Simplification |
80
+ |---|---|
81
+ | Custom cache for <100 items | Remove cache, measure first |
82
+ | Memoization on cheap functions | Remove memo |
83
+ | Lazy loading for small modules | Use direct import |
84
+ | Complex state machine for 3 states | Use simple if/else or switch |
85
+
86
+ ---
87
+
88
+ ## Simplification Protocol
89
+
90
+ ### Step 1: Identify Complexity
91
+ ```
92
+ - Count nesting levels (target: ≤3)
93
+ - Count function parameters (target: ≤4)
94
+ - Count lines per function (target: ≤30)
95
+ - Count abstractions per feature (target: ≤2)
96
+ - Check for dead code (target: 0)
97
+ ```
98
+
99
+ ### Step 2: Verify Understanding
100
+ Before simplifying, ensure you understand:
101
+ - What the code does (not what it looks like it does)
102
+ - Why it was written this way (maybe there's a reason)
103
+ - What tests cover it (simplification must not break tests)
104
+
105
+ ### Step 3: Simplify Incrementally
106
+ ```
107
+ 1. Remove dead code first (safest)
108
+ 2. Flatten nesting with early returns
109
+ 3. Inline trivial abstractions
110
+ 4. Merge related functions
111
+ 5. Simplify data structures
112
+ ```
113
+
114
+ ### Step 4: Verify Behavior Preserved
115
+ ```bash
116
+ npm run test # All existing tests still pass
117
+ npm run build # Still compiles
118
+ ```
119
+
120
+ ---
121
+
122
+ ## When NOT to Simplify
123
+
124
+ | Situation | Why Keep Complexity |
125
+ |---|---|
126
+ | Performance-critical hot path | Optimization may look complex but is necessary |
127
+ | Required by framework/library | External constraints |
128
+ | Explicitly requested pattern | User chose this architecture |
129
+ | Will need extension soon | Abstraction prepares for known growth |
130
+
131
+ > **Ask first:** "This pattern seems over-engineered. Should I simplify it, or is there a reason for the abstraction?"
@@ -0,0 +1,115 @@
1
+ ---
2
+ name: skillify
3
+ description: Auto-create new skills from repetitive workflows. When you notice yourself doing the same multi-step process repeatedly, extract it into a reusable SKILL.md that any agent can use.
4
+ compatibility: opencode
5
+ metadata:
6
+ when_to_use: "\"When the user says 'make this a skill', 'create a skill for this', 'I keep doing this same thing', or when a repetitive multi-step pattern is observed. NOT for one-off tasks.\""
7
+ version: "1.0.0"
8
+ ---
9
+ # Skillify — Auto-Create Skills from Workflows
10
+
11
+ > Turn repetitive patterns into reusable skills. If you've done it three times, it should be a skill.
12
+
13
+ ## When to Skillify
14
+
15
+ ✅ **Good candidates:**
16
+ - You've seen the user ask for the same type of work 3+ times
17
+ - A workflow involves 5+ consistent steps
18
+ - The pattern works across different projects
19
+ - Other agents could benefit from this knowledge
20
+
21
+ ❌ **Bad candidates:**
22
+ - One-off tasks (just do them)
23
+ - Project-specific hacks (use memory instead)
24
+ - Already covered by existing skills (check first)
25
+
26
+ ---
27
+
28
+ ## Skill Creation Protocol
29
+
30
+ ### Step 1: Identify the Pattern
31
+ ```
32
+ What triggers this workflow? (user says X, file type Y, domain Z)
33
+ What steps are always the same?
34
+ What parts vary between uses?
35
+ What's the expected output?
36
+ ```
37
+
38
+ ### Step 2: Generate SKILL.md
39
+
40
+ Use this template:
41
+
42
+ ```markdown
43
+ ---
44
+ name: [kebab-case-name]
45
+ description: [One sentence describing what this skill does]
46
+ when_to_use: "[When the user asks X, works with Y files, or Z domain. NOT for A.]"
47
+ allowed-tools: [Read, Write, Edit, Grep, Glob, Bash — only what's needed]
48
+ effort: [low | medium | high]
49
+ ---
50
+
51
+ # [Skill Name] — [Short Subtitle]
52
+
53
+ > [One-line philosophy or principle]
54
+
55
+ ## Overview
56
+ [2-3 sentences explaining what this skill enables]
57
+
58
+ ## When to Use
59
+ ✅ Good for: [list]
60
+ ❌ Not for: [list]
61
+
62
+ ## Protocol
63
+ ### Step 1: [First Action]
64
+ [Instructions]
65
+
66
+ ### Step 2: [Second Action]
67
+ [Instructions]
68
+
69
+ ### Step N: [Verification]
70
+ [How to verify the skill worked correctly]
71
+
72
+ ## Best Practices
73
+ [3-5 key rules]
74
+ ```
75
+
76
+ ### Step 3: Place the Skill
77
+ ```
78
+ .opencode/skills/[skill-name]/SKILL.md
79
+ ```
80
+
81
+ ### Step 4: Verify
82
+ - [ ] Frontmatter has all required fields (name, description, when_to_use)
83
+ - [ ] `when_to_use` clearly defines triggers AND exclusions
84
+ - [ ] Steps are actionable, not vague
85
+ - [ ] Skill doesn't duplicate an existing one
86
+
87
+ ---
88
+
89
+ ## Naming Conventions
90
+
91
+ | Pattern | Skill Name | Example |
92
+ |---|---|---|
93
+ | Action-based | `[verb]-[noun]` | `verify-changes`, `batch-operations` |
94
+ | Domain-based | `[domain]-[aspect]` | `database-design`, `api-patterns` |
95
+ | Tool-based | `[tool]-patterns` | `tailwind-patterns`, `prisma-expert` |
96
+
97
+ **Rules:**
98
+ - kebab-case only
99
+ - 2-3 words maximum
100
+ - Descriptive, not clever
101
+ - No abbreviations unless universally known
102
+
103
+ ---
104
+
105
+ ## Quality Checklist
106
+
107
+ Before finalizing a new skill:
108
+
109
+ | Check | Criteria |
110
+ |---|---|
111
+ | **Uniqueness** | No existing skill covers this (grep `.opencode/skills/`) |
112
+ | **Reusability** | Useful across multiple projects, not just one |
113
+ | **Completeness** | Has overview, when to use, protocol, verification |
114
+ | **Frontmatter** | All required fields present and accurate |
115
+ | **Clarity** | A new agent could follow these instructions cold |
@@ -0,0 +1,111 @@
1
+ ---
2
+ name: systematic-debugging
3
+ description: 4-phase systematic debugging methodology with root cause analysis and evidence-based verification. Use when debugging complex issues.
4
+ compatibility: opencode
5
+ metadata:
6
+ when_to_use: "\"When debugging complex issues, performing root cause analysis, or using evidence-based problem solving. Use with /debug workflow.\""
7
+ version: "1.0.0"
8
+ ---
9
+ # Systematic Debugging
10
+
11
+ > Source: obra/superpowers
12
+
13
+ ## Overview
14
+ This skill provides a structured approach to debugging that prevents random guessing and ensures problems are properly understood before solving.
15
+
16
+ ## 4-Phase Debugging Process
17
+
18
+ ### Phase 1: Reproduce
19
+ Before fixing, reliably reproduce the issue.
20
+
21
+ ```markdown
22
+ ## Reproduction Steps
23
+ 1. [Exact step to reproduce]
24
+ 2. [Next step]
25
+ 3. [Expected vs actual result]
26
+
27
+ ## Reproduction Rate
28
+ - [ ] Always (100%)
29
+ - [ ] Often (50-90%)
30
+ - [ ] Sometimes (10-50%)
31
+ - [ ] Rare (<10%)
32
+ ```
33
+
34
+ ### Phase 2: Isolate
35
+ Narrow down the source.
36
+
37
+ ```markdown
38
+ ## Isolation Questions
39
+ - When did this start happening?
40
+ - What changed recently?
41
+ - Does it happen in all environments?
42
+ - Can we reproduce with minimal code?
43
+ - What's the smallest change that triggers it?
44
+ ```
45
+
46
+ ### Phase 3: Understand
47
+ Find the root cause, not just symptoms.
48
+
49
+ ```markdown
50
+ ## Root Cause Analysis
51
+ ### The 5 Whys
52
+ 1. Why: [First observation]
53
+ 2. Why: [Deeper reason]
54
+ 3. Why: [Still deeper]
55
+ 4. Why: [Getting closer]
56
+ 5. Why: [Root cause]
57
+ ```
58
+
59
+ ### Phase 4: Fix & Verify
60
+ Fix and verify it's truly fixed.
61
+
62
+ ```markdown
63
+ ## Fix Verification
64
+ - [ ] Bug no longer reproduces
65
+ - [ ] Related functionality still works
66
+ - [ ] No new issues introduced
67
+ - [ ] Test added to prevent regression
68
+ ```
69
+
70
+ ## Debugging Checklist
71
+
72
+ ```markdown
73
+ ## Before Starting
74
+ - [ ] Can reproduce consistently
75
+ - [ ] Have minimal reproduction case
76
+ - [ ] Understand expected behavior
77
+
78
+ ## During Investigation
79
+ - [ ] Check recent changes (git log)
80
+ - [ ] Check logs for errors
81
+ - [ ] Add logging if needed
82
+ - [ ] Use debugger/breakpoints
83
+
84
+ ## After Fix
85
+ - [ ] Root cause documented
86
+ - [ ] Fix verified
87
+ - [ ] Regression test added
88
+ - [ ] Similar code checked
89
+ ```
90
+
91
+ ## Common Debugging Commands
92
+
93
+ ```bash
94
+ # Recent changes
95
+ git log --oneline -20
96
+ git diff HEAD~5
97
+
98
+ # Search for pattern
99
+ grep -r "errorPattern" --include="*.ts"
100
+
101
+ # Check logs
102
+ pm2 logs app-name --err --lines 100
103
+ ```
104
+
105
+ ## Anti-Patterns
106
+
107
+ ❌ **Random changes** - "Maybe if I change this..."
108
+ ❌ **Ignoring evidence** - "That can't be the cause"
109
+ ❌ **Assuming** - "It must be X" without proof
110
+ ❌ **Not reproducing first** - Fixing blindly
111
+ ❌ **Stopping at symptoms** - Not finding root cause
@@ -0,0 +1,271 @@
1
+ ---
2
+ name: tailwind-patterns
3
+ description: Tailwind CSS v4 principles. CSS-first configuration, container queries, modern patterns, design token architecture.
4
+ compatibility: opencode
5
+ metadata:
6
+ when_to_use: "\"When using Tailwind CSS v4, implementing design tokens, container queries, or modern CSS patterns with Tailwind.\""
7
+ version: "1.0.0"
8
+ ---
9
+ # Tailwind CSS Patterns (v4)
10
+
11
+ > Modern utility-first CSS with CSS-native configuration.
12
+
13
+ ---
14
+
15
+ ## 1. Tailwind v4 Architecture
16
+
17
+ ### What Changed from v3
18
+
19
+ | v3 (Legacy) | v4 (Current) |
20
+ |-------------|--------------|
21
+ | `tailwind.config.js` | CSS-based `@theme` directive |
22
+ | PostCSS plugin | Oxide engine (full builds ~5x, incremental >100x) |
23
+ | JIT mode | Native, always-on |
24
+ | Plugin system | CSS-native features |
25
+ | `@apply` directive | Still works, discouraged |
26
+
27
+ ### v4 Core Concepts
28
+
29
+ | Concept | Description |
30
+ |---------|-------------|
31
+ | **CSS-first** | Configuration in CSS, not JavaScript |
32
+ | **Oxide Engine** | Rust-based compiler, much faster |
33
+ | **Native Nesting** | CSS nesting without PostCSS |
34
+ | **CSS Variables** | All tokens exposed as `--*` vars |
35
+
36
+ ---
37
+
38
+ ## 2. CSS-Based Configuration
39
+
40
+ ### Theme Definition
41
+
42
+ ```
43
+ @theme {
44
+ /* Colors - use semantic names */
45
+ --color-primary: oklch(0.7 0.15 250);
46
+ --color-surface: oklch(0.98 0 0);
47
+ --color-surface-dark: oklch(0.15 0 0);
48
+
49
+ /* Spacing scale */
50
+ --spacing-xs: 0.25rem;
51
+ --spacing-sm: 0.5rem;
52
+ --spacing-md: 1rem;
53
+ --spacing-lg: 2rem;
54
+
55
+ /* Typography */
56
+ --font-sans: 'Inter', system-ui, sans-serif;
57
+ --font-mono: 'JetBrains Mono', monospace;
58
+ }
59
+ ```
60
+
61
+ ### When to Extend vs Override
62
+
63
+ | Action | Use When |
64
+ |--------|----------|
65
+ | **Extend** | Adding new values alongside defaults |
66
+ | **Override** | Replacing default scale entirely |
67
+ | **Semantic tokens** | Project-specific naming (primary, surface) |
68
+
69
+ ---
70
+
71
+ ## 3. Container Queries (v4 Native)
72
+
73
+ ### Breakpoint vs Container
74
+
75
+ | Type | Responds To |
76
+ |------|-------------|
77
+ | **Breakpoint** (`md:`) | Viewport width |
78
+ | **Container** (`@container`) | Parent element width |
79
+
80
+ ### Container Query Usage
81
+
82
+ | Pattern | Classes |
83
+ |---------|---------|
84
+ | Define container | `@container` on parent |
85
+ | Container breakpoint | `@sm:`, `@md:`, `@lg:` on children |
86
+ | Named containers | `@container/card` for specificity |
87
+
88
+ ### When to Use
89
+
90
+ | Scenario | Use |
91
+ |----------|-----|
92
+ | Page-level layouts | Viewport breakpoints |
93
+ | Component-level responsive | Container queries |
94
+ | Reusable components | Container queries (context-independent) |
95
+
96
+ ---
97
+
98
+ ## 4. Responsive Design
99
+
100
+ ### Breakpoint System
101
+
102
+ | Prefix | Min Width | Target |
103
+ |--------|-----------|--------|
104
+ | (none) | 0px | Mobile-first base |
105
+ | `sm:` | 640px | Large phone / small tablet |
106
+ | `md:` | 768px | Tablet |
107
+ | `lg:` | 1024px | Laptop |
108
+ | `xl:` | 1280px | Desktop |
109
+ | `2xl:` | 1536px | Large desktop |
110
+
111
+ ### Mobile-First Principle
112
+
113
+ 1. Write mobile styles first (no prefix)
114
+ 2. Add larger screen overrides with prefixes
115
+ 3. Example: `w-full md:w-1/2 lg:w-1/3`
116
+
117
+ ---
118
+
119
+ ## 5. Dark Mode
120
+
121
+ ### Configuration Strategies
122
+
123
+ | Method | Behavior | Use When |
124
+ |--------|----------|----------|
125
+ | `class` | `.dark` class toggles | Manual theme switcher |
126
+ | `media` | Follows system preference | No user control |
127
+ | `selector` | Custom selector (v4) | Complex theming |
128
+
129
+ ### Dark Mode Pattern
130
+
131
+ | Element | Light | Dark |
132
+ |---------|-------|------|
133
+ | Background | `bg-white` | `dark:bg-zinc-900` |
134
+ | Text | `text-zinc-900` | `dark:text-zinc-100` |
135
+ | Borders | `border-zinc-200` | `dark:border-zinc-700` |
136
+
137
+ ---
138
+
139
+ ## 6. Modern Layout Patterns
140
+
141
+ ### Flexbox Patterns
142
+
143
+ | Pattern | Classes |
144
+ |---------|---------|
145
+ | Center (both axes) | `flex items-center justify-center` |
146
+ | Vertical stack | `flex flex-col gap-4` |
147
+ | Horizontal row | `flex gap-4` |
148
+ | Space between | `flex justify-between items-center` |
149
+ | Wrap grid | `flex flex-wrap gap-4` |
150
+
151
+ ### Grid Patterns
152
+
153
+ | Pattern | Classes |
154
+ |---------|---------|
155
+ | Auto-fit responsive | `grid grid-cols-[repeat(auto-fit,minmax(250px,1fr))]` |
156
+ | Asymmetric (Bento) | `grid grid-cols-3 grid-rows-2` with spans |
157
+ | Sidebar layout | `grid grid-cols-[auto_1fr]` |
158
+
159
+ > **Note:** Prefer asymmetric/Bento layouts over symmetric 3-column grids.
160
+
161
+ ---
162
+
163
+ ## 7. Modern Color System
164
+
165
+ ### OKLCH vs RGB/HSL
166
+
167
+ | Format | Advantage |
168
+ |--------|-----------|
169
+ | **OKLCH** | Perceptually uniform, better for design |
170
+ | **HSL** | Intuitive hue/saturation |
171
+ | **RGB** | Legacy compatibility |
172
+
173
+ ### Color Token Architecture
174
+
175
+ | Layer | Example | Purpose |
176
+ |-------|---------|---------|
177
+ | **Primitive** | `--blue-500` | Raw color values |
178
+ | **Semantic** | `--color-primary` | Purpose-based naming |
179
+ | **Component** | `--button-bg` | Component-specific |
180
+
181
+ ---
182
+
183
+ ## 8. Typography System
184
+
185
+ ### Font Stack Pattern
186
+
187
+ | Type | Recommended |
188
+ |------|-------------|
189
+ | Sans | `'Inter', 'SF Pro', system-ui, sans-serif` |
190
+ | Mono | `'JetBrains Mono', 'Fira Code', monospace` |
191
+ | Display | `'Outfit', 'Poppins', sans-serif` |
192
+
193
+ ### Type Scale
194
+
195
+ | Class | Size | Use |
196
+ |-------|------|-----|
197
+ | `text-xs` | 0.75rem | Labels, captions |
198
+ | `text-sm` | 0.875rem | Secondary text |
199
+ | `text-base` | 1rem | Body text |
200
+ | `text-lg` | 1.125rem | Lead text |
201
+ | `text-xl`+ | 1.25rem+ | Headings |
202
+
203
+ ---
204
+
205
+ ## 9. Animation & Transitions
206
+
207
+ ### Built-in Animations
208
+
209
+ | Class | Effect |
210
+ |-------|--------|
211
+ | `animate-spin` | Continuous rotation |
212
+ | `animate-ping` | Attention pulse |
213
+ | `animate-pulse` | Subtle opacity pulse |
214
+ | `animate-bounce` | Bouncing effect |
215
+
216
+ ### Transition Patterns
217
+
218
+ | Pattern | Classes |
219
+ |---------|---------|
220
+ | All properties | `transition-all duration-200` |
221
+ | Specific | `transition-colors duration-150` |
222
+ | With easing | `ease-out` or `ease-in-out` |
223
+ | Hover effect | `hover:scale-105 transition-transform` |
224
+
225
+ ---
226
+
227
+ ## 10. Component Extraction
228
+
229
+ ### When to Extract
230
+
231
+ | Signal | Action |
232
+ |--------|--------|
233
+ | Same class combo 3+ times | Extract component |
234
+ | Complex state variants | Extract component |
235
+ | Design system element | Extract + document |
236
+
237
+ ### Extraction Methods
238
+
239
+ | Method | Use When |
240
+ |--------|----------|
241
+ | **React/Vue component** | Dynamic, JS needed |
242
+ | **@apply in CSS** | Sparingly — only when a component layer isn't available |
243
+ | **Design tokens** | Reusable values |
244
+
245
+ ---
246
+
247
+ ## 11. Anti-Patterns
248
+
249
+ | Don't | Do |
250
+ |-------|-----|
251
+ | Arbitrary values everywhere | Use design system scale |
252
+ | `!important` | Fix specificity properly |
253
+ | Inline `style=` | Use utilities |
254
+ | Duplicate long class lists | Extract component |
255
+ | Mix v3 config with v4 | Migrate fully to CSS-first |
256
+ | Use `@apply` heavily | Prefer components |
257
+
258
+ ---
259
+
260
+ ## 12. Performance Principles
261
+
262
+ | Principle | Implementation |
263
+ |-----------|----------------|
264
+ | **Purge unused** | Automatic in v4 |
265
+ | **Avoid dynamism** | No template string classes |
266
+ | **Use Oxide** | Default in v4 (full builds ~5x, incremental >100x) |
267
+ | **Cache builds** | CI/CD caching |
268
+
269
+ ---
270
+
271
+ > **Remember:** Tailwind v4 is CSS-first. Embrace CSS variables, container queries, and native features. The config file is now optional.