@kennethsolomon/shipkit 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 (117) hide show
  1. package/README.md +321 -0
  2. package/bin/shipkit.js +146 -0
  3. package/commands/sk/brainstorm.md +63 -0
  4. package/commands/sk/branch.md +35 -0
  5. package/commands/sk/config.md +96 -0
  6. package/commands/sk/execute-plan.md +85 -0
  7. package/commands/sk/features.md +238 -0
  8. package/commands/sk/finish-feature.md +154 -0
  9. package/commands/sk/help.md +103 -0
  10. package/commands/sk/hotfix.md +61 -0
  11. package/commands/sk/plan.md +30 -0
  12. package/commands/sk/release.md +72 -0
  13. package/commands/sk/security-check.md +188 -0
  14. package/commands/sk/set-profile.md +71 -0
  15. package/commands/sk/status.md +25 -0
  16. package/commands/sk/update-task.md +35 -0
  17. package/commands/sk/write-plan.md +72 -0
  18. package/package.json +23 -0
  19. package/skills/sk:accessibility/LICENSE.txt +177 -0
  20. package/skills/sk:accessibility/SKILL.md +150 -0
  21. package/skills/sk:api-design/LICENSE.txt +177 -0
  22. package/skills/sk:api-design/SKILL.md +158 -0
  23. package/skills/sk:brainstorming/SKILL.md +124 -0
  24. package/skills/sk:debug/SKILL.md +252 -0
  25. package/skills/sk:debug/debug_conductor.py +177 -0
  26. package/skills/sk:debug/lib/__init__.py +1 -0
  27. package/skills/sk:debug/lib/bug_gatherer.py +55 -0
  28. package/skills/sk:debug/lib/context_reader.py +139 -0
  29. package/skills/sk:debug/lib/findings_writer.py +76 -0
  30. package/skills/sk:debug/lib/lessons_writer.py +165 -0
  31. package/skills/sk:debug/lib/step_runner.py +326 -0
  32. package/skills/sk:features/SKILL.md +238 -0
  33. package/skills/sk:frontend-design/LICENSE.txt +177 -0
  34. package/skills/sk:frontend-design/SKILL.md +191 -0
  35. package/skills/sk:laravel-init/SKILL.md +37 -0
  36. package/skills/sk:laravel-new/SKILL.md +68 -0
  37. package/skills/sk:lint/SKILL.md +113 -0
  38. package/skills/sk:perf/LICENSE.txt +177 -0
  39. package/skills/sk:perf/SKILL.md +188 -0
  40. package/skills/sk:release/SKILL.md +113 -0
  41. package/skills/sk:release/references/android-checklist.md +269 -0
  42. package/skills/sk:release/references/ios-checklist.md +339 -0
  43. package/skills/sk:release/release.sh +378 -0
  44. package/skills/sk:review/SKILL.md +346 -0
  45. package/skills/sk:review/references/security-checklist.md +223 -0
  46. package/skills/sk:schema-migrate/SKILL.md +125 -0
  47. package/skills/sk:schema-migrate/orms/drizzle.md +546 -0
  48. package/skills/sk:schema-migrate/orms/laravel.md +367 -0
  49. package/skills/sk:schema-migrate/orms/prisma.md +357 -0
  50. package/skills/sk:schema-migrate/orms/rails.md +351 -0
  51. package/skills/sk:schema-migrate/orms/sqlalchemy.md +385 -0
  52. package/skills/sk:schema-migrate/references/detection.md +110 -0
  53. package/skills/sk:setup-claude/SKILL.md +365 -0
  54. package/skills/sk:setup-claude/references/detection.md +6 -0
  55. package/skills/sk:setup-claude/references/templates.md +11 -0
  56. package/skills/sk:setup-claude/scripts/apply_setup_claude.py +443 -0
  57. package/skills/sk:setup-claude/scripts/detect_arch_changes.py +437 -0
  58. package/skills/sk:setup-claude/templates/.claude/docs/arch-changelog-guide.md.template +6 -0
  59. package/skills/sk:setup-claude/templates/.claude/docs/changelog-guide.md.template +12 -0
  60. package/skills/sk:setup-claude/templates/CHANGELOG.md.template +21 -0
  61. package/skills/sk:setup-claude/templates/CLAUDE.md.template +299 -0
  62. package/skills/sk:setup-claude/templates/arch-changelog-guide.md.template +3 -0
  63. package/skills/sk:setup-claude/templates/changelog-guide.md.template +3 -0
  64. package/skills/sk:setup-claude/templates/commands/brainstorm.md.template +74 -0
  65. package/skills/sk:setup-claude/templates/commands/execute-plan.md.template +57 -0
  66. package/skills/sk:setup-claude/templates/commands/features.md.template +238 -0
  67. package/skills/sk:setup-claude/templates/commands/finish-feature.md.template +155 -0
  68. package/skills/sk:setup-claude/templates/commands/plan.md.template +30 -0
  69. package/skills/sk:setup-claude/templates/commands/re-setup.md.template +38 -0
  70. package/skills/sk:setup-claude/templates/commands/release.md.template +74 -0
  71. package/skills/sk:setup-claude/templates/commands/security-check.md.template +172 -0
  72. package/skills/sk:setup-claude/templates/commands/status.md.template +17 -0
  73. package/skills/sk:setup-claude/templates/commands/write-plan.md.template +34 -0
  74. package/skills/sk:setup-claude/templates/finish-feature.md.template +3 -0
  75. package/skills/sk:setup-claude/templates/plan.md.template +3 -0
  76. package/skills/sk:setup-claude/templates/status.md.template +3 -0
  77. package/skills/sk:setup-claude/templates/tasks/findings.md.template +19 -0
  78. package/skills/sk:setup-claude/templates/tasks/lessons.md.template +26 -0
  79. package/skills/sk:setup-claude/templates/tasks/progress.md.template +20 -0
  80. package/skills/sk:setup-claude/templates/tasks/security-findings.md.template +5 -0
  81. package/skills/sk:setup-claude/templates/tasks/todo.md.template +26 -0
  82. package/skills/sk:setup-claude/templates/tasks/workflow-status.md.template +31 -0
  83. package/skills/sk:setup-claude/templates/tasks-findings.md.template +3 -0
  84. package/skills/sk:setup-claude/templates/tasks-lessons.md.template +3 -0
  85. package/skills/sk:setup-claude/templates/tasks-progress.md.template +3 -0
  86. package/skills/sk:setup-claude/templates/tasks-todo.md.template +3 -0
  87. package/skills/sk:setup-claude/tests/test_apply_setup_claude.py +193 -0
  88. package/skills/sk:setup-optimizer/SKILL.md +184 -0
  89. package/skills/sk:setup-optimizer/lib/__init__.py +24 -0
  90. package/skills/sk:setup-optimizer/lib/detect.py +205 -0
  91. package/skills/sk:setup-optimizer/lib/discover.py +221 -0
  92. package/skills/sk:setup-optimizer/lib/enrich.py +163 -0
  93. package/skills/sk:setup-optimizer/lib/merge.py +277 -0
  94. package/skills/sk:setup-optimizer/lib/sidecar.py +129 -0
  95. package/skills/sk:setup-optimizer/optimize_claude.py +174 -0
  96. package/skills/sk:setup-optimizer/templates/CLAUDE.md.template +105 -0
  97. package/skills/sk:skill-creator/LICENSE.txt +202 -0
  98. package/skills/sk:skill-creator/SKILL.md +479 -0
  99. package/skills/sk:skill-creator/agents/analyzer.md +274 -0
  100. package/skills/sk:skill-creator/agents/comparator.md +202 -0
  101. package/skills/sk:skill-creator/agents/grader.md +223 -0
  102. package/skills/sk:skill-creator/assets/eval_review.html +146 -0
  103. package/skills/sk:skill-creator/eval-viewer/generate_review.py +471 -0
  104. package/skills/sk:skill-creator/eval-viewer/viewer.html +1325 -0
  105. package/skills/sk:skill-creator/references/schemas.md +430 -0
  106. package/skills/sk:skill-creator/scripts/aggregate_benchmark.py +401 -0
  107. package/skills/sk:skill-creator/scripts/generate_report.py +326 -0
  108. package/skills/sk:skill-creator/scripts/improve_description.py +248 -0
  109. package/skills/sk:skill-creator/scripts/package_skill.py +136 -0
  110. package/skills/sk:skill-creator/scripts/quick_validate.py +103 -0
  111. package/skills/sk:skill-creator/scripts/run_eval.py +310 -0
  112. package/skills/sk:skill-creator/scripts/run_loop.py +332 -0
  113. package/skills/sk:skill-creator/scripts/utils.py +47 -0
  114. package/skills/sk:smart-commit/SKILL.md +175 -0
  115. package/skills/sk:test/SKILL.md +171 -0
  116. package/skills/sk:write-tests/SKILL.md +195 -0
  117. package/skills/sk:write-tests/references/patterns.md +209 -0
