@erclx/aitk 0.8.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 (359) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +99 -0
  3. package/claude/.claude-plugin/plugin.json +19 -0
  4. package/claude/skills/bash-script/SKILL.md +96 -0
  5. package/claude/skills/bash-script/references/patterns.md +349 -0
  6. package/claude/skills/ci-workflow/SKILL.md +52 -0
  7. package/claude/skills/ci-workflow/references/workflows.md +74 -0
  8. package/claude/skills/claude-address-review/SKILL.md +107 -0
  9. package/claude/skills/claude-autoship/SKILL.md +137 -0
  10. package/claude/skills/claude-design-extract/SKILL.md +69 -0
  11. package/claude/skills/claude-design-propose/SKILL.md +75 -0
  12. package/claude/skills/claude-diagram/SKILL.md +126 -0
  13. package/claude/skills/claude-docs/SKILL.md +204 -0
  14. package/claude/skills/claude-feature/REQUIREMENT.md +35 -0
  15. package/claude/skills/claude-feature/SKILL.md +148 -0
  16. package/claude/skills/claude-groundwork/SKILL.md +148 -0
  17. package/claude/skills/claude-groundwork/references/folder-format.md +107 -0
  18. package/claude/skills/claude-memory-capture/SKILL.md +80 -0
  19. package/claude/skills/claude-memory-review/REQUIREMENT.md +37 -0
  20. package/claude/skills/claude-memory-review/SKILL.md +206 -0
  21. package/claude/skills/claude-orchestrate/SKILL.md +125 -0
  22. package/claude/skills/claude-pr-review/SKILL.md +150 -0
  23. package/claude/skills/claude-review/SKILL.md +136 -0
  24. package/claude/skills/claude-roadmap/SKILL.md +61 -0
  25. package/claude/skills/claude-roadmap/references/roadmap.md +52 -0
  26. package/claude/skills/claude-screencast/SKILL.md +160 -0
  27. package/claude/skills/claude-seed-sync/SKILL.md +141 -0
  28. package/claude/skills/claude-slides-draft/SKILL.md +62 -0
  29. package/claude/skills/claude-standards-audit/REQUIREMENT.md +33 -0
  30. package/claude/skills/claude-standards-audit/SKILL.md +79 -0
  31. package/claude/skills/claude-standards-audit/references/branch.md +49 -0
  32. package/claude/skills/claude-standards-audit/references/pr.md +124 -0
  33. package/claude/skills/claude-tasks/SKILL.md +123 -0
  34. package/claude/skills/claude-ui-test/SKILL.md +75 -0
  35. package/claude/skills/claude-ux-audit/SKILL.md +78 -0
  36. package/claude/skills/claude-worktree/SKILL.md +79 -0
  37. package/claude/skills/cli-script/SKILL.md +47 -0
  38. package/claude/skills/cli-script/references/template.md +43 -0
  39. package/claude/skills/create-rule/SKILL.md +68 -0
  40. package/claude/skills/create-skill/REQUIREMENT.md +30 -0
  41. package/claude/skills/create-skill/SKILL.md +24 -0
  42. package/claude/skills/create-snippet/SKILL.md +28 -0
  43. package/claude/skills/create-snippet/references/snippets.md +57 -0
  44. package/claude/skills/create-standard/SKILL.md +31 -0
  45. package/claude/skills/create-standard/references/standard.md +52 -0
  46. package/claude/skills/docs-sync/SKILL.md +87 -0
  47. package/claude/skills/git-branch/REQUIREMENT.md +38 -0
  48. package/claude/skills/git-branch/SKILL.md +60 -0
  49. package/claude/skills/git-branch/references/branch.md +49 -0
  50. package/claude/skills/git-commit/REQUIREMENT.md +33 -0
  51. package/claude/skills/git-commit/SKILL.md +51 -0
  52. package/claude/skills/git-commit/references/commit.md +63 -0
  53. package/claude/skills/git-followup/REQUIREMENT.md +38 -0
  54. package/claude/skills/git-followup/SKILL.md +35 -0
  55. package/claude/skills/git-issue/REQUIREMENT.md +38 -0
  56. package/claude/skills/git-issue/SKILL.md +69 -0
  57. package/claude/skills/git-issue/references/issue.md +84 -0
  58. package/claude/skills/git-pr/REQUIREMENT.md +37 -0
  59. package/claude/skills/git-pr/SKILL.md +119 -0
  60. package/claude/skills/git-pr/references/branch.md +49 -0
  61. package/claude/skills/git-pr/references/pr.md +124 -0
  62. package/claude/skills/git-ship/REQUIREMENT.md +34 -0
  63. package/claude/skills/git-ship/SKILL.md +39 -0
  64. package/claude/skills/git-split/REQUIREMENT.md +38 -0
  65. package/claude/skills/git-split/SKILL.md +160 -0
  66. package/claude/skills/git-split/references/branch.md +49 -0
  67. package/claude/skills/git-split/references/pr.md +124 -0
  68. package/claude/skills/git-stage/REQUIREMENT.md +36 -0
  69. package/claude/skills/git-stage/SKILL.md +74 -0
  70. package/claude/skills/git-stage/references/commit.md +63 -0
  71. package/claude/skills/git-worktree/REQUIREMENT.md +37 -0
  72. package/claude/skills/git-worktree/SKILL.md +120 -0
  73. package/claude/skills/migration-claude-md/SKILL.md +74 -0
  74. package/claude/skills/migration-context/SKILL.md +93 -0
  75. package/claude/skills/migration-standards/SKILL.md +75 -0
  76. package/claude/skills/project-commands/SKILL.md +73 -0
  77. package/claude/skills/session-resume/SKILL.md +36 -0
  78. package/claude/skills/setup-gov/SKILL.md +71 -0
  79. package/claude/skills/setup-indexes/SKILL.md +148 -0
  80. package/claude/skills/setup-init/SKILL.md +114 -0
  81. package/claude/skills/setup-plugins/SKILL.md +81 -0
  82. package/claude/skills/setup-plugins/references/plugin-catalog.md +53 -0
  83. package/claude/skills/setup-verify/SKILL.md +51 -0
  84. package/claude/skills/systematic-debugging/SKILL.md +70 -0
  85. package/claude/skills/toolkit-cli/SKILL.md +38 -0
  86. package/claude/skills/toolkit-feedback/SKILL.md +80 -0
  87. package/claude/skills/toolkit-operator/SKILL.md +45 -0
  88. package/claude/skills/toolkit-triage/SKILL.md +63 -0
  89. package/claude/skills/youtube-transcripts/SKILL.md +34 -0
  90. package/docs/agents.md +371 -0
  91. package/docs/ai-workflow.md +157 -0
  92. package/docs/index.md +20 -0
  93. package/docs/operating-model.md +106 -0
  94. package/docs/target-projects.md +183 -0
  95. package/docs/visual-design-workflow.md +136 -0
  96. package/docs/zshrc-aliases.md +65 -0
  97. package/governance/rules/claude/500-prose.md +12 -0
  98. package/governance/rules/claude/510-context.md +16 -0
  99. package/governance/rules/claude/520-wireframes.md +12 -0
  100. package/governance/rules/claude/530-requirements.md +11 -0
  101. package/governance/rules/claude/540-architecture.md +11 -0
  102. package/governance/rules/claude/550-design.md +11 -0
  103. package/governance/rules/claude/555-tasks.md +12 -0
  104. package/governance/rules/claude/560-diagrams.md +11 -0
  105. package/governance/rules/claude/570-skill.md +18 -0
  106. package/governance/rules/claude/580-readme.md +11 -0
  107. package/governance/rules/claude/590-rule-authoring.md +12 -0
  108. package/governance/rules/core/000-constitution.md +30 -0
  109. package/governance/rules/core/010-testing.md +35 -0
  110. package/governance/rules/core/020-concurrency.md +22 -0
  111. package/governance/rules/core/030-error-handling.md +31 -0
  112. package/governance/rules/core/040-performance.md +20 -0
  113. package/governance/rules/core/050-logging.md +20 -0
  114. package/governance/rules/core/060-naming.md +19 -0
  115. package/governance/rules/core/070-planning.md +13 -0
  116. package/governance/rules/core/080-config-comments.md +22 -0
  117. package/governance/rules/framework/200-react.md +51 -0
  118. package/governance/rules/framework/210-astro.md +41 -0
  119. package/governance/rules/framework/220-fastapi.md +43 -0
  120. package/governance/rules/framework/230-nextjs.md +48 -0
  121. package/governance/rules/framework/250-tailwind.md +32 -0
  122. package/governance/rules/framework/260-shadcn.md +34 -0
  123. package/governance/rules/lang/100-typescript.md +40 -0
  124. package/governance/rules/lang/110-python.md +42 -0
  125. package/governance/rules/lib/300-testing-ts.md +38 -0
  126. package/governance/rules/lib/310-zod.md +25 -0
  127. package/governance/rules/lib/320-tanstack-query.md +32 -0
  128. package/governance/rules/lib/330-testing-py.md +44 -0
  129. package/governance/rules/lib/340-pydantic.md +38 -0
  130. package/governance/rules/lib/350-security-web.md +31 -0
  131. package/governance/rules/ui/400-ui.md +34 -0
  132. package/governance/rules/ui/410-a11y.md +44 -0
  133. package/governance/rules/ui/420-forms.md +34 -0
  134. package/governance/rules/ui/430-ux-completeness.md +62 -0
  135. package/governance/stacks/astro.toml +2 -0
  136. package/governance/stacks/base.toml +2 -0
  137. package/governance/stacks/node.toml +2 -0
  138. package/governance/stacks/python-fastapi.toml +2 -0
  139. package/governance/stacks/python.toml +2 -0
  140. package/governance/stacks/react.toml +2 -0
  141. package/package.json +67 -0
  142. package/scripts/config.sh +11 -0
  143. package/scripts/core/bootstrap.sh +81 -0
  144. package/scripts/core/check-plugin-boundary.sh +45 -0
  145. package/scripts/core/check-skill-paths.sh +25 -0
  146. package/scripts/core/clean.sh +36 -0
  147. package/scripts/core/install-check.sh +93 -0
  148. package/scripts/core/regen-claude-copies.sh +26 -0
  149. package/scripts/core/regen-indexes.sh +10 -0
  150. package/scripts/core/regen-skill-references.sh +27 -0
  151. package/scripts/core/snapshot.sh +132 -0
  152. package/scripts/core/update.sh +35 -0
  153. package/scripts/core/verify.sh +201 -0
  154. package/scripts/docs/list.sh +129 -0
  155. package/scripts/gov/list.sh +234 -0
  156. package/scripts/lib/frontmatter.sh +30 -0
  157. package/scripts/lib/gov.sh +14 -0
  158. package/scripts/lib/sandbox-fixtures.sh +109 -0
  159. package/scripts/lib/sandbox-git.sh +73 -0
  160. package/scripts/lib/tooling.sh +24 -0
  161. package/scripts/lib/ui.sh +173 -0
  162. package/scripts/lib/worktree.sh +20 -0
  163. package/scripts/manage-sandbox.sh +453 -0
  164. package/scripts/snippets/create.sh +156 -0
  165. package/scripts/standards/list.sh +91 -0
  166. package/scripts/tooling/create.sh +109 -0
  167. package/scripts/tooling/ref.sh +141 -0
  168. package/scripts/tooling/verify.sh +179 -0
  169. package/snippets/claude/decision-memo.md +39 -0
  170. package/snippets/claude/feature-recap.md +19 -0
  171. package/snippets/claude/figma-steps.md +18 -0
  172. package/snippets/claude/orchestrator-resume.md +23 -0
  173. package/snippets/claude/orchestrator-sweep.md +10 -0
  174. package/snippets/compact-summary.md +5 -0
  175. package/snippets/create-snippet.md +7 -0
  176. package/snippets/decision-help.md +6 -0
  177. package/snippets/meta-prompt.md +14 -0
  178. package/snippets/research-prompt.md +7 -0
  179. package/snippets/session-notes.md +11 -0
  180. package/snippets/snippets.toml +6 -0
  181. package/snippets/step-by-step.md +10 -0
  182. package/snippets/web-research.md +21 -0
  183. package/src/claude/gitignore.ts +51 -0
  184. package/src/claude/seeds-list.ts +47 -0
  185. package/src/claude/seeds.ts +124 -0
  186. package/src/claude/settings.ts +151 -0
  187. package/src/cli-run.ts +43 -0
  188. package/src/cli.ts +111 -0
  189. package/src/commands/claude.ts +349 -0
  190. package/src/commands/design.ts +39 -0
  191. package/src/commands/docs.ts +59 -0
  192. package/src/commands/feedback-format.ts +23 -0
  193. package/src/commands/feedback.ts +103 -0
  194. package/src/commands/gov.ts +268 -0
  195. package/src/commands/indexes.ts +182 -0
  196. package/src/commands/init.ts +117 -0
  197. package/src/commands/pass-through.ts +39 -0
  198. package/src/commands/sandbox.ts +315 -0
  199. package/src/commands/slides.ts +106 -0
  200. package/src/commands/snippets.ts +236 -0
  201. package/src/commands/standards.ts +89 -0
  202. package/src/commands/sync.ts +211 -0
  203. package/src/commands/tasks.ts +185 -0
  204. package/src/commands/tooling.ts +432 -0
  205. package/src/commands/transcripts.ts +48 -0
  206. package/src/commands/wiki.ts +101 -0
  207. package/src/copy.ts +30 -0
  208. package/src/design/parse.ts +79 -0
  209. package/src/design/render.ts +170 -0
  210. package/src/docs/read.ts +59 -0
  211. package/src/exec.ts +17 -0
  212. package/src/frontmatter.ts +13 -0
  213. package/src/github-format.ts +13 -0
  214. package/src/github.ts +20 -0
  215. package/src/gov/adapter.ts +73 -0
  216. package/src/gov/install.ts +103 -0
  217. package/src/gov/payload.ts +39 -0
  218. package/src/gov/stacks.ts +124 -0
  219. package/src/indexes/frontmatter.ts +46 -0
  220. package/src/indexes/regen.ts +84 -0
  221. package/src/indexes/render.ts +181 -0
  222. package/src/indexes/walk.ts +111 -0
  223. package/src/init/flags.ts +66 -0
  224. package/src/init/plan.ts +128 -0
  225. package/src/init/run.ts +46 -0
  226. package/src/init/steps.ts +91 -0
  227. package/src/sandbox/coverage.ts +115 -0
  228. package/src/sandbox/expect.ts +412 -0
  229. package/src/slides/layouts.ts +391 -0
  230. package/src/slides/open.ts +18 -0
  231. package/src/slides/parse.ts +84 -0
  232. package/src/slides/render.ts +88 -0
  233. package/src/slides/styles.ts +44 -0
  234. package/src/snippets/adapter.ts +34 -0
  235. package/src/snippets/categories.ts +59 -0
  236. package/src/snippets/install.ts +125 -0
  237. package/src/snippets/list.ts +32 -0
  238. package/src/snippets/presets.ts +50 -0
  239. package/src/standards/adapter.ts +51 -0
  240. package/src/standards/index-refresh.ts +44 -0
  241. package/src/standards/install.ts +52 -0
  242. package/src/sync/check.ts +269 -0
  243. package/src/sync/engine.ts +416 -0
  244. package/src/sync/git.ts +204 -0
  245. package/src/sync/stamp.ts +202 -0
  246. package/src/sync/target.ts +79 -0
  247. package/src/sync/workflow.ts +201 -0
  248. package/src/target.ts +43 -0
  249. package/src/tasks/archive.ts +304 -0
  250. package/src/tooling/gitignore.ts +122 -0
  251. package/src/tooling/inject.ts +214 -0
  252. package/src/tooling/list.ts +39 -0
  253. package/src/tooling/manifest.ts +178 -0
  254. package/src/tooling/package.ts +166 -0
  255. package/src/tooling/scan.ts +186 -0
  256. package/src/transcripts/fetch.ts +156 -0
  257. package/src/transcripts/metadata.ts +54 -0
  258. package/src/transcripts/vtt.ts +114 -0
  259. package/src/ui.ts +187 -0
  260. package/src/wiki/init.ts +85 -0
  261. package/standards/architecture.md +41 -0
  262. package/standards/bundled/branch.md +49 -0
  263. package/standards/bundled/commit.md +63 -0
  264. package/standards/bundled/issue.md +84 -0
  265. package/standards/bundled/pr.md +124 -0
  266. package/standards/bundled/roadmap.md +52 -0
  267. package/standards/bundled/snippets.md +57 -0
  268. package/standards/bundled/standard.md +52 -0
  269. package/standards/context.md +132 -0
  270. package/standards/design.md +31 -0
  271. package/standards/diagrams.md +55 -0
  272. package/standards/index.md +21 -0
  273. package/standards/prose.md +122 -0
  274. package/standards/readme.md +163 -0
  275. package/standards/requirements.md +61 -0
  276. package/standards/rule.md +79 -0
  277. package/standards/skill.md +257 -0
  278. package/standards/tasks.md +140 -0
  279. package/standards/versioning.md +47 -0
  280. package/standards/wireframes.md +67 -0
  281. package/tooling/astro/configs/astro.config.mjs +17 -0
  282. package/tooling/astro/configs/eslint.config.js +79 -0
  283. package/tooling/astro/configs/playwright.config.ts +25 -0
  284. package/tooling/astro/configs/tsconfig.json +12 -0
  285. package/tooling/astro/configs/vitest.config.ts +22 -0
  286. package/tooling/astro/manifest.toml +32 -0
  287. package/tooling/astro/reference.md +60 -0
  288. package/tooling/base/configs/.editorconfig +5 -0
  289. package/tooling/base/configs/.github/pull_request_template.md +18 -0
  290. package/tooling/base/configs/.github/workflows/verify.yml +35 -0
  291. package/tooling/base/configs/.husky/commit-msg +1 -0
  292. package/tooling/base/configs/.husky/post-merge +61 -0
  293. package/tooling/base/configs/.husky/post-rewrite +21 -0
  294. package/tooling/base/configs/.husky/pre-commit +1 -0
  295. package/tooling/base/configs/.husky/pre-push +1 -0
  296. package/tooling/base/configs/.prettierrc +12 -0
  297. package/tooling/base/configs/.shellcheckrc +1 -0
  298. package/tooling/base/configs/.vscode/extensions.json +9 -0
  299. package/tooling/base/configs/.vscode/settings.json +3 -0
  300. package/tooling/base/configs/commitlint.config.js +11 -0
  301. package/tooling/base/configs/scripts/clean.sh +45 -0
  302. package/tooling/base/configs/scripts/update.sh +49 -0
  303. package/tooling/base/configs/scripts/verify.sh +64 -0
  304. package/tooling/base/manifest.toml +32 -0
  305. package/tooling/base/reference.md +114 -0
  306. package/tooling/base/seeds/.claude/context/ci.md +27 -0
  307. package/tooling/base/seeds/.claude/context/development.md +32 -0
  308. package/tooling/base/seeds/.cspell/project-terms.txt +0 -0
  309. package/tooling/base/seeds/.cspell/tech-stack.txt +19 -0
  310. package/tooling/base/seeds/.lintstagedrc +8 -0
  311. package/tooling/base/seeds/.prettierignore +0 -0
  312. package/tooling/base/seeds/cspell.json +20 -0
  313. package/tooling/claude/manifest.toml +11 -0
  314. package/tooling/claude/reference.md +62 -0
  315. package/tooling/claude/seeds/.claude/ARCHITECTURE.md +13 -0
  316. package/tooling/claude/seeds/.claude/DESIGN.md +62 -0
  317. package/tooling/claude/seeds/.claude/REQUIREMENTS.md +18 -0
  318. package/tooling/claude/seeds/.claude/context/index.md +8 -0
  319. package/tooling/claude/seeds/.claude/hooks/index-reminder.sh +43 -0
  320. package/tooling/claude/seeds/.claude/hooks/scratch-guard.sh +45 -0
  321. package/tooling/claude/seeds/.claude/hooks/standards-audit.sh +61 -0
  322. package/tooling/claude/seeds/.claude/hooks/tasks-index.sh +60 -0
  323. package/tooling/claude/seeds/.claude/settings.json +39 -0
  324. package/tooling/claude/seeds/.claude/tasks/index.md +8 -0
  325. package/tooling/claude/seeds/.claude/wireframes/index.md +8 -0
  326. package/tooling/claude/seeds/CLAUDE.md +87 -0
  327. package/tooling/claude/user/settings.template.json +10 -0
  328. package/tooling/claude/user/statusline-command.sh +53 -0
  329. package/tooling/python/configs/.coveragerc +14 -0
  330. package/tooling/python/configs/.python-version +1 -0
  331. package/tooling/python/configs/mypy.ini +6 -0
  332. package/tooling/python/configs/pytest.ini +4 -0
  333. package/tooling/python/configs/ruff.toml +15 -0
  334. package/tooling/python/configs/scripts/verify.sh +77 -0
  335. package/tooling/python/manifest.toml +16 -0
  336. package/tooling/python/reference.md +66 -0
  337. package/tooling/python/seeds/.cspell/tech-stack.txt +19 -0
  338. package/tooling/python/seeds/tests/test_smoke.py +2 -0
  339. package/tooling/vite-react/configs/playwright.config.ts +25 -0
  340. package/tooling/vite-react/configs/tsconfig.json +35 -0
  341. package/tooling/vite-react/configs/vite.config.ts +14 -0
  342. package/tooling/vite-react/configs/vitest.config.ts +26 -0
  343. package/tooling/vite-react/manifest.toml +21 -0
  344. package/tooling/vite-react/reference.md +55 -0
  345. package/tooling/vite-react/seeds/.cspell/project-terms.txt +1 -0
  346. package/tooling/vite-react/seeds/.cspell/tech-stack.txt +1 -0
  347. package/tooling/web/configs/.github/workflows/verify.yml +134 -0
  348. package/tooling/web/configs/.vscode/extensions.json +13 -0
  349. package/tooling/web/configs/.vscode/settings.json +10 -0
  350. package/tooling/web/configs/e2e/home.spec.ts +6 -0
  351. package/tooling/web/configs/e2e/screenshot.ts +41 -0
  352. package/tooling/web/configs/eslint.config.js +82 -0
  353. package/tooling/web/configs/scripts/screenshot.sh +28 -0
  354. package/tooling/web/configs/scripts/verify.sh +80 -0
  355. package/tooling/web/configs/src/test/setup.ts +8 -0
  356. package/tooling/web/manifest.toml +57 -0
  357. package/tooling/web/reference.md +95 -0
  358. package/tooling/web/seeds/.cspell/tech-stack.txt +18 -0
  359. package/tsconfig.json +14 -0
