@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,79 @@
1
+ ---
2
+ name: claude-standards-audit
3
+ description: Audits changed markdown files against applicable authoring standards (prose, skill, readme, branch, pr) and reports violations without fixing. Maps each file to its standards, greps for banned tokens, and groups findings by file. Use when asked to "audit prose", "audit standards", "check standards", "standards audit", or after editing markdown where standards compliance matters. Do NOT fix violations. Reporting only.
4
+ ---
5
+
6
+ # Claude standards audit
7
+
8
+ ## Guards
9
+
10
+ - Resolve the base ref first, per Diff baseline below, then scope the file list exactly as Step 1 does, fallback included. If no markdown files changed, stop: `✅ No markdown changes to audit.` A guard that reads bare local `main`, or that skips the unusable-baseline fallback, passes the skill clean on a branch it never read.
11
+ - If neither `.claude/standards/prose.md` nor `${CLAUDE_SKILL_DIR}/../../standards/prose.md` is present, stop: `❌ prose.md standard not found. Install toolkit standards first.` Test the file rather than the directory, since a project that installed standards before a given file existed keeps the directory without ever receiving that file.
12
+
13
+ ## Diff baseline
14
+
15
+ Resolve the base ref once and reuse it in the guard and in Step 1:
16
+
17
+ ```bash
18
+ git merge-base HEAD origin/main 2>/dev/null || git merge-base HEAD main 2>/dev/null
19
+ ```
20
+
21
+ 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 audit passes clean rather than admitting it cannot see the files.
22
+
23
+ The baseline is unusable in two cases:
24
+
25
+ - No merge base resolves against either ref.
26
+ - 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.
27
+
28
+ An unusable baseline costs only the committed half. Audit `git diff HEAD --name-only` instead and lead the report with `⚠ Baseline unusable. Audited the uncommitted set only.`, so a clean result is never read as a clean branch.
29
+
30
+ ## Step 1: scope the audit
31
+
32
+ Get the changed file list, substituting `git diff HEAD --name-only` when the baseline is unusable:
33
+
34
+ ```bash
35
+ git diff <base> HEAD --name-only
36
+ ```
37
+
38
+ Filter to markdown (`.md`). Drop generated files the project does not hand-author (`index.md` when `auto: false` is absent, any file in a gitignored directory).
39
+
40
+ ## Step 2: map files to standards
41
+
42
+ For each changed markdown file, pick the applicable standards:
43
+
44
+ - Any markdown with prose: `.claude/standards/prose.md`
45
+ - `SKILL.md` under `.claude/skills/` or `claude/skills/`: also `.claude/standards/skill.md`
46
+ - `README.md` at any level: also `.claude/standards/readme.md`
47
+ - Branch names proposed in the session: `${CLAUDE_SKILL_DIR}/references/branch.md`
48
+ - PR titles or bodies drafted in the session: `${CLAUDE_SKILL_DIR}/references/pr.md`
49
+
50
+ Read a standard from `${CLAUDE_SKILL_DIR}/../../standards/` instead when the project does not have it.
51
+
52
+ ## Step 3: read standards and audit
53
+
54
+ Read each applicable standard once. For each changed file, audit against every rule:
55
+
56
+ - **Pattern rules**: grep the file for every token the standard bans. Grep is authoritative. Reading alone misses occurrences.
57
+ - **Judgment rules**: check each rule in context against the standard that states it.
58
+
59
+ Every changed markdown file gets the prose pattern pass, since `.claude/standards/prose.md` applies to all of them. Take the banned tokens from that standard at read time rather than from a list held here.
60
+
61
+ ## Step 4: report
62
+
63
+ Group findings by file with line references. Use this shape:
64
+
65
+ ```markdown
66
+ path/to/file.md
67
+
68
+ - L12: em dash in prose
69
+ - L34: semicolon used to join clauses
70
+ - L67: bullet ends with period but is a single fragment
71
+ ```
72
+
73
+ If clean, respond with `✅ No violations.`
74
+
75
+ Reporting only. Do not rewrite any file, swap any punctuation, or propose fixes inline. Fixes are a separate user-initiated step because lazy swaps (semicolon to period, em dash to comma) violate the prose rule against shallow substitution.
76
+
77
+ ## Output
78
+
79
+ Chat output is the full report. This skill does not persist a file. The audit is a momentary check and living state is the diff itself.
@@ -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,124 @@
1
+ ---
2
+ title: Pull request reference
3
+ description: Pull request title and body conventions
4
+ consumers: git-split, git-pr, claude-standards-audit
5
+ ---
6
+
7
+ # Pull request reference
8
+
9
+ ## Title
10
+
11
+ - Format: `<type>(<scope>): <subject>`
12
+ - Casing: lowercase for `<type>`, `<scope>`, and first word of `<subject>`
13
+ - Length: 72 characters maximum
14
+
15
+ ## Content
16
+
17
+ - Use imperative mood for all content (`add`, `fix`, `refactor`)
18
+ - Do not start with "This PR," "This commit," "Included are," or "I have"
19
+ - Do not use buzzwords (`seamless`, `robust`, `game-changer`, `enhanced`)
20
+ - Do not describe historical behavior or unchanged code. Describe new behavior only.
21
+ - Do not include future promises or speculative documentation
22
+ - Do not explain obvious changes (formatting, renaming variables)
23
+ - Do not duplicate commit messages verbatim
24
+
25
+ ## Sections
26
+
27
+ - `## Summary`: 1-2 sentences following `<Action Verb> <Direct Object> to <Result>`, expand for clarity if needed
28
+ - `## Key Changes`: name actual files, functions, or modules (e.g., `AuthService.verify()` not "auth handler"). Always use bullet points, never prose.
29
+ - `## Technical Context` (optional): 1-2 lines of architectural reasoning explaining why, not what
30
+ - Omit Technical Context for docs, config, or trivial changes
31
+ - Use bullet points for multiple reasons, one sentence for a single reason
32
+ - `## Testing` (optional): specify exact commands or test cases run
33
+ - Omit Testing for docs, config, or trivial sync changes
34
+ - Use checkboxes, never prose. See Testing discipline for which box gets ticked.
35
+ - `## For the reviewer` (optional): what the reviewer should confirm, one bullet per request
36
+ - Visuals: include only when they clarify architecture, UI, or complex logic flows
37
+
38
+ ## Testing discipline
39
+
40
+ - Run the check before writing its line. A `- [ ]` reports a check that has not run rather than one that is planned.
41
+ - Tick the box and state the observed result. `- [x] npm test passes, 42 tests` beats `- [ ] run npm test`.
42
+ - Quote the count or output the run reported, never a figure carried from elsewhere.
43
+ - Leave a box unchecked only when a human is required, and name which human and why on the same line.
44
+ - Human-only covers visual or aesthetic judgment, anything needing credentials or a live third-party service, anything needing a second machine or a fresh OS, and judgment about whether a boundary or an abstraction reads correctly. The agent runs everything else.
45
+ - Put a request for the reviewer under `## For the reviewer`. It is a request rather than unfinished testing, so it never appears as an unchecked Testing box.
46
+
47
+ ## Formatting
48
+
49
+ - End every bullet point with a period
50
+
51
+ ## Examples
52
+
53
+ ### Template
54
+
55
+ ```markdown
56
+ ## Summary
57
+
58
+ <Action Verb> <Direct Object> to <Result>.
59
+
60
+ ## Key Changes
61
+
62
+ - <Verb> <specific component/file/function> (<reason if non-obvious>)
63
+ - <Verb> <specific component/file/function>
64
+
65
+ ## Technical Context
66
+
67
+ - <Architectural reasoning explaining why, not what>
68
+
69
+ ## Testing
70
+
71
+ - [x] <Command run> <observed result>
72
+ - [x] <Edge case verified> <what was observed>
73
+ - [ ] <Human-only check> (<which human, why>)
74
+
75
+ ## For the reviewer
76
+
77
+ - <What the reviewer should confirm>
78
+ ```
79
+
80
+ ### Correct
81
+
82
+ ```markdown
83
+ ## Summary
84
+
85
+ Update auth middleware to enforce jwt expiration checks. # imperative + direct object + result
86
+
87
+ ## Key Changes
88
+
89
+ - Add `verifyExpiration()` to `src/auth/validators.ts`. # specific function + file path
90
+ - Refactor `AuthService.authenticate()` to handle 401 codes. # named component + clear change
91
+
92
+ ## Technical Context
93
+
94
+ - Migration to stateless session management for horizontal scalability. # why, not what
95
+
96
+ ## Testing
97
+
98
+ - [x] `npm run test:auth` passes, 42 tests. # command run + observed result
99
+ - [x] Expired token rejected with a 401 against a local server. # edge case + what happened
100
+ - [ ] Staging smoke test (release owner, needs staging credentials). # unchecked + which human + why
101
+
102
+ ## For the reviewer
103
+
104
+ - Confirm the 401 and 403 split reads correctly for the public API. # a request, not a test result
105
+ ```
106
+
107
+ ### Incorrect
108
+
109
+ ```markdown
110
+ ## Summary
111
+
112
+ This PR updates the authentication system to be more robust. # "This PR" opener + buzzword
113
+
114
+ ## Key Changes
115
+
116
+ - Updated auth middleware files # vague, no specific component, no period
117
+ - The old system used to check tokens differently # describes historical behavior
118
+
119
+ ## Testing
120
+
121
+ - Tested manually # no specific command or case
122
+ - [ ] `npm run test:auth` # unchecked box for a check the agent can run
123
+ - [ ] Reviewer confirms the error split reads correctly # a reviewer request, belongs under `## For the reviewer`
124
+ ```
@@ -0,0 +1,123 @@
1
+ ---
2
+ name: claude-tasks
3
+ description: Creates a task file in `.claude/tasks/` with the filename, phase label, and frontmatter the standard requires, and archives a shipped one out of the folder. Use when asked to "add a task", "create a task", "queue this", "put this on the board", "archive that task", or "close out a shipped task". Do NOT use to mark an outcome `[x]` or to archive a plan. That is `claude-docs`.
4
+ ---
5
+
6
+ # Claude tasks
7
+
8
+ Owns the two operations that bring a task file into existence and take it out of the folder. `claude-docs` edits the contents of a task that already exists, marking outcomes `[x]` and sweeping the plans those tasks cite. Do not mark outcomes here and do not archive a plan on its own.
9
+
10
+ Read `.claude/standards/tasks.md` from the project root before writing any file, or `${CLAUDE_SKILL_DIR}/../../standards/tasks.md` when the project does not have it. It holds the filename convention, the frontmatter contract, and the file format. Do not work them from memory.
11
+
12
+ ## Guards
13
+
14
+ - Resolve the board at the main worktree root, not `pwd`. Run `git worktree list --porcelain | grep -m 1 '^worktree ' | cut -d' ' -f2-`, falling back to `pwd` outside a git repo. Every read and write below resolves against that root. The board is gitignored scratch shared across worktrees, so a linked worktree writing to its own `pwd` creates a second board nothing else reads.
15
+ - If `.claude/tasks/` does not exist at that root, stop: `❌ No .claude/tasks/ board. Run aitk claude init to set it up.`
16
+ - Route on the request rather than on a flag. Creating names work that does not exist yet, archiving names a task file already on the board. If the request fits neither, stop: `❌ Ambiguous. Say whether to create a task or archive one.`
17
+ - Never hand-edit `.claude/tasks/index.md`. A hook regenerates it from sibling frontmatter after a write. Do not run the regen command directly.
18
+
19
+ ## Create
20
+
21
+ ### Step 1: require an origin
22
+
23
+ Every task traces to a plan, a groundwork folder, or a GitHub issue. Ask for it when the request does not carry one, and stop rather than guessing: `❌ No origin. Name the plan, groundwork folder, or issue this task comes from.`
24
+
25
+ A task with no origin is either lost context or work nobody decided to do. This is the only moment the invariant is enforceable, because it is the only moment a task file comes into existence.
26
+
27
+ Accept work whose origin is the conversation itself only when the user says so explicitly, and record what it was in the intro paragraph instead of writing a link line to a file that does not exist.
28
+
29
+ ### Step 2: propose the phase label
30
+
31
+ List the existing filenames in `.claude/tasks/` and read `index.md` for what each holds. Propose the next label from what is already on the board, and say which neighbors it sits between.
32
+
33
+ Do not derive the label from a version file. `.claude/standards/versioning.md` permits free renumbering, so the board is the only surface that knows what a label currently means. Pad the phase to two digits in the filename, since index entries sort by filename alone and a bare `v9.0` sorts after `v15.0`.
34
+
35
+ ### Step 3: write the file
36
+
37
+ Write `.claude/tasks/vXX.Y-<slug>.md` following the format in `.claude/standards/tasks.md`. Include a link line only when the file or folder it names exists. A link to a plan nobody has written yet is the broken pointer the archive rules exist to prevent.
38
+
39
+ Write `Plan:` and `Groundwork:` as markdown links relative to `.claude/tasks/`, as in `Plan: [feature-<slug>](../plans/feature-<slug>.md)`. Leave `Issue:` a bare `#NNN`. A task written in the older bare-path form still parses, so it costs the board a clickable line rather than an archive, but it leaves the board in two shapes for every reader after.
40
+
41
+ Never write a `Pull request:` line here. `git-pr` adds it when a pull request opens, and a number guessed at create time points at someone else's work.
42
+
43
+ Write it immediately. Claude Code's tool permission dialog is the confirmation gate. Do not pause for approval.
44
+
45
+ ### Step 4: report unlinked origins
46
+
47
+ Scan for work that has been decided and would otherwise be forgotten. List `.claude/.tmp/groundwork/` and run `gh issue list --state open` when a remote is configured, then grep the board for each track name and issue number. Report any with no task, one line each.
48
+
49
+ Report rather than prompt. A track can be opened long after its task would have been written, so an offer to create one for each is noise on most runs.
50
+
51
+ ## Archive
52
+
53
+ The `post-merge` git hook archives the task a merge closed, so a request arriving here is usually one the hook could not resolve on its own. Run the steps below against whatever the hook left in place.
54
+
55
+ Do not move the file, edit `priority.md`, or regenerate the index by hand. `aitk tasks archive` owns all three as one unit and the hook calls the same command, so a hand-rolled move here drifts from the unattended path.
56
+
57
+ ### Step 1: confirm the work reached main
58
+
59
+ `claude-docs` marks outcomes on the branch as step 1 of the ship chain, so an all-`[x]` task routinely describes a pull request that is still open. The command gates on the outcomes and cannot tell those two apart, which is what puts this check here:
60
+
61
+ ```bash
62
+ git fetch origin main --quiet && git log origin/main --oneline -20
63
+ ```
64
+
65
+ Match the shipped outcomes against that log, widening to `gh pr list --state merged --limit 20` when a remote is configured and the log does not settle it. When the work is not on `main`, name the task and stop: `❌ Work not on main. Archiving now loses the task if the pull request is abandoned.`
66
+
67
+ The board is gitignored, so an archived task has no history behind it and nothing restores one archived early. Skip this check when the task carries a `Pull request:` line and that pull request is merged, since the number already proves what the log is being read for.
68
+
69
+ ### Step 2: run the archive
70
+
71
+ Pass the task's filename stem, or the pull request number when the request names one:
72
+
73
+ ```bash
74
+ aitk tasks archive <stem>
75
+ ```
76
+
77
+ The command refuses rather than reports, so read its exit code. On success it prints what moved, what row it cleared, and whether the index changed.
78
+
79
+ ### Step 3: route on a refusal
80
+
81
+ Each reason has one resolution and none of them is to archive around it:
82
+
83
+ - `open-outcomes`: the named outcomes are unmarked or genuinely open. Run `claude-docs` when the work shipped and nothing marked it. Leave the task on the board when the outcome is real. Cut the outcomes first when the work is being abandoned, so the board records what was dropped.
84
+ - `plan-unswept`: stop and route to `claude-docs`, which owns the plans sweep and the last-live-citation rule. `❌ Plan not yet swept. Run /claude-docs first, then archive.`
85
+ - `ambiguous`: two tasks name one pull request, which is the misfile `.claude/standards/tasks.md` rules out. Resolve the citation by hand, since no sweep repairs it.
86
+ - `no-match`: the stem or number names nothing on the board. Check the name against the listed stems.
87
+
88
+ Do not move a plan from this skill. `claude-docs` owns that move. Two skills relocating the same file drift into relocating it differently.
89
+
90
+ Leave `TASK-ARCHIVE.md` alone when it is present in the archive folder. It records the single-file era in the shape that era used, and splitting it would fabricate per-task files nobody wrote.
91
+
92
+ ### Step 4: clear prose naming the task
93
+
94
+ The command drops the task's row from `.claude/tasks/priority.md` and leaves prose alone. Remove any sentence that still names the archived task or counts the rows that changed, since a stale count reads as board state.
95
+
96
+ ## Output
97
+
98
+ Emit the full relative path from the project root for every file written or moved. Bare filenames are not clickable.
99
+
100
+ Create:
101
+
102
+ ```plaintext
103
+ ✅ Created: .claude/tasks/vXX.Y-<slug>.md
104
+
105
+ <label> sits between <neighbor> and <neighbor>.
106
+
107
+ **Origin with no task:**
108
+
109
+ - `.claude/.tmp/groundwork/<slug>/`: open, touched <date>
110
+ - #NNN: <issue title>
111
+ ```
112
+
113
+ Omit the origin block when everything is linked.
114
+
115
+ Archive, reporting the paths the command returned:
116
+
117
+ ```plaintext
118
+ 📦 Archived: .claude/.tmp/task-archive/vXX.Y-<slug>.md
119
+
120
+ <ordering and index disposition in one line>
121
+ ```
122
+
123
+ A refusal reports the reason and the resolution Step 3 routes it to, on one line each.
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: claude-ui-test
3
+ description: Generates and runs Playwright e2e tests for UI changes, with a manual checklist for visual-only items. Use after implementing UI changes, or when asked "what should I test", "what do I verify", or "give me a test checklist". Do NOT use in empty sessions with no implementation context.
4
+ ---
5
+
6
+ # Claude UI test
7
+
8
+ ## Guards
9
+
10
+ - If no implementation context exists in the session, stop: `❌ No implementation context. Describe what you built first.`
11
+
12
+ ## Analysis
13
+
14
+ Review the session to identify what was built or changed. Categorize each change:
15
+
16
+ - **Automatable:** interactions, state transitions, form submissions, keyboard navigation, conditional rendering, error states, empty states, loading states. These become Playwright e2e tests.
17
+ - **Visual-only:** spacing, alignment, color, typography, layout proportions, animation timing. These become a manual checklist.
18
+
19
+ Exclude anything already covered by unit or component tests written during implementation.
20
+
21
+ ## E2e tests
22
+
23
+ Write Playwright tests for all automatable changes. Follow these rules:
24
+
25
+ - Add tests to the existing e2e test file. If none exists, create `e2e/ui.test.ts`.
26
+ - Use the project's existing Playwright config and test patterns. Read them first.
27
+ - Each test should perform a user action and assert the expected outcome.
28
+ - Cover both happy path and key edge cases (empty state, error state, boundary input).
29
+ - For Chrome extensions: load the unpacked extension via Playwright's `--load-extension` flag and use the extension's sidepanel or popup URL as the test target.
30
+ - Run the tests after writing them. Fix failures before finishing.
31
+
32
+ Test structure:
33
+
34
+ ```typescript
35
+ test('description of user flow', async ({ page }) => {
36
+ // Arrange: navigate, set up state
37
+ // Act: perform user action
38
+ // Assert: verify expected outcome
39
+ })
40
+ ```
41
+
42
+ ## Manual checklist
43
+
44
+ For visual-only items that cannot be asserted programmatically, produce a checklist. Group by feature area. Use `- [ ]` checkbox syntax.
45
+
46
+ ```markdown
47
+ **What to verify visually:**
48
+
49
+ **<Feature area>**
50
+
51
+ - [ ] <action> → <expected visual result>
52
+ ```
53
+
54
+ If all changes are automatable, skip the manual checklist:
55
+
56
+ `✅ All changes covered by e2e tests. No manual verification needed.`
57
+
58
+ ### Persist the checklist
59
+
60
+ Derive a slug from the current git branch: run `git branch --show-current` and replace any `/` with `-`. If the result is empty (detached HEAD), use `latest`.
61
+
62
+ When a manual checklist is produced, write it directly to `.claude/review/ui-checklist-<slug>.md` at the main worktree root, not the current worktree. See Worktrees in `CLAUDE.md`. Create the directory if it does not exist. Always overwrite.
63
+
64
+ Skip the file write when all changes are covered by e2e tests and no checklist was produced.
65
+
66
+ The `.claude/review/` directory is gitignored. Do not stage or commit the file.
67
+
68
+ ## Output order
69
+
70
+ 1. Write and run e2e tests (report pass/fail)
71
+ 2. If a manual checklist was produced, write it to file, then output only the file path in chat:
72
+ `📝 Wrote .claude/review/ui-checklist-<slug>.md`
73
+ 3. If no checklist was needed: `✅ All changes covered by e2e tests. No manual verification needed.`
74
+
75
+ Do not repeat the full checklist in chat.
@@ -0,0 +1,78 @@
1
+ ---
2
+ name: claude-ux-audit
3
+ description: Audits the current UI for incomplete, inconsistent, or confusing patterns. Reads DESIGN.md and .claude/wireframes/ for intent, scans UI files, and outputs observations grouped by surface. Use when asked "audit the UX", "audit the UI", "UX audit", or "find UI roughness". Do NOT use for new feature planning or code changes.
4
+ ---
5
+
6
+ # Claude UX audit
7
+
8
+ ## Guards
9
+
10
+ - If no UI files exist in the project (no JSX, TSX, Vue, Svelte, or HTML under `src/`), stop: `❌ No UI surfaces found to audit.`
11
+
12
+ ## Step 1: read context
13
+
14
+ Read these in parallel from the project root, skipping any that do not exist:
15
+
16
+ - `CLAUDE.md`: project type and conventions
17
+ - `.claude/DESIGN.md`: visual intent, tokens, typography, spacing rules
18
+ - `.claude/wireframes/index.md` + every `.claude/wireframes/<surface>.md`: intended UI layout, UI copy, interaction rules. Surfaces are loaded one file at a time during Step 3. Per `.claude/standards/wireframes.md`, these carry layout and intent, not implementation detail.
19
+ - `.claude/REQUIREMENTS.md`: feature scope and non-goals
20
+
21
+ Read a standard from `${CLAUDE_SKILL_DIR}/../../standards/` instead when the project does not have it.
22
+
23
+ ## Step 2: identify surfaces
24
+
25
+ List the UI surfaces in the project. A surface is a distinct screen, page, panel, or major component (e.g. sidepanel, popup, settings page, empty state). Group files by surface. Do not audit speculative or unfinished code flagged in `.claude/tasks/` as in-progress.
26
+
27
+ ## Step 3: audit each surface
28
+
29
+ For each surface, look for:
30
+
31
+ 1. **Missing feedback states**: loading, empty, error, disabled, in-progress
32
+ 2. **Unhandled edge cases**: long strings, overflow, zero items, many items, slow networks
33
+ 3. **Inconsistencies**: spacing, tone of voice, interaction patterns, icon use, keyboard affordances
34
+ 4. **Roughness in daily use**: friction, redundant steps, unclear affordances, ambiguous labels
35
+
36
+ Use `.claude/DESIGN.md` and the per-surface `.claude/wireframes/<surface>.md` files as ground truth for intent. For each implementation surface, read the matching wireframe file before flagging drift. Observations only, no implementation suggestions or fixes.
37
+
38
+ ## Step 4: report and persist
39
+
40
+ ### Report format
41
+
42
+ Start with a summary line. Group findings by surface. Omit surfaces with no findings.
43
+
44
+ ```markdown
45
+ X observations across N surfaces.
46
+
47
+ Surface: <name>
48
+
49
+ - Missing feedback state: <observation>
50
+ - Inconsistency: <observation>
51
+
52
+ Surface: <other>
53
+
54
+ - Edge case: <observation>
55
+ ```
56
+
57
+ If nothing is wrong, use: `✅ No observations.`
58
+
59
+ ### Persist
60
+
61
+ Derive a slug from the current git branch: run `git branch --show-current` and replace any `/` with `-`. If the result is empty (detached HEAD), use `latest`.
62
+
63
+ Write the full report directly to `.claude/review/ux-audit-<slug>.md` at the main worktree root, not the current worktree. See Worktrees in `CLAUDE.md`. Create the directory if it does not exist. Always overwrite.
64
+
65
+ If there are no observations, write `✅ No observations.` to the file with a timestamp.
66
+
67
+ The `.claude/review/` directory is gitignored. Do not stage or commit the file.
68
+
69
+ ### Chat output
70
+
71
+ Output only the summary line and the file path. Do not repeat the full report in chat.
72
+
73
+ ```plaintext
74
+ X observations across N surfaces.
75
+ 📝 Wrote .claude/review/ux-audit-<slug>.md
76
+ ```
77
+
78
+ If no observations: `✅ No observations. Wrote .claude/review/ux-audit-<slug>.md`
@@ -0,0 +1,79 @@
1
+ ---
2
+ name: claude-worktree
3
+ description: Enters a Claude Code worktree at `.claude/worktrees/<name>/` with a name derived from the active plan or branch. Use when asked to "enter a worktree", "start a worktree", "work in a worktree", or at the plan-to-execute boundary after `/claude-feature`. Do NOT use to list, clean up, or rotate worktrees.
4
+ ---
5
+
6
+ # Claude worktree
7
+
8
+ Wrap the `EnterWorktree` entry path with name derivation so the user does not pick a name by hand.
9
+
10
+ ## Guards
11
+
12
+ - If `git rev-parse --git-dir` and `git rev-parse --git-common-dir` differ, the session is already inside a linked worktree. Stop: `❌ Already in a worktree. Run ExitWorktree first.`
13
+ - If neither command resolves, the session is not in a git repo and no `WorktreeCreate` hook is configured. Stop: `❌ Not a git repository. EnterWorktree needs git or a WorktreeCreate hook.`
14
+
15
+ ## Step 1: resolve the main worktree root
16
+
17
+ Run in parallel:
18
+
19
+ - `git worktree list --porcelain | awk '/^worktree /{print $2; exit}' 2>/dev/null || pwd`
20
+ - `git branch --show-current 2>/dev/null || echo ""`
21
+ - `git config --get core.bare 2>/dev/null || echo false`
22
+
23
+ Plans always live at the main root, never inside a linked worktree. See Worktrees in `CLAUDE.md`.
24
+
25
+ `EnterWorktree` writes `core.bare = true` into the shared config, and nothing restores it, so the repository can already be broken before this session arrives. Repair it before entering when the value is `true` and `<main-root>/.git` is a directory:
26
+
27
+ ```bash
28
+ git config core.bare false
29
+ ```
30
+
31
+ The directory test separates the defect from a genuinely bare repository, which keeps its objects at the root and has no `.git` directory. Announce the repair in one line naming the flag. Leave the file alone when the value is already `false`.
32
+
33
+ ## Step 2: derive the worktree name
34
+
35
+ Try each source in order. Stop at the first match.
36
+
37
+ 1. **Plan matched to current branch.** Take the branch name and replace `/` with `-` to get `<slug>`. If `<main-root>/.claude/plans/feature-<slug>.md` exists, use `<slug>`.
38
+ 2. **Single plan file.** List `<main-root>/.claude/plans/feature-*.md`. If exactly one match, derive `<slug>` from the filename.
39
+ 3. **Multiple plan files, no branch match.** Ask the user which plan. Show the candidate slugs as a numbered list. Do not pick.
40
+ 4. **Current branch.** When no plan exists, use the branch name (with `/` replaced by `-`) if it is not `main` or `master`.
41
+ 4b. **Session context.** When on `main` or `master` with no matching plan, read the current conversation to infer a kebab slug from the topic being discussed. Propose it: `Infer: <slug>. Confirm or rename?` Do not enter the worktree until the user confirms or provides a corrected name.
42
+ 5. **Ask.** None of the above applies. Ask the user for a name. Do not invent one.
43
+
44
+ Validate the result: letters, digits, dots, underscores, dashes only, max 64 chars (`/` separators are also allowed). If the derived name violates the rule, sanitize by replacing invalid chars with `-` and truncating. Show the sanitized name in the preview before invoking.
45
+
46
+ ## Step 3: preview
47
+
48
+ Output exactly:
49
+
50
+ ```plaintext
51
+ Worktree: .claude/worktrees/<name>/
52
+ Source: <plan|branch|user>
53
+ ```
54
+
55
+ ## Step 4: enter
56
+
57
+ Call `EnterWorktree` with `name: "<name>"`. Claude Code's tool permission dialog is the confirmation gate. Do not pause for additional confirmation.
58
+
59
+ ## Step 5: align the branch name and repair the shared config
60
+
61
+ `EnterWorktree` creates a branch named `worktree-<name>`, which diverges from `<name>` and breaks downstream slug derivation in `claude-autoship` and any skill that reads `git branch --show-current`. Rename it to match:
62
+
63
+ ```bash
64
+ git branch -m worktree-<name> <name>
65
+ ```
66
+
67
+ Before renaming, guard against a collision: if `git show-ref --verify --quiet refs/heads/<name>` succeeds, the target branch already exists. Stop: `❌ Branch <name> already exists. Resolve manually before continuing.` Do not delete the existing branch.
68
+
69
+ Skip the rename if the worktree was entered via `path` rather than `name`, since the branch already exists under its own identity.
70
+
71
+ Entry also sets `core.bare = true` in the shared config, which strands the main worktree. Every later command run there fails with `fatal: this operation must be run in a work tree` while the files sit untouched on disk. The linked worktree keeps working, so nothing surfaces until the operator returns to the main checkout. Repeat the Step 1 repair, which writes the parent's config even from inside the linked worktree:
72
+
73
+ ```bash
74
+ git config core.bare false
75
+ ```
76
+
77
+ The flag is not set on every entry, so read before writing and announce only when the write happened. Tracked upstream as `anthropics/claude-code#58345`, closed as not planned, so the repair stays until the tool changes.
78
+
79
+ Do not invoke `ExitWorktree` from this skill. Exit is the user's call.
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: cli-script
3
+ description: Generates non-interactive Bash scripts for automation, CI, and agent-run tasks. Lean functional style with structured logging, strict error handling, and a clean stdout, no interactive UI. Use when asked for an automation script, a CI or cron script, a pipeline helper, or a non-interactive shell script. Do NOT use for a human-facing interactive tool with prompts or a visual timeline UI, that is `bash-script`.
4
+ ---
5
+
6
+ # CLI script
7
+
8
+ Generate non-interactive Bash scripts for automation, CI, and agent-run workflows. Optimize for robustness and composability, not visual polish. For a human-facing interactive tool with prompts and a timeline UI, use `bash-script` instead.
9
+
10
+ Load `${CLAUDE_SKILL_DIR}/references/template.md` for the base skeleton. Copy it and keep only what the task needs.
11
+
12
+ ## Script setup
13
+
14
+ - Start with `#!/usr/bin/env bash` and `set -euo pipefail`.
15
+ - Implement `usage()` and handle `-h` and `--help` when the script takes arguments.
16
+ - Do not rely on unset variables. Use `${VAR:-default}`.
17
+
18
+ ## Output contract
19
+
20
+ - Write data to stdout. Write logs, progress, and errors to stderr.
21
+ - Keep stdout clean so the script composes in a pipe.
22
+ - Do not emit timeline frames, icons, or color. Those belong in `bash-script`.
23
+
24
+ ## Error handling
25
+
26
+ - Define `die()` that prints an error to stderr and exits non-zero.
27
+ - Include actionable context in error messages.
28
+ - Guard commands that return non-zero on a valid empty result with `|| true`.
29
+ - Set explicit exit codes. Reserve 0 for success.
30
+
31
+ ## Code style
32
+
33
+ - Decompose by responsibility. Each function does one thing, `main()` orchestrates.
34
+ - Name functions verb-first: `parse_args`, `fetch_data`, `validate_input`.
35
+ - Quote variables in expansions and test brackets.
36
+ - Do not include comments except the shebang line.
37
+ - Use 2-space indentation.
38
+
39
+ ## Validation
40
+
41
+ Before responding, verify:
42
+
43
+ - File starts with `#!/usr/bin/env bash` and `set -euo pipefail`.
44
+ - Data goes to stdout, logs and errors go to stderr.
45
+ - No timeline frames, icons, or interactive prompts.
46
+ - Errors exit non-zero with context through `die()`.
47
+ - Functions are single-responsibility and `main()` delegates.