@@ -0,0 +1,150 @@
1
+ ---
2
+ name: sk:accessibility
3
+ description: WCAG 2.1 AA accessibility audit. Use after /sk:frontend-design or on existing frontend code to catch accessibility issues before implementation or before shipping. Reports findings — does NOT fix code.
4
+ license: Complete terms in LICENSE.txt
5
+ ---
6
+
7
+ ## Purpose
8
+
9
+ Audit the frontend design spec or existing UI code for WCAG 2.1 AA compliance. This is an audit skill — it identifies issues and produces a findings report. It does NOT fix code.
10
+
11
+ Run this skill:
12
+ - **After `/sk:frontend-design`** — validate the design spec before implementation starts
13
+ - **Before `/sk:finish-feature`** — validate the implemented UI before merging
14
+ - **On existing code** — audit any frontend code or component
15
+
16
+ ## Hard Rules
17
+
18
+ - **DO NOT fix code.** Report only. The user decides what to fix.
19
+ - **Every finding must cite a specific design spec section, file, or component.**
20
+ - **Every finding must reference the WCAG criterion it violates** (e.g., WCAG 1.4.3).
21
+ - **Skip if the task is backend-only** — ask "Is there any frontend component?" before proceeding.
22
+
23
+ ## Before You Start
24
+
25
+ 1. Determine scope: design spec (from `/sk:frontend-design` output) or existing code files?
26
+ 2. If auditing code: `git diff main..HEAD --name-only` to find changed frontend files.
27
+ 3. If `tasks/accessibility-findings.md` exists, read it — check if prior findings have been addressed.
28
+ 4. If `tasks/lessons.md` exists, read it — apply accessibility-related lessons as targeted checks.
29
+
30
+ ## Audit Checklist
31
+
32
+ ### 1. Color & Contrast (WCAG 1.4.3, 1.4.11)
33
+ - Normal text (< 18px / < 14px bold): minimum **4.5:1** contrast ratio against background
34
+ - Large text (≥ 18px or ≥ 14px bold): minimum **3:1** contrast ratio
35
+ - UI components and graphical objects (borders, icons, chart elements): minimum **3:1**
36
+ - Check all color palette combinations from the design spec
37
+ - Verify disabled states are still distinguishable (not just greyed out with no other indicator)
38
+
39
+ ### 2. Keyboard Navigation (WCAG 2.1.1, 2.1.2, 2.4.3, 2.4.7)
40
+ - All interactive elements reachable by Tab key
41
+ - Logical tab order (follows visual reading order)
42
+ - No keyboard traps (user can always navigate away)
43
+ - Visible focus indicator on all interactive elements (not removed with `outline: none` without replacement)
44
+ - Modal/dialog focus management: focus moves into modal on open, returns to trigger on close
45
+ - Skip navigation link present for pages with repeated navigation
46
+
47
+ ### 3. ARIA & Semantics (WCAG 4.1.2, 1.3.1)
48
+ - Semantic HTML first (`<button>`, `<nav>`, `<main>`, `<header>`) — ARIA only when HTML is insufficient
49
+ - All interactive elements have accessible names (via label, aria-label, or aria-labelledby)
50
+ - Icons-only buttons have `aria-label` or visually hidden text
51
+ - Dynamic content updates announced via `aria-live` regions where appropriate
52
+ - No invalid ARIA roles or attributes
53
+ - Form inputs associated with labels (via `<label for>` or `aria-labelledby`)
54
+
55
+ ### 4. Images & Media (WCAG 1.1.1, 1.2.x)
56
+ - Informative images have descriptive `alt` text
57
+ - Decorative images have `alt=""` (empty alt, not missing)
58
+ - Complex images (charts, diagrams) have long descriptions
59
+ - Videos have captions; audio has transcripts
60
+
61
+ ### 5. Forms (WCAG 1.3.5, 3.3.1, 3.3.2)
62
+ - All fields have visible labels (not just placeholder text — placeholders disappear on input)
63
+ - Required fields indicated (not by color alone)
64
+ - Error messages: specific, descriptive, associated with the field (`aria-describedby`)
65
+ - Error messages do not disappear on blur
66
+ - Autocomplete attributes on common fields (`name`, `email`, `tel`, etc.)
67
+
68
+ ### 6. Motion & Animation (WCAG 2.3.1, 2.3.3)
69
+ - No content flashes more than 3 times per second
70
+ - All non-essential animations respect `prefers-reduced-motion` media query
71
+ - Auto-playing animations can be paused, stopped, or hidden
72
+
73
+ ### 7. Content & Structure (WCAG 1.3.1, 2.4.6, 2.4.2)
74
+ - Single `<h1>` per page; heading hierarchy is logical (no skipped levels)
75
+ - Page has a descriptive `<title>`
76
+ - Link text is descriptive standalone ("Read the docs" not "Click here")
77
+ - Tables have `<th>` headers with appropriate scope
78
+ - Language declared (`<html lang="en">`)
79
+
80
+ ## Generate Report
81
+
82
+ Write findings to `tasks/accessibility-findings.md`:
83
+
84
+ ```markdown
85
+ # Accessibility Audit — YYYY-MM-DD
86
+
87
+ **Scope:** [design spec | changed files on branch `<branch>`]
88
+ **Standard:** WCAG 2.1 AA
89
+
90
+ ## Failures (must fix)
91
+
92
+ - **[Component/File:Line]** Description
93
+ **Criterion:** WCAG X.X.X — [Name]
94
+ **Impact:** [Who is affected and how]
95
+ **Recommendation:** [How to fix]
96
+
97
+ ## Warnings (should fix)
98
+
99
+ - **[Component/File:Line]** Description
100
+ **Criterion:** WCAG X.X.X — [Name]
101
+ **Recommendation:** [How to fix]
102
+
103
+ ## Manual Checks Required
104
+
105
+ - [Things that require human/screen reader testing]
106
+
107
+ ## Passed Checks
108
+
109
+ - [Categories that passed with no findings]
110
+
111
+ ## Summary
112
+
113
+ | Level | Count |
114
+ |----------|-------|
115
+ | Failures | N |
116
+ | Warnings | N |
117
+ | Manual | N |
118
+ ```
119
+
120
+ **Never overwrite** `tasks/accessibility-findings.md` — append new audits with a date header.
121
+
122
+ ## When Done
123
+
124
+ Tell the user:
125
+
126
+ > "Accessibility audit complete. Findings saved to `tasks/accessibility-findings.md`.
127
+ > - **Failures:** N | **Warnings:** N | **Manual checks:** N
128
+ >
129
+ > Address failures before implementation, then run `/sk:write-plan` to proceed."
130
+
131
+ If there are no failures:
132
+ > "No accessibility failures found. N warnings noted. Run `/sk:write-plan` to proceed."
133
+
134
+ ---
135
+
136
+ ## Model Routing
137
+
138
+ Read `.shipkit/sk:config.json` from the project root if it exists.
139
+
140
+ - If `model_overrides["sk:accessibility"]` is set, use that model — it takes precedence.
141
+ - Otherwise use the `profile` field. Default: `balanced`.
142
+
143
+ | Profile | Model |
144
+ |---------|-------|
145
+ | `full-sail` | sonnet |
146
+ | `quality` | sonnet |
147
+ | `balanced` | sonnet |
148
+ | `budget` | haiku |
149
+
150
+ > `opus` = inherit (uses the current session model). When spawning sub-agents via the Agent tool, pass `model: "<resolved-model>"`.
@@ -0,0 +1,177 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
@@ -0,0 +1,158 @@
1
+ ---
2
+ name: sk:api-design
3
+ description: Design REST or GraphQL API contracts before implementation. Use this skill when the user needs to design API endpoints, request/response shapes, authentication patterns, error codes, or data contracts. Produces an API specification — NOT code.
4
+ license: Complete terms in LICENSE.txt
5
+ ---
6
+
7
+ ## CRITICAL: Design Phase Only — NO CODE
8
+
9
+ **This skill is a design phase, not an implementation phase.**
10
+
11
+ - **DO NOT** write, edit, or generate any code (no controllers, routes, models, migrations)
12
+ - **DO NOT** use file editing tools (Edit, Write, Bash)
13
+ - **DO produce** endpoint contracts, request/response shapes, error codes, auth flows, and data models
14
+ - Implementation happens in `/sk:execute-plan` — not here
15
+
16
+ This skill designs clear, consistent API contracts that `/sk:write-plan` and `/sk:execute-plan` can implement without ambiguity.
17
+
18
+ ## Before You Start
19
+
20
+ 1. If `tasks/findings.md` exists and has content, read it in full. Use the agreed approach and requirements as the design brief.
21
+ 2. If `tasks/lessons.md` exists, read it in full. Apply every active lesson as a constraint — particularly patterns flagged under **Bug** that relate to API structure, auth, or data validation.
22
+
23
+ ## API Context
24
+
25
+ Establish these before designing:
26
+
27
+ - **API type**: REST, GraphQL, or both?
28
+ - **Consumers**: Who calls this API? (web app, mobile app, third-party, internal service)
29
+ - **Auth method**: JWT, API key, OAuth2, session cookie, or none?
30
+ - **Versioning strategy**: URL prefix (`/v1/`), header (`Accept-Version`), or none?
31
+ - **Transport**: HTTPS only. No exceptions.
32
+
33
+ If context is unclear from `tasks/findings.md`, ask the user before proceeding.
34
+
35
+ ## Design Thinking
36
+
37
+ Before designing endpoints, model the domain:
38
+
39
+ - **Resources**: What are the core entities? (e.g., User, Order, Product)
40
+ - **Relationships**: How do resources relate? (ownership, nesting, references)
41
+ - **Actions**: What operations exist? (CRUD + custom actions like `/publish`, `/archive`)
42
+ - **Invariants**: What rules can never be violated? (e.g., a published post can't be deleted)
43
+
44
+ **CRITICAL**: Design for the consumer, not the database. An API that mirrors the database schema 1:1 is usually wrong — design for what clients actually need.
45
+
46
+ ## API Design Guidelines
47
+
48
+ ### REST Endpoints
49
+ - **Nouns, not verbs** in URLs: `/orders` not `/getOrders`
50
+ - **Plural resources**: `/users`, `/posts`, `/comments`
51
+ - **Nested only one level deep**: `/users/{id}/orders` ✓ — `/users/{id}/orders/{id}/items` ✗ (use `/order-items?orderId=`)
52
+ - **HTTP methods map to actions**: GET (read), POST (create), PUT (full replace), PATCH (partial update), DELETE (remove)
53
+ - **Custom actions**: use POST + verb suffix: `POST /orders/{id}/cancel`
54
+
55
+ ### Request Design
56
+ - Use JSON request bodies for POST/PUT/PATCH
57
+ - URL params for resource IDs
58
+ - Query params for filtering, sorting, pagination
59
+ - Headers for auth tokens and content negotiation
60
+
61
+ ### Response Design
62
+ - Consistent envelope: `{ data, meta, errors }` or resource-direct — pick one and use it everywhere
63
+ - Pagination: `{ data: [...], meta: { total, page, per_page, last_page } }`
64
+ - Timestamps: ISO 8601 (`2026-03-15T22:00:00Z`)
65
+ - IDs: strings (not integers) — avoids enumeration attacks
66
+
67
+ ### Status Codes
68
+ - `200` OK (GET, PUT, PATCH success)
69
+ - `201` Created (POST success)
70
+ - `204` No Content (DELETE success)
71
+ - `400` Bad Request (validation failure)
72
+ - `401` Unauthenticated (missing/invalid token)
73
+ - `403` Forbidden (authenticated but not authorized)
74
+ - `404` Not Found
75
+ - `409` Conflict (duplicate, state violation)
76
+ - `422` Unprocessable Entity (business rule violation)
77
+ - `429` Too Many Requests (rate limited)
78
+ - `500` Internal Server Error
79
+
80
+ ### Error Format
81
+ Standardize error responses:
82
+ ```json
83
+ {
84
+ "errors": [
85
+ {
86
+ "code": "VALIDATION_FAILED",
87
+ "field": "email",
88
+ "message": "Email is already taken"
89
+ }
90
+ ]
91
+ }
92
+ ```
93
+
94
+ ### Auth Design
95
+ - JWT: short-lived access token (15min–1hr) + refresh token (7–30 days)
96
+ - API keys: prefix with service identifier (`sk_live_`, `pk_test_`)
97
+ - Never return tokens in URL params — headers or response body only
98
+ - Document which endpoints require auth and what permissions
99
+
100
+ ### Rate Limiting
101
+ - Define limits per endpoint tier (public, authenticated, admin)
102
+ - Return `Retry-After` header on `429`
103
+
104
+ ## Output Format
105
+
106
+ End every `/sk:api-design` session with a structured specification:
107
+
108
+ ```
109
+ ## API Design Specification
110
+
111
+ ### Overview
112
+ [API purpose, consumers, base URL pattern, versioning approach]
113
+
114
+ ### Authentication
115
+ [Auth method, token format, how to include in requests, refresh flow]
116
+
117
+ ### Resource Models
118
+ [Core entities with their fields, types, and constraints]
119
+
120
+ ### Endpoints
121
+
122
+ | Method | Path | Auth | Description |
123
+ |--------|------|------|-------------|
124
+ | GET | /v1/resource | required | List resources |
125
+ | ... | ... | ... | ... |
126
+
127
+ ### Endpoint Details
128
+ [For each endpoint: request params/body shape, success response shape, error cases]
129
+
130
+ ### Error Codes Reference
131
+ [Application-specific error codes and when they occur]
132
+
133
+ ### Rate Limits
134
+ [Per-tier limits, headers returned]
135
+
136
+ ### Versioning & Breaking Changes
137
+ [What constitutes a breaking change, deprecation policy]
138
+ ```
139
+
140
+ After presenting the specification, tell the user: **"Run `/sk:write-plan` to turn this into an implementation plan."**
141
+
142
+ ---
143
+
144
+ ## Model Routing
145
+
146
+ Read `.shipkit/sk:config.json` from the project root if it exists.
147
+
148
+ - If `model_overrides["sk:api-design"]` is set, use that model — it takes precedence.
149
+ - Otherwise use the `profile` field. Default: `balanced`.
150
+
151
+ | Profile | Model |
152
+ |---------|-------|
153
+ | `full-sail` | opus (inherit) |
154
+ | `quality` | opus (inherit) |
155
+ | `balanced` | sonnet |
156
+ | `budget` | sonnet |
157
+
158
+ > `opus` = inherit (uses the current session model). When spawning sub-agents via the Agent tool, pass `model: "<resolved-model>"`.
@@ -0,0 +1,124 @@
1
+ ---
2
+ name: sk:brainstorming
3
+ description: "You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation."
4
+ ---
5
+
6
+ # Brainstorming Ideas Into Designs
7
+
8
+ ## Overview
9
+
10
+ Help turn ideas into fully formed designs and specs through natural collaborative dialogue.
11
+
12
+ Start by understanding the current project context, then ask questions one at a time to refine the idea. Once you understand what you're building, present the design and get user approval.
13
+
14
+ <HARD-GATE>
15
+ Do NOT invoke any implementation skill, write any code, scaffold any project, or take any implementation action until you have presented a design and the user has approved it. This applies to EVERY project regardless of perceived simplicity.
16
+ </HARD-GATE>
17
+
18
+ ## Anti-Pattern: "This Is Too Simple To Need A Design"
19
+
20
+ Every project goes through this process. A todo list, a single-function utility, a config change — all of them. "Simple" projects are where unexamined assumptions cause the most wasted work. The design can be short (a few sentences for truly simple projects), but you MUST present it and get approval.
21
+
22
+ ## Checklist
23
+
24
+ You MUST create a task for each of these items and complete them in order:
25
+
26
+ 1. **Explore project context** — read `tasks/findings.md` and `tasks/lessons.md` if they exist, then check files, docs, recent commits
27
+ 2. **Ask clarifying questions** — one at a time, understand purpose/constraints/success criteria
28
+ 3. **Propose 2-3 approaches** — with trade-offs and your recommendation
29
+ 4. **Present design** — in sections scaled to their complexity, get user approval after each section
30
+ 5. **Write findings** — Save the agreed-upon direction to `tasks/findings.md`:
31
+ - Problem statement
32
+ - Key decisions made
33
+ - Chosen approach + rationale
34
+ - Open questions (if any remain)
35
+ (Optionally also write a full design doc to docs/plans/YYYY-MM-DD-<topic>-design.md)
36
+ 6. **Transition to implementation** — invoke writing-plans skill to create implementation plan
37
+
38
+ ## Process Flow
39
+
40
+ ```dot
41
+ digraph brainstorming {
42
+ "Explore project context" [shape=box];
43
+ "Ask clarifying questions" [shape=box];
44
+ "Propose 2-3 approaches" [shape=box];
45
+ "Present design sections" [shape=box];
46
+ "User approves design?" [shape=diamond];
47
+ "Write design doc" [shape=box];
48
+ "Invoke writing-plans skill" [shape=doublecircle];
49
+
50
+ "Explore project context" -> "Ask clarifying questions";
51
+ "Ask clarifying questions" -> "Propose 2-3 approaches";
52
+ "Propose 2-3 approaches" -> "Present design sections";
53
+ "Present design sections" -> "User approves design?";
54
+ "User approves design?" -> "Present design sections" [label="no, revise"];
55
+ "User approves design?" -> "Write design doc" [label="yes"];
56
+ "Write design doc" -> "Invoke writing-plans skill";
57
+ }
58
+ ```
59
+
60
+ **The terminal state is invoking writing-plans.** Do NOT invoke frontend-design, mcp-builder, or any other implementation skill. The ONLY skill you invoke after brainstorming is writing-plans.
61
+
62
+ ## The Process
63
+
64
+ **Understanding the idea:**
65
+ - If `tasks/findings.md` exists and has content, read it in full. Summarize the prior
66
+ decisions to the user and ask: extend, revise, or start fresh? Do not re-explore
67
+ what is already decided unless the user asks.
68
+ - If `tasks/lessons.md` exists, read it in full. Apply every active lesson as a design
69
+ constraint throughout the brainstorm — particularly prevention rules when proposing approaches.
70
+ - Check out the current project state first (files, docs, recent commits)
71
+ - Ask questions one at a time to refine the idea
72
+ - Prefer multiple choice questions when possible, but open-ended is fine too
73
+ - Only one question per message - if a topic needs more exploration, break it into multiple questions
74
+ - Focus on understanding: purpose, constraints, success criteria
75
+
76
+ **Exploring approaches:**
77
+ - Propose 2-3 different approaches with trade-offs
78
+ - Present options conversationally with your recommendation and reasoning
79
+ - Lead with your recommended option and explain why
80
+
81
+ **Presenting the design:**
82
+ - Once you believe you understand what you're building, present the design
83
+ - Scale each section to its complexity: a few sentences if straightforward, up to 200-300 words if nuanced
84
+ - Ask after each section whether it looks right so far
85
+ - Cover: architecture, components, data flow, error handling, testing
86
+ - Be ready to go back and clarify if something doesn't make sense
87
+
88
+ ## After the Design
89
+
90
+ **Documentation:**
91
+ - Write the findings to `tasks/findings.md` (required — captures problem, decisions, approach, rationale)
92
+ - Optionally: Create a full design doc at `docs/plans/YYYY-MM-DD-<topic>-design.md` for complex projects
93
+ - Commit the findings and any design document to git
94
+
95
+ **Implementation:**
96
+ - Invoke the writing-plans skill to create a detailed implementation plan
97
+ - Do NOT invoke any other skill. writing-plans is the next step.
98
+
99
+ ## Key Principles
100
+
101
+ - **One question at a time** - Don't overwhelm with multiple questions
102
+ - **Multiple choice preferred** - Easier to answer than open-ended when possible
103
+ - **YAGNI ruthlessly** - Remove unnecessary features from all designs
104
+ - **Explore alternatives** - Always propose 2-3 approaches before settling
105
+ - **Incremental validation** - Present design, get approval before moving on
106
+ - **Be flexible** - Go back and clarify when something doesn't make sense
107
+
108
+ ---
109
+
110
+ ## Model Routing
111
+
112
+ Read `.shipkit/sk:config.json` from the project root if it exists.
113
+
114
+ - If `model_overrides["sk:brainstorming"]` is set, use that model — it takes precedence.
115
+ - Otherwise use the `profile` field. Default: `balanced`.
116
+
117
+ | Profile | Model |
118
+ |---------|-------|
119
+ | `full-sail` | opus (inherit) |
120
+ | `quality` | opus (inherit) |
121
+ | `balanced` | sonnet |
122
+ | `budget` | sonnet |
123
+
124
+ > `opus` = inherit (uses the current session model). When spawning sub-agents via the Agent tool, pass `model: "<resolved-model>"`.