@@ -0,0 +1,43 @@
1
+ # Functional script template
2
+
3
+ Copy this skeleton for a non-interactive automation script. Keep only the parts the task needs.
4
+
5
+ ```bash
6
+ #!/usr/bin/env bash
7
+ set -euo pipefail
8
+
9
+ log() { printf '%s\n' "$*" >&2; }
10
+
11
+ die() {
12
+ printf 'error: %s\n' "$*" >&2
13
+ exit 1
14
+ }
15
+
16
+ usage() {
17
+ cat >&2 <<'EOF'
18
+ Usage: script.sh [options] <arg>
19
+ -h, --help Show this help
20
+ EOF
21
+ }
22
+
23
+ parse_args() {
24
+ while [ $# -gt 0 ]; do
25
+ case "$1" in
26
+ -h | --help)
27
+ usage
28
+ exit 0
29
+ ;;
30
+ -*) die "unknown option: $1" ;;
31
+ *) break ;;
32
+ esac
33
+ shift
34
+ done
35
+ }
36
+
37
+ main() {
38
+ parse_args "$@"
39
+ log "starting"
40
+ }
41
+
42
+ main "$@"
43
+ ```
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: create-rule
3
+ description: Scaffolds a project-specific governance rule into `.claude/rules/<subdir>/<n>-<slug>.md` with correct frontmatter and a non-colliding number. Use when asked to "add a rule", "create a governance rule", "write a project rule", or when a project needs a coding rule the toolkit does not ship. Do NOT use to edit toolkit source rules under `governance/rules/`.
4
+ ---
5
+
6
+ # Create rule
7
+
8
+ Author a project-local governance rule. The rule lives in the target project, not the toolkit, so it is never overwritten by `aitk gov sync` (sync skips rules with no toolkit source match).
9
+
10
+ ## Guards
11
+
12
+ - If no `.claude/` directory exists, stop: `❌ No .claude/ directory found. Run aitk init first.`
13
+ - If the request names no behavior to enforce, stop: `❌ Describe what the rule should enforce and which files it applies to.`
14
+
15
+ ## Step 1: gather intent
16
+
17
+ Resolve both from the request, and ask only for what is missing. Attach a proposed default derived from the request.
18
+
19
+ - What the rule enforces: one topic, phrased as a standard (`<topic> conventions`).
20
+ - Scope: a path glob relative to the project root (`<dir>/**/*.<ext>`) for a path-scoped rule, or always-on when the rule states a global principle with no file scope.
21
+
22
+ ## Step 2: resolve band and subdir
23
+
24
+ Pick the band from the topic. Each band owns a number range and a subdir under `.claude/rules/`:
25
+
26
+ - `core/` 000-099: global persona, testing, error handling, planning. Always-on, no `paths:`.
27
+ - `lang/` 100-199: one programming language.
28
+ - `framework/` 200-299: one framework.
29
+ - `lib/` 300-399: one library or tool.
30
+ - `ui/` 400-499: UI copy, accessibility, forms.
31
+ - `claude/` 500-599: `.claude/` authoring surfaces.
32
+
33
+ ## Step 3: pick a free number
34
+
35
+ Pick the lowest unused number in the band that collides with neither the project nor the toolkit catalog:
36
+
37
+ - Scan the target's `.claude/rules/<subdir>/` for used prefixes.
38
+ - Run `aitk gov list --json 2>/dev/null` and read the shipped rule numbers in the same range, so a later `aitk gov install` cannot double-book the number.
39
+ - If `aitk` is not on PATH, scan the target only and warn that a future toolkit install could collide.
40
+
41
+ ## Step 4: write the rule
42
+
43
+ Read `.claude/standards/rule.md` for frontmatter, body shape, and voice before writing the body, or `${CLAUDE_SKILL_DIR}/../../standards/rule.md` when the project does not have it. Do not work the shape from memory.
44
+
45
+ Write `.claude/rules/<subdir>/<n>-<slug>.md` where `<slug>` is a 1-to-3-word kebab topic. Preview the resolved path, band, number, and frontmatter, then write immediately. The tool permission dialog is the confirmation gate.
46
+
47
+ Frontmatter carries the Claude shape. Path-scoped rules emit one `paths:` entry per glob. Always-on rules omit `paths:` entirely.
48
+
49
+ ```markdown
50
+ ---
51
+ description: <one line, what the rule enforces and where>
52
+ paths:
53
+ - '<glob>'
54
+ ---
55
+
56
+ # <Topic> standards
57
+
58
+ ## <Group>
59
+
60
+ - <imperative rule>
61
+ - <imperative rule>
62
+ ```
63
+
64
+ Title casing is sentence case, with proper nouns keeping their own casing (`# TypeScript standards`). `.claude/standards/rule.md` owns the rest of the body shape.
65
+
66
+ ## After writing
67
+
68
+ Emit the full path on its own line: `.claude/rules/<subdir>/<n>-<slug>.md`. Remind the user that Claude Code loads path-scoped rules when it reads a matching file, and always-on rules every session.
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: create-skill
3
+ description: What skill creation is for, the gaps it closes, and why it confirms before writing
4
+ ---
5
+
6
+ # Create skill requirement
7
+
8
+ ## Gap
9
+
10
+ Without this skill, a new skill lands in the wrong shape and the wrong place. A session writes `SKILL.md` from its own idea of the format, writes malformed frontmatter that Claude Code routes on, and never opens the authoring standard that already answers every question it guessed at.
11
+
12
+ ## Must
13
+
14
+ - Read the authoring standard and the prose standard before drafting, so the draft starts conformant rather than getting corrected into shape
15
+ - Confirm the name and the full body with the user before writing. The name is the routing key and a folder that disagrees with its frontmatter fails silently.
16
+ - Write to the conventional skills path, so discovery finds it without configuration
17
+
18
+ ## Must not
19
+
20
+ - Auto-trigger. Creation is a deliberate act and a skill invented from an ambiguous request is worse than none.
21
+ - Write before the user has seen the body
22
+
23
+ ## Guards
24
+
25
+ - The authoring standard is not installed: stop and name the command that installs it
26
+
27
+ ## Out of scope
28
+
29
+ - Editing an existing skill, which the authoring standard and the skill's own requirement govern
30
+ - Judging whether the skill is warranted. A skill nobody needed is an audit finding, not a creation-time refusal.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: create-skill
3
+ description: Creates a new `SKILL.md` in `.claude/skills/`. Use when asked to create a skill, add a skill, or make a new skill.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Create skill
8
+
9
+ Read these files from the project root in parallel:
10
+
11
+ - `.claude/standards/skill.md`: skill structure, skill types, frontmatter fields, invocation rules
12
+ - `.claude/standards/prose.md`: prose conventions for skill body text
13
+
14
+ Read a standard from `${CLAUDE_SKILL_DIR}/../../standards/` instead when the project does not have it.
15
+
16
+ ## Guards
17
+
18
+ - If neither `.claude/standards/skill.md` nor `${CLAUDE_SKILL_DIR}/../../standards/skill.md` is present, stop: `❌ skill.md standard not found. Run aitk standards install first.`
19
+
20
+ ## Steps
21
+
22
+ 1. Draft the full `SKILL.md` from the user's description
23
+ 2. Confirm the skill name and full content with the user before writing
24
+ 3. Write to `.claude/skills/<name>/SKILL.md`
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: create-snippet
3
+ description: Creates a new snippet file in `snippets/` (toolkit repo) or `.claude/snippets/` (target project). Use when asked to create a snippet, add a snippet, or make a new snippet.
4
+ ---
5
+
6
+ # Create snippet
7
+
8
+ Read these files in parallel:
9
+
10
+ - `${CLAUDE_SKILL_DIR}/references/snippets.md`: authoring conventions, invocation channels, use patterns
11
+ - `.claude/standards/prose.md` from the project root: prose conventions for all generated text
12
+
13
+ Read a standard from `${CLAUDE_SKILL_DIR}/../../standards/` instead when the project does not have it.
14
+
15
+ ## Guards
16
+
17
+ - If neither `snippets/` nor `.claude/snippets/` exists, stop: `❌ No snippets/ or .claude/snippets/ directory found.`
18
+
19
+ ## Steps
20
+
21
+ 1. Resolve the write surface: `snippets/` at the project root if present, the toolkit's own authoring source. Otherwise `.claude/snippets/`, a target project's installed copy.
22
+ 2. Confirm the slug and full content with the user before writing
23
+ 3. Write the file to `<surface>/<slug>.md`
24
+
25
+ ## After writing
26
+
27
+ - Root surface (`snippets/`): this is the toolkit's authoring source. Remind the user `bun run check` regenerates the consumed copy under `.claude/snippets/`.
28
+ - `.claude/snippets/` surface: the file is project-local. `aitk snippets sync` leaves it alone, since sync only updates filenames it recognizes from the toolkit. Remind the user to copy it to the toolkit repo, under `snippets/<category>/<name>.md`, if it should ship to every project.
@@ -0,0 +1,57 @@
1
+ ---
2
+ title: Snippet reference
3
+ description: Snippet reference and authoring conventions
4
+ consumers: create-snippet
5
+ ---
6
+
7
+ # Snippet reference
8
+
9
+ ## What a snippet is
10
+
11
+ A snippet is a short, focused prompt stored as a plain markdown file. Invoke one to insert a prepared instruction into any AI chat without retyping it. Each snippet covers one purpose. If a prompt needs headers or multiple goals, use a system prompt instead.
12
+
13
+ ## Invocation channels
14
+
15
+ - Chrome extension: type `>slug` in a supported chat UI (claude.ai, gemini.google.com) to insert the snippet text inline
16
+ - Claude Code terminal: prefix the install path with `@` (e.g. `@.claude/snippets/claude/feature`)
17
+ - Snippets install preserving the source folder structure. A snippet at `claude/edit.md` installs as `.claude/snippets/claude/edit.md` and is invoked as `@.claude/snippets/claude/edit`
18
+
19
+ ## Use patterns
20
+
21
+ - Run-as-is: invoke and send immediately. The snippet is self-contained and needs no extra context.
22
+ - Invoke-then-add-context: invoke the snippet, then append specifics in the same message (e.g. invoke `claude-feature`, then add the feature name or extra constraints)
23
+ - Invoke-on-history: invoke after a discussion. The snippet uses prior conversation as implicit context with no additional input needed (e.g. invoke `claude-figma` after discussing a design).
24
+
25
+ ## Authoring
26
+
27
+ - One focused purpose per snippet. If it needs headers or multiple goals, use a system prompt instead.
28
+ - Self-contained. No references to external files or assumed prior context.
29
+ - No user fill-in placeholders. If a value depends on context, the user adds it after invocation.
30
+ - Plain markdown only. No YAML frontmatter, no headers, no nested structure.
31
+ - Filename is the slug: kebab-case, no capitals, no underscores
32
+
33
+ ## Structure
34
+
35
+ - Lead with a verb. Open with an imperative that states the job immediately.
36
+ - One instruction per sentence. Do not stack multiple actions into one sentence.
37
+ - For sequential steps, use a numbered list with one action per item.
38
+ - When the output has a fixed shape, show it in a fenced code block with a language identifier.
39
+ - Put constraints and exclusions last, not inline with the main instructions.
40
+
41
+ ## Examples
42
+
43
+ ### Correct
44
+
45
+ ```markdown
46
+ I want to implement the following. Scan relevant files and list conflicts. Do not implement. # user adds feature after invocation
47
+ Scan relevant files and list conflicts. Do not implement. # run-as-is, no context needed
48
+ ```
49
+
50
+ ### Incorrect
51
+
52
+ ```markdown
53
+ I want to implement: <feature or task name> # redundant fill-in, add context after invocation instead
54
+ See ARCHITECTURE.md before starting. # external dependency, not self-contained
55
+
56
+ ## Overview\n## Steps # headers belong in a system prompt, not a snippet
57
+ ```
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: create-standard
3
+ description: Creates a new standard file in `standards/` (toolkit repo) or `.claude/standards/` (target project). Use when asked to create a standard, add a standard, or write a new authoring convention. Do NOT use to edit an existing standard.
4
+ ---
5
+
6
+ # Create standard
7
+
8
+ Read these files in parallel:
9
+
10
+ - `${CLAUDE_SKILL_DIR}/references/standard.md`: the meta-standard for a standard's shape, frontmatter, and structure
11
+ - `.claude/standards/prose.md` from the project root: prose conventions for all generated text
12
+
13
+ Read a standard from `${CLAUDE_SKILL_DIR}/../../standards/` instead when the project does not have it.
14
+
15
+ ## Guards
16
+
17
+ - If neither `standards/` nor `.claude/standards/` exists, stop: `❌ No standards/ or .claude/standards/ directory found.`
18
+
19
+ ## Steps
20
+
21
+ 1. Resolve the write surface: `standards/` at the project root if present, the toolkit's own authoring source. Otherwise `.claude/standards/`, a target project's installed copy.
22
+ 2. Draft the standard from the user's description, following `standard.md` for frontmatter, headings, and structure
23
+ 3. Confirm the slug and full content with the user before writing
24
+ 4. Write the file to `<surface>/<slug>.md`
25
+
26
+ ## After writing
27
+
28
+ Emit the full path on its own line.
29
+
30
+ - Root surface (`standards/`): this is the toolkit's authoring source. Remind the user to run `bun run check` to regenerate the consumed copy under `.claude/standards/` and the `standards/index.md` entry, and to add a row to the standards table in `.claude/context/standards.md`.
31
+ - `.claude/standards/` surface: the file is project-local. `aitk standards sync` leaves it alone, since sync only updates filenames it recognizes from the toolkit. Remind the user to copy it to the toolkit repo, under `standards/<slug>.md`, if it should ship to every project.
@@ -0,0 +1,52 @@
1
+ ---
2
+ title: Standard reference
3
+ description: Shape and content rules for authoring a standard
4
+ consumers: create-standard
5
+ ---
6
+
7
+ # Standard reference
8
+
9
+ ## Overview
10
+
11
+ A standard is a target-facing authoring convention for one document type. It installs into a project under `.claude/standards/` and is consumed by skills and developers alike. One standard governs one doc type. Split unrelated conventions into separate files.
12
+
13
+ ## Frontmatter
14
+
15
+ - Start the file with a frontmatter block carrying `title` and `description`.
16
+ - `title`: names the doc type in sentence case, suffixed `reference` (`Commit reference`, `Branch reference`).
17
+ - `description`: one line naming what the standard covers. It becomes the index link label on install.
18
+
19
+ ## Structure
20
+
21
+ - Use sentence case for every heading.
22
+ - Flat `##` rule groups for a single-topic standard. Group `##` headers by concern for a multi-topic one.
23
+ - When one `##` section covers more than one sub-concern, split its bullets into `###` subgroups, one subgroup per sub-concern. A flat bullet list under an `##` covers a single sub-concern. Roughly seven bullets is a signal to split, not a hard cap.
24
+ - Order groups from the most-used rule down to the edge case.
25
+
26
+ ## Rules
27
+
28
+ - Write rules as imperative bullets: one rule per bullet, one concern per group.
29
+ - State the forbidden shape rather than enumerating allowed options, so a rule survives new categories.
30
+ - Cut any rule that resists a crisp one-line phrasing.
31
+ - Do not pad with filler prose. Every line earns its place as a usable reference entry.
32
+
33
+ ## Success criterion
34
+
35
+ - State what a conforming artifact achieves, not only what shape it takes. A standard that specifies structure exhaustively and success nowhere cannot be argued against, only edited on taste.
36
+ - Write the criterion as a small set of questions the artifact must answer, or a task a reader must be able to complete from it. Keep it checkable by a person in one sitting.
37
+ - Place it near the top, above the shape rules it governs. The shape rules are the means and the criterion is the test.
38
+ - Say that an artifact failing the criterion is non-conforming even when it satisfies every shape rule. Without that line the criterion reads as advice.
39
+ - Add a criterion to an existing standard when that standard is next exercised, not in a sweep. A criterion written without a failure to point at is the taste-based edit this section exists to prevent, so a standard with no criterion yet is a known gap rather than a violation.
40
+
41
+ ## Changing a standard
42
+
43
+ - Change a standard on a failure, not on a finding. A finding is that the docs say X or a paper suggests Y. A failure is a conforming artifact that satisfied every shape rule and still missed the success criterion.
44
+ - Park findings wherever the project tracks pending work, or in the standard's own backlog section when it tracks none. They are hypotheses to test, not instructions to apply.
45
+ - Cite the failing artifact in the change that fixes it, so the next reader can tell which rules were paid for by evidence.
46
+
47
+ ## Examples
48
+
49
+ - Include examples only where a rule is non-obvious. A self-evident rule needs none.
50
+ - When shown, label them `### Correct` and `### Incorrect` with an inline `# reason` on each entry.
51
+ - Keep to two or three entries. Show the pattern, not a catalog.
52
+ - Keep each entry a short one-liner or command. Do not write multi-line correct and incorrect function blocks.
@@ -0,0 +1,87 @@
1
+ ---
2
+ name: docs-sync
3
+ description: Rewrites stale `README.md` and `docs/*.md` sections based on changes since main. Use before staging, or when asked to "sync docs" or "update the docs". Do NOT use for changelog updates or `CLAUDE.md` updates.
4
+ ---
5
+
6
+ # Docs sync
7
+
8
+ Read these files from the project root in parallel:
9
+
10
+ - `.claude/standards/prose.md`: prose conventions for all generated text
11
+ - `.claude/standards/readme.md`: README structure, required sections, and content rules
12
+
13
+ Read a standard from `${CLAUDE_SKILL_DIR}/../../standards/` instead when the project does not have it.
14
+
15
+ ## Diff baseline
16
+
17
+ Resolve the base ref once and reuse it in Context and in Guards:
18
+
19
+ ```bash
20
+ git merge-base HEAD origin/main 2>/dev/null || git merge-base HEAD main 2>/dev/null
21
+ ```
22
+
23
+ Prefer `origin/main` over local `main`. On `main` itself the local ref resolves to HEAD, so every committed change drops out of the set and the skill reports nothing to sync rather than admitting it cannot see the work.
24
+
25
+ The baseline is unusable in two cases:
26
+
27
+ - No merge base resolves against either ref.
28
+ - The base equals HEAD, whichever ref resolved it. Nothing is committed ahead of the base to compare against. This is the ordinary shape on `main`, and on a feature branch before its first commit.
29
+
30
+ An unusable baseline costs only the committed half. `git diff --cached <base>` degrades to the staged set and `git status --short` still reports the working tree, so both reads stay at this skill's own scope. Say so in the preview with `⚠ Baseline unusable. Synced against the uncommitted set only.` The base ref is the only thing this change touches, and the `--cached` scope stays.
31
+
32
+ ## Context
33
+
34
+ Run these commands in parallel:
35
+
36
+ - `git diff --cached <base> -- . ':(exclude)*.lock' ':(exclude)*-lock.json' 2>/dev/null || echo "NO_DIFF"`
37
+ - `git diff --cached --name-only <base> 2>/dev/null || echo "NO_FILES"`
38
+ - `git status --short 2>/dev/null || echo "NO_STATUS"`
39
+
40
+ ## Guards
41
+
42
+ - If `git diff --cached <base>` output is empty and `git status --short` output is empty, stop: `❌ No changes since main. Nothing to sync.` Resolve the base ref first. A guard reading bare local `main` stops the skill on `main` before it reaches the corrected read.
43
+
44
+ ## Discovery
45
+
46
+ Discover docs dynamically. Do not hardcode paths:
47
+
48
+ - Glob `README.md` at project root
49
+ - Glob `docs/**/*.md`
50
+
51
+ Read each discovered file in parallel.
52
+
53
+ ## Analysis
54
+
55
+ For each discovered doc, classify as one of:
56
+
57
+ - `stale`: the diff touches something the doc describes
58
+ - `unrelated`: no overlap between diff and doc content
59
+
60
+ Classify at the section level, not the file level. A doc edited earlier in the session can still be partially stale. For each diff surface, verify the corresponding section is synced.
61
+
62
+ ## Action
63
+
64
+ Rewrite only the stale sections. Do not touch sections unrelated to the diff. Write the updated file immediately after the preview. Claude Code's tool permission dialog is the confirmation gate. Do not wait for user input.
65
+
66
+ ## Response format
67
+
68
+ ### Preview
69
+
70
+ **Changes since main:** `<n>` files
71
+ **Docs discovered:** `<list>`
72
+
73
+ | Doc | Status | Action |
74
+ | ----------- | --------- | ------ |
75
+ | README.md | stale | update |
76
+ | docs/api.md | unrelated | skip |
77
+
78
+ After outputting the preview, write all stale updates immediately.
79
+
80
+ ### Summary
81
+
82
+ One line per file, using the same relative path format as the preview table (e.g. `README.md`, `docs/api.md`):
83
+
84
+ ```plaintext
85
+ ✅ Updated: <relative-path>
86
+ ⏭️ Skipped: <relative-path>
87
+ ```
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: git-branch
3
+ description: What branch naming is for, the gaps it closes, and where the family boundary sits
4
+ ---
5
+
6
+ # Git branch requirement
7
+
8
+ ## Gap
9
+
10
+ Without this skill, a branch name is invented once per session. The type prefix drifts from what the history already carries, the name runs past the width a pull request list renders, and a rename lands on a branch that already exists on the remote, which detaches every open pull request pointing at it.
11
+
12
+ ## Must
13
+
14
+ - Read the branch format reference before generating, so the type vocabulary and the length limit come from one source
15
+ - Derive the name from the commits ahead of main when the invocation carries no description
16
+ - Resolve whether the branch exists on the remote before proposing a rename, since the hazard is invisible from local state
17
+ - Show the name and its length against the limit before renaming
18
+ - Execute immediately after the preview. The tool permission dialog is the confirmation gate.
19
+
20
+ ## Must not
21
+
22
+ - Rename `main` or `master`
23
+ - Rename when the current name already conforms. The skill is chained, so a conforming name has to pass through rather than churn the branch.
24
+ - Rename a branch that exists on the remote. Local rename plus force push is not the same operation and it breaks the pull request.
25
+ - Emit anything after the result line
26
+
27
+ ## Guards
28
+
29
+ - On a protected branch: stop and say the branch is protected
30
+ - Name already conforms: stop with a success marker, not a failure, since a chained caller continues past it
31
+ - No commits and no description: stop and name both missing inputs
32
+ - Branch exists on the remote: stop and route to the surface that preserves the pull request link
33
+
34
+ ## Out of scope
35
+
36
+ - The commit message, which `git-commit` owns
37
+ - Pushing and opening the pull request, which `git-pr` owns. That skill reads a conforming name as a precondition and refuses without one, so this skill runs first.
38
+ - Splitting a branch whose commits span concerns, which `git-split` owns
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: git-branch
3
+ description: Generates and validates conventional branch names. Use for any branch naming or renaming.
4
+ ---
5
+
6
+ # Git branch
7
+
8
+ Before generating a branch name, read:
9
+
10
+ - `${CLAUDE_SKILL_DIR}/references/branch.md`: format, types, length limit, and constraints
11
+
12
+ Follow it exactly.
13
+
14
+ ## Context
15
+
16
+ Run these commands in parallel to gather git context:
17
+
18
+ - `git branch --show-current 2>/dev/null || echo "NO_BRANCH"`
19
+ - `git rev-parse --verify "origin/$(git branch --show-current)" 2>/dev/null && echo "EXISTS" || echo "LOCAL_ONLY"`
20
+ - `git log main..HEAD --oneline 2>/dev/null || echo "NO_COMMITS"`
21
+
22
+ ## Guards
23
+
24
+ - If already on main or master, stop: `❌ Cannot rename a protected branch.`
25
+ - If branch name already follows conventions, stop: `✅ Branch name already follows conventions.`
26
+ - If no commits and no args provided, stop: `❌ No commits or description to derive a branch name from.`
27
+
28
+ ## Response format
29
+
30
+ ### Preview
31
+
32
+ - **Current:** <current_branch>
33
+ - **Suggested:** <suggested_name>
34
+ - **Length:** <count>/50
35
+ - **Status:** <LOCAL_ONLY | EXISTS on remote>
36
+ - **Analysis:** <brief explanation of type choice>
37
+
38
+ If EXISTS on remote, warn and stop:
39
+
40
+ ```plaintext
41
+ ⚠️ Branch exists on remote. Rename manually via GitHub UI or gh CLI to avoid breaking open PRs.
42
+ ```
43
+
44
+ After outputting the preview, execute the final command immediately. Claude Code's tool permission dialog is the confirmation gate. Do not wait for user input.
45
+
46
+ ### Final command
47
+
48
+ Only output if LOCAL_ONLY:
49
+
50
+ ```bash
51
+ git branch -m <current> <suggested>
52
+ ```
53
+
54
+ ## After execution
55
+
56
+ Respond with exactly one line:
57
+
58
+ `✅ Renamed: <current> → <suggested>`
59
+
60
+ Do not add any other text.
@@ -0,0 +1,49 @@
1
+ ---
2
+ title: Branch reference
3
+ description: Branch naming format and type conventions
4
+ consumers: git-branch, git-split, git-pr, claude-standards-audit
5
+ ---
6
+
7
+ # Branch reference
8
+
9
+ ## Format
10
+
11
+ - Structure: `<type>/<description>` or `<type>/<ticket>-<description>`
12
+ - Length: 50 characters maximum
13
+ - Casing: kebab-case only, no underscores or camelCase
14
+ - Description: 2 words maximum, 3 only when genuinely needed for specificity
15
+ - Capture the core change, not the commit message verbatim
16
+ - For branches with multiple commits, use the unifying concern as the description.
17
+ - Do not duplicate type in description (e.g., `feat/feature-login`)
18
+
19
+ ## Types
20
+
21
+ - `feat`: new feature or capability
22
+ - `fix`: bug fix
23
+ - `refactor`: structural changes (not a fix or feature)
24
+ - `docs`: documentation only (README)
25
+ - `chore`: maintenance tasks (deps, tooling, configs)
26
+ - `perf`: performance improvements
27
+ - `test`: add or modify tests
28
+ - `style`: code formatting (whitespace, semicolons)
29
+ - `build`: build system changes (webpack, npm scripts)
30
+ - `ci`: CI/CD pipeline changes (GitHub Actions)
31
+ - `revert`: revert a previous commit
32
+
33
+ ## Examples
34
+
35
+ ### Correct
36
+
37
+ ```plaintext
38
+ feat/jwt-expiration # clear feature scope
39
+ fix/AUTH-123-connection-pool # includes ticket ID
40
+ refactor/remove-deprecated-endpoints # clear refactor intent
41
+ ```
42
+
43
+ ### Incorrect
44
+
45
+ ```plaintext
46
+ feature/auth_stuff # wrong type + underscore
47
+ feat/feature-add-login # duplicates type in description
48
+ fix/DB-456-fix-the-database-connection-pool-memory-leak # exceeds 50 chars + verbatim message
49
+ ```
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: git-commit
3
+ description: What commit generation is for, the gaps it closes, and where the family boundary sits
4
+ ---
5
+
6
+ # Git commit requirement
7
+
8
+ ## Gap
9
+
10
+ Without this skill, a commit message takes whatever shape the session settled on. The type and scope drift from the convention the history already follows, the subject runs past the length the log renders, and a lockfile diff floods the context the message is derived from so the message describes the lockfile.
11
+
12
+ ## Must
13
+
14
+ - Read the commit format reference and the versioning standard before generating, so the type, the scope, and the version discipline come from one source
15
+ - Derive the message from the staged diff, with lockfiles excluded
16
+ - Show the message and its length against the limit before committing, so an over-length subject is visible while it is still cheap to fix
17
+ - Execute immediately after the preview. The tool permission dialog is the confirmation gate, and a second prompt trains the user to skim it.
18
+
19
+ ## Must not
20
+
21
+ - Stage anything. What is committed has to be what the user chose to stage.
22
+ - Commit when nothing is staged
23
+ - Emit anything after the result line. A commit is a step inside a longer flow and prose here buries the next one.
24
+
25
+ ## Guards
26
+
27
+ - Nothing staged: stop and name the command that stages
28
+
29
+ ## Out of scope
30
+
31
+ - Splitting a mixed diff across several commits, which `git-stage` owns
32
+ - Naming the branch, which `git-branch` owns. The family shares its triggers and not its gaps: this one turns on the staged diff, the length limit, and lockfile exclusion, none of which a branch name has.
33
+ - Pushing or opening a pull request, which `git-pr` owns
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: git-commit
3
+ description: Generates conventional commit messages from staged changes. Use for any git commit.
4
+ ---
5
+
6
+ # Git commit
7
+
8
+ Before generating a commit message, read:
9
+
10
+ - `${CLAUDE_SKILL_DIR}/references/commit.md`: format, types, scopes, and constraints
11
+ - `.claude/standards/versioning.md` from the project root: phase label vs semver discipline
12
+
13
+ Read a standard from `${CLAUDE_SKILL_DIR}/../../standards/` instead when the project does not have it.
14
+
15
+ Follow them exactly.
16
+
17
+ ## Context
18
+
19
+ Run these commands in parallel to gather git context:
20
+
21
+ - `git diff --cached --name-status 2>/dev/null || echo "NO_STAGED_CHANGES"`
22
+ - `git diff --cached -- . ':(exclude)*.lock' ':(exclude)*-lock.json' 2>/dev/null || echo "NO_DIFF"`
23
+
24
+ ## Guards
25
+
26
+ - If staged files output is `NO_STAGED_CHANGES`, stop and output:
27
+ `❌ No staged changes. Stage files first with git add before committing.`
28
+
29
+ ## Response format
30
+
31
+ ### Preview
32
+
33
+ - **Files:** <if ≤3 list all, if >3 show first 3 + "+N more">
34
+ - **Message:** `<type>(<scope>): <subject>`
35
+ - **Length:** <count>/72
36
+
37
+ After outputting the preview, execute the final command immediately. Claude Code's tool permission dialog is the confirmation gate. Do not wait for user input.
38
+
39
+ ### Final command
40
+
41
+ ```bash
42
+ git commit -m "<type>(<scope>): <subject>"
43
+ ```
44
+
45
+ ## After execution
46
+
47
+ Respond with exactly one line:
48
+
49
+ `✅ Committed: <type>(<scope>): <subject>`
50
+
51
+ Do not add any other text.