cognitive-core 0.2.1 → 0.2.3

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 (332) hide show
  1. package/dist/atlas.d.ts +10 -0
  2. package/dist/atlas.d.ts.map +1 -1
  3. package/dist/atlas.js +65 -0
  4. package/dist/atlas.js.map +1 -1
  5. package/dist/bin/cognitive-core.js +0 -0
  6. package/dist/memory/curated-loader.d.ts +21 -4
  7. package/dist/memory/curated-loader.d.ts.map +1 -1
  8. package/dist/memory/curated-loader.js +53 -16
  9. package/dist/memory/curated-loader.js.map +1 -1
  10. package/dist/memory/index.d.ts +2 -1
  11. package/dist/memory/index.d.ts.map +1 -1
  12. package/dist/memory/index.js +3 -1
  13. package/dist/memory/index.js.map +1 -1
  14. package/dist/memory/playbook.d.ts +6 -0
  15. package/dist/memory/playbook.d.ts.map +1 -1
  16. package/dist/memory/playbook.js +15 -0
  17. package/dist/memory/playbook.js.map +1 -1
  18. package/dist/memory/source-resolver.d.ts +120 -0
  19. package/dist/memory/source-resolver.d.ts.map +1 -0
  20. package/dist/memory/source-resolver.js +300 -0
  21. package/dist/memory/source-resolver.js.map +1 -0
  22. package/dist/types/config.d.ts +141 -0
  23. package/dist/types/config.d.ts.map +1 -1
  24. package/dist/types/config.js +40 -0
  25. package/dist/types/config.js.map +1 -1
  26. package/dist/types/index.d.ts +1 -1
  27. package/dist/types/index.d.ts.map +1 -1
  28. package/dist/types/index.js +1 -1
  29. package/dist/types/index.js.map +1 -1
  30. package/dist/workspace/types.d.ts +12 -54
  31. package/dist/workspace/types.d.ts.map +1 -1
  32. package/dist/workspace/types.js.map +1 -1
  33. package/package.json +3 -3
  34. package/playbooks/compound-engineering/adversarial-review.json +51 -0
  35. package/playbooks/compound-engineering/agent-native-architecture.json +59 -0
  36. package/playbooks/compound-engineering/agent-native-review.json +54 -0
  37. package/playbooks/compound-engineering/api-contract-review.json +52 -0
  38. package/playbooks/compound-engineering/brainstorm-requirements.json +55 -0
  39. package/playbooks/compound-engineering/bug-reproduction.json +62 -0
  40. package/playbooks/compound-engineering/confidence-calibration.json +49 -0
  41. package/playbooks/compound-engineering/correctness-review.json +49 -0
  42. package/playbooks/compound-engineering/data-migration-safety.json +59 -0
  43. package/playbooks/compound-engineering/deployment-verification.json +63 -0
  44. package/playbooks/compound-engineering/error-recovery-patterns.json +53 -0
  45. package/playbooks/compound-engineering/implementation-planning.json +64 -0
  46. package/playbooks/compound-engineering/issue-pattern-analysis.json +53 -0
  47. package/playbooks/compound-engineering/knowledge-compounding.json +63 -0
  48. package/playbooks/compound-engineering/learnings-research.json +54 -0
  49. package/playbooks/compound-engineering/maintainability-review.json +49 -0
  50. package/playbooks/compound-engineering/performance-review.json +54 -0
  51. package/playbooks/compound-engineering/plan-adversarial-review.json +56 -0
  52. package/playbooks/compound-engineering/plan-feasibility-review.json +56 -0
  53. package/playbooks/compound-engineering/project-standards-review.json +52 -0
  54. package/playbooks/compound-engineering/reliability-review.json +53 -0
  55. package/playbooks/compound-engineering/review-orchestration.json +64 -0
  56. package/playbooks/compound-engineering/security-review.json +54 -0
  57. package/playbooks/compound-engineering/systematic-execution.json +64 -0
  58. package/playbooks/compound-engineering/testing-review.json +50 -0
  59. package/src/atlas.ts +96 -0
  60. package/src/memory/curated-loader.ts +69 -16
  61. package/src/memory/index.ts +16 -0
  62. package/src/memory/playbook.ts +19 -0
  63. package/src/memory/source-resolver.ts +422 -0
  64. package/src/types/config.ts +46 -0
  65. package/src/types/index.ts +4 -0
  66. package/src/workspace/types.ts +22 -78
  67. package/tests/integration/curated-sources-e2e.test.ts +502 -0
  68. package/tests/memory/compound-engineering-seed.test.ts +338 -0
  69. package/tests/memory/curated-loader-extended.test.ts +225 -0
  70. package/tests/memory/playbook-quality-validation.test.ts +430 -0
  71. package/tests/memory/source-resolver.test.ts +700 -0
  72. package/.claude/settings.local.json +0 -11
  73. package/dist/learning/llm-extractor.d.ts +0 -88
  74. package/dist/learning/llm-extractor.d.ts.map +0 -1
  75. package/dist/learning/llm-extractor.js +0 -372
  76. package/dist/learning/llm-extractor.js.map +0 -1
  77. package/dist/learning/loop-coordinator.d.ts +0 -61
  78. package/dist/learning/loop-coordinator.d.ts.map +0 -1
  79. package/dist/learning/loop-coordinator.js +0 -96
  80. package/dist/learning/loop-coordinator.js.map +0 -1
  81. package/dist/learning/pipeline.d.ts +0 -116
  82. package/dist/learning/pipeline.d.ts.map +0 -1
  83. package/dist/learning/pipeline.js +0 -288
  84. package/dist/learning/pipeline.js.map +0 -1
  85. package/references/agent-workspace/CLAUDE.md +0 -74
  86. package/references/agent-workspace/README.md +0 -587
  87. package/references/agent-workspace/media/banner.png +0 -0
  88. package/references/agent-workspace/package-lock.json +0 -2061
  89. package/references/agent-workspace/package.json +0 -54
  90. package/references/agent-workspace/src/handle.ts +0 -122
  91. package/references/agent-workspace/src/index.ts +0 -32
  92. package/references/agent-workspace/src/manager.ts +0 -102
  93. package/references/agent-workspace/src/readers/json.ts +0 -71
  94. package/references/agent-workspace/src/readers/markdown.ts +0 -37
  95. package/references/agent-workspace/src/readers/raw.ts +0 -27
  96. package/references/agent-workspace/src/types.ts +0 -68
  97. package/references/agent-workspace/src/validation.ts +0 -93
  98. package/references/agent-workspace/src/writers/json.ts +0 -17
  99. package/references/agent-workspace/src/writers/markdown.ts +0 -27
  100. package/references/agent-workspace/src/writers/raw.ts +0 -22
  101. package/references/agent-workspace/tests/errors.test.ts +0 -652
  102. package/references/agent-workspace/tests/handle.test.ts +0 -144
  103. package/references/agent-workspace/tests/manager.test.ts +0 -124
  104. package/references/agent-workspace/tests/readers.test.ts +0 -205
  105. package/references/agent-workspace/tests/validation.test.ts +0 -196
  106. package/references/agent-workspace/tests/writers.test.ts +0 -108
  107. package/references/agent-workspace/tsconfig.json +0 -20
  108. package/references/agent-workspace/tsup.config.ts +0 -9
  109. package/references/minimem/.claude/settings.json +0 -7
  110. package/references/minimem/.sudocode/issues.jsonl +0 -18
  111. package/references/minimem/.sudocode/specs.jsonl +0 -1
  112. package/references/minimem/CLAUDE.md +0 -310
  113. package/references/minimem/README.md +0 -556
  114. package/references/minimem/claude-plugin/.claude-plugin/plugin.json +0 -10
  115. package/references/minimem/claude-plugin/.mcp.json +0 -7
  116. package/references/minimem/claude-plugin/README.md +0 -158
  117. package/references/minimem/claude-plugin/commands/recall.md +0 -47
  118. package/references/minimem/claude-plugin/commands/remember.md +0 -41
  119. package/references/minimem/claude-plugin/hooks/__tests__/hooks.test.ts +0 -272
  120. package/references/minimem/claude-plugin/hooks/hooks.json +0 -27
  121. package/references/minimem/claude-plugin/hooks/session-end.sh +0 -86
  122. package/references/minimem/claude-plugin/hooks/session-start.sh +0 -85
  123. package/references/minimem/claude-plugin/skills/memory/SKILL.md +0 -108
  124. package/references/minimem/package-lock.json +0 -5373
  125. package/references/minimem/package.json +0 -60
  126. package/references/minimem/scripts/postbuild.js +0 -35
  127. package/references/minimem/src/__tests__/edge-cases.test.ts +0 -371
  128. package/references/minimem/src/__tests__/errors.test.ts +0 -265
  129. package/references/minimem/src/__tests__/helpers.ts +0 -199
  130. package/references/minimem/src/__tests__/internal.test.ts +0 -407
  131. package/references/minimem/src/__tests__/knowledge.test.ts +0 -287
  132. package/references/minimem/src/__tests__/minimem.integration.test.ts +0 -1127
  133. package/references/minimem/src/__tests__/session.test.ts +0 -190
  134. package/references/minimem/src/cli/__tests__/commands.test.ts +0 -759
  135. package/references/minimem/src/cli/commands/__tests__/conflicts.test.ts +0 -141
  136. package/references/minimem/src/cli/commands/append.ts +0 -76
  137. package/references/minimem/src/cli/commands/config.ts +0 -262
  138. package/references/minimem/src/cli/commands/conflicts.ts +0 -413
  139. package/references/minimem/src/cli/commands/daemon.ts +0 -169
  140. package/references/minimem/src/cli/commands/index.ts +0 -12
  141. package/references/minimem/src/cli/commands/init.ts +0 -88
  142. package/references/minimem/src/cli/commands/mcp.ts +0 -177
  143. package/references/minimem/src/cli/commands/push-pull.ts +0 -213
  144. package/references/minimem/src/cli/commands/search.ts +0 -158
  145. package/references/minimem/src/cli/commands/status.ts +0 -84
  146. package/references/minimem/src/cli/commands/sync-init.ts +0 -290
  147. package/references/minimem/src/cli/commands/sync.ts +0 -70
  148. package/references/minimem/src/cli/commands/upsert.ts +0 -197
  149. package/references/minimem/src/cli/config.ts +0 -584
  150. package/references/minimem/src/cli/index.ts +0 -264
  151. package/references/minimem/src/cli/shared.ts +0 -161
  152. package/references/minimem/src/cli/sync/__tests__/central.test.ts +0 -152
  153. package/references/minimem/src/cli/sync/__tests__/conflicts.test.ts +0 -209
  154. package/references/minimem/src/cli/sync/__tests__/daemon.test.ts +0 -118
  155. package/references/minimem/src/cli/sync/__tests__/detection.test.ts +0 -207
  156. package/references/minimem/src/cli/sync/__tests__/integration.test.ts +0 -476
  157. package/references/minimem/src/cli/sync/__tests__/registry.test.ts +0 -363
  158. package/references/minimem/src/cli/sync/__tests__/state.test.ts +0 -255
  159. package/references/minimem/src/cli/sync/__tests__/validation.test.ts +0 -193
  160. package/references/minimem/src/cli/sync/__tests__/watcher.test.ts +0 -178
  161. package/references/minimem/src/cli/sync/central.ts +0 -292
  162. package/references/minimem/src/cli/sync/conflicts.ts +0 -204
  163. package/references/minimem/src/cli/sync/daemon.ts +0 -407
  164. package/references/minimem/src/cli/sync/detection.ts +0 -138
  165. package/references/minimem/src/cli/sync/index.ts +0 -107
  166. package/references/minimem/src/cli/sync/operations.ts +0 -373
  167. package/references/minimem/src/cli/sync/registry.ts +0 -279
  168. package/references/minimem/src/cli/sync/state.ts +0 -355
  169. package/references/minimem/src/cli/sync/validation.ts +0 -206
  170. package/references/minimem/src/cli/sync/watcher.ts +0 -234
  171. package/references/minimem/src/cli/version.ts +0 -34
  172. package/references/minimem/src/core/index.ts +0 -9
  173. package/references/minimem/src/core/indexer.ts +0 -628
  174. package/references/minimem/src/core/searcher.ts +0 -221
  175. package/references/minimem/src/db/schema.ts +0 -183
  176. package/references/minimem/src/db/sqlite-vec.ts +0 -24
  177. package/references/minimem/src/embeddings/__tests__/embeddings.test.ts +0 -431
  178. package/references/minimem/src/embeddings/batch-gemini.ts +0 -392
  179. package/references/minimem/src/embeddings/batch-openai.ts +0 -409
  180. package/references/minimem/src/embeddings/embeddings.ts +0 -434
  181. package/references/minimem/src/index.ts +0 -109
  182. package/references/minimem/src/internal.ts +0 -299
  183. package/references/minimem/src/minimem.ts +0 -1276
  184. package/references/minimem/src/search/__tests__/hybrid.test.ts +0 -247
  185. package/references/minimem/src/search/graph.ts +0 -234
  186. package/references/minimem/src/search/hybrid.ts +0 -151
  187. package/references/minimem/src/search/search.ts +0 -256
  188. package/references/minimem/src/server/__tests__/mcp.test.ts +0 -341
  189. package/references/minimem/src/server/__tests__/tools.test.ts +0 -364
  190. package/references/minimem/src/server/mcp.ts +0 -326
  191. package/references/minimem/src/server/tools.ts +0 -720
  192. package/references/minimem/src/session.ts +0 -460
  193. package/references/minimem/tsconfig.json +0 -19
  194. package/references/minimem/tsup.config.ts +0 -26
  195. package/references/minimem/vitest.config.ts +0 -24
  196. package/references/sessionlog/.husky/pre-commit +0 -1
  197. package/references/sessionlog/.lintstagedrc.json +0 -4
  198. package/references/sessionlog/.prettierignore +0 -4
  199. package/references/sessionlog/.prettierrc.json +0 -11
  200. package/references/sessionlog/LICENSE +0 -21
  201. package/references/sessionlog/README.md +0 -453
  202. package/references/sessionlog/eslint.config.js +0 -58
  203. package/references/sessionlog/package-lock.json +0 -3672
  204. package/references/sessionlog/package.json +0 -65
  205. package/references/sessionlog/src/__tests__/agent-hooks.test.ts +0 -570
  206. package/references/sessionlog/src/__tests__/agent-registry.test.ts +0 -127
  207. package/references/sessionlog/src/__tests__/claude-code-hooks.test.ts +0 -225
  208. package/references/sessionlog/src/__tests__/claude-generator.test.ts +0 -46
  209. package/references/sessionlog/src/__tests__/commit-msg.test.ts +0 -86
  210. package/references/sessionlog/src/__tests__/cursor-agent.test.ts +0 -224
  211. package/references/sessionlog/src/__tests__/e2e-live.test.ts +0 -890
  212. package/references/sessionlog/src/__tests__/event-log.test.ts +0 -183
  213. package/references/sessionlog/src/__tests__/flush-sentinel.test.ts +0 -105
  214. package/references/sessionlog/src/__tests__/gemini-agent.test.ts +0 -375
  215. package/references/sessionlog/src/__tests__/git-hooks.test.ts +0 -78
  216. package/references/sessionlog/src/__tests__/hook-managers.test.ts +0 -121
  217. package/references/sessionlog/src/__tests__/lifecycle-tasks.test.ts +0 -759
  218. package/references/sessionlog/src/__tests__/opencode-agent.test.ts +0 -338
  219. package/references/sessionlog/src/__tests__/redaction.test.ts +0 -136
  220. package/references/sessionlog/src/__tests__/session-repo.test.ts +0 -353
  221. package/references/sessionlog/src/__tests__/session-store.test.ts +0 -166
  222. package/references/sessionlog/src/__tests__/setup-ccweb.test.ts +0 -466
  223. package/references/sessionlog/src/__tests__/skill-live.test.ts +0 -461
  224. package/references/sessionlog/src/__tests__/summarize.test.ts +0 -348
  225. package/references/sessionlog/src/__tests__/task-plan-e2e.test.ts +0 -610
  226. package/references/sessionlog/src/__tests__/task-plan-live.test.ts +0 -632
  227. package/references/sessionlog/src/__tests__/transcript-timestamp.test.ts +0 -121
  228. package/references/sessionlog/src/__tests__/types.test.ts +0 -166
  229. package/references/sessionlog/src/__tests__/utils.test.ts +0 -333
  230. package/references/sessionlog/src/__tests__/validation.test.ts +0 -103
  231. package/references/sessionlog/src/__tests__/worktree.test.ts +0 -57
  232. package/references/sessionlog/src/agent/agents/claude-code.ts +0 -1089
  233. package/references/sessionlog/src/agent/agents/cursor.ts +0 -361
  234. package/references/sessionlog/src/agent/agents/gemini-cli.ts +0 -632
  235. package/references/sessionlog/src/agent/agents/opencode.ts +0 -540
  236. package/references/sessionlog/src/agent/registry.ts +0 -143
  237. package/references/sessionlog/src/agent/session-types.ts +0 -113
  238. package/references/sessionlog/src/agent/types.ts +0 -220
  239. package/references/sessionlog/src/cli.ts +0 -597
  240. package/references/sessionlog/src/commands/clean.ts +0 -133
  241. package/references/sessionlog/src/commands/disable.ts +0 -84
  242. package/references/sessionlog/src/commands/doctor.ts +0 -145
  243. package/references/sessionlog/src/commands/enable.ts +0 -202
  244. package/references/sessionlog/src/commands/explain.ts +0 -261
  245. package/references/sessionlog/src/commands/reset.ts +0 -105
  246. package/references/sessionlog/src/commands/resume.ts +0 -180
  247. package/references/sessionlog/src/commands/rewind.ts +0 -195
  248. package/references/sessionlog/src/commands/setup-ccweb.ts +0 -275
  249. package/references/sessionlog/src/commands/status.ts +0 -172
  250. package/references/sessionlog/src/config.ts +0 -165
  251. package/references/sessionlog/src/events/event-log.ts +0 -126
  252. package/references/sessionlog/src/git-operations.ts +0 -558
  253. package/references/sessionlog/src/hooks/git-hooks.ts +0 -165
  254. package/references/sessionlog/src/hooks/lifecycle.ts +0 -391
  255. package/references/sessionlog/src/index.ts +0 -650
  256. package/references/sessionlog/src/security/redaction.ts +0 -283
  257. package/references/sessionlog/src/session/state-machine.ts +0 -452
  258. package/references/sessionlog/src/store/checkpoint-store.ts +0 -509
  259. package/references/sessionlog/src/store/native-store.ts +0 -173
  260. package/references/sessionlog/src/store/provider-types.ts +0 -99
  261. package/references/sessionlog/src/store/session-store.ts +0 -266
  262. package/references/sessionlog/src/strategy/attribution.ts +0 -296
  263. package/references/sessionlog/src/strategy/common.ts +0 -207
  264. package/references/sessionlog/src/strategy/content-overlap.ts +0 -228
  265. package/references/sessionlog/src/strategy/manual-commit.ts +0 -988
  266. package/references/sessionlog/src/strategy/types.ts +0 -279
  267. package/references/sessionlog/src/summarize/claude-generator.ts +0 -115
  268. package/references/sessionlog/src/summarize/summarize.ts +0 -432
  269. package/references/sessionlog/src/types.ts +0 -508
  270. package/references/sessionlog/src/utils/chunk-files.ts +0 -49
  271. package/references/sessionlog/src/utils/commit-message.ts +0 -65
  272. package/references/sessionlog/src/utils/detect-agent.ts +0 -36
  273. package/references/sessionlog/src/utils/hook-managers.ts +0 -125
  274. package/references/sessionlog/src/utils/ide-tags.ts +0 -32
  275. package/references/sessionlog/src/utils/paths.ts +0 -79
  276. package/references/sessionlog/src/utils/preview-rewind.ts +0 -80
  277. package/references/sessionlog/src/utils/rewind-conflict.ts +0 -121
  278. package/references/sessionlog/src/utils/shadow-branch.ts +0 -109
  279. package/references/sessionlog/src/utils/string-utils.ts +0 -46
  280. package/references/sessionlog/src/utils/todo-extract.ts +0 -188
  281. package/references/sessionlog/src/utils/trailers.ts +0 -187
  282. package/references/sessionlog/src/utils/transcript-parse.ts +0 -177
  283. package/references/sessionlog/src/utils/transcript-timestamp.ts +0 -59
  284. package/references/sessionlog/src/utils/tree-ops.ts +0 -219
  285. package/references/sessionlog/src/utils/tty.ts +0 -72
  286. package/references/sessionlog/src/utils/validation.ts +0 -65
  287. package/references/sessionlog/src/utils/worktree.ts +0 -58
  288. package/references/sessionlog/src/wire-types.ts +0 -59
  289. package/references/sessionlog/templates/setup-env.sh +0 -153
  290. package/references/sessionlog/tsconfig.json +0 -18
  291. package/references/sessionlog/vitest.config.ts +0 -12
  292. package/references/skill-tree/.claude/settings.json +0 -6
  293. package/references/skill-tree/.sudocode/issues.jsonl +0 -19
  294. package/references/skill-tree/.sudocode/specs.jsonl +0 -3
  295. package/references/skill-tree/CLAUDE.md +0 -126
  296. package/references/skill-tree/README.md +0 -372
  297. package/references/skill-tree/docs/GAPS_v1.md +0 -221
  298. package/references/skill-tree/docs/INTEGRATION_PLAN.md +0 -467
  299. package/references/skill-tree/docs/TODOS.md +0 -91
  300. package/references/skill-tree/docs/anthropic_skill_guide.md +0 -1364
  301. package/references/skill-tree/docs/design/federated-skill-trees.md +0 -524
  302. package/references/skill-tree/docs/design/multi-agent-sync.md +0 -759
  303. package/references/skill-tree/docs/scraper/BRAINSTORM.md +0 -583
  304. package/references/skill-tree/docs/scraper/POC_PLAN.md +0 -420
  305. package/references/skill-tree/docs/scraper/README.md +0 -170
  306. package/references/skill-tree/examples/basic-usage.ts +0 -164
  307. package/references/skill-tree/package-lock.json +0 -1852
  308. package/references/skill-tree/package.json +0 -66
  309. package/references/skill-tree/scraper/README.md +0 -123
  310. package/references/skill-tree/scraper/docs/DESIGN.md +0 -683
  311. package/references/skill-tree/scraper/docs/PLAN.md +0 -336
  312. package/references/skill-tree/scraper/drizzle.config.ts +0 -10
  313. package/references/skill-tree/scraper/package-lock.json +0 -6329
  314. package/references/skill-tree/scraper/package.json +0 -68
  315. package/references/skill-tree/scraper/test/fixtures/invalid-skill/missing-description.md +0 -7
  316. package/references/skill-tree/scraper/test/fixtures/invalid-skill/missing-name.md +0 -7
  317. package/references/skill-tree/scraper/test/fixtures/minimal-skill/SKILL.md +0 -27
  318. package/references/skill-tree/scraper/test/fixtures/skill-json/SKILL.json +0 -21
  319. package/references/skill-tree/scraper/test/fixtures/skill-with-meta/SKILL.md +0 -54
  320. package/references/skill-tree/scraper/test/fixtures/skill-with-meta/_meta.json +0 -24
  321. package/references/skill-tree/scraper/test/fixtures/valid-skill/SKILL.md +0 -93
  322. package/references/skill-tree/scraper/test/fixtures/valid-skill/_meta.json +0 -22
  323. package/references/skill-tree/scraper/tsup.config.ts +0 -14
  324. package/references/skill-tree/scraper/vitest.config.ts +0 -17
  325. package/references/skill-tree/scripts/convert-to-vitest.ts +0 -166
  326. package/references/skill-tree/skills/skill-writer/SKILL.md +0 -339
  327. package/references/skill-tree/skills/skill-writer/references/examples.md +0 -326
  328. package/references/skill-tree/skills/skill-writer/references/patterns.md +0 -210
  329. package/references/skill-tree/skills/skill-writer/references/quality-checklist.md +0 -123
  330. package/references/skill-tree/test/run-all.ts +0 -106
  331. package/references/skill-tree/test/utils.ts +0 -128
  332. package/references/skill-tree/vitest.config.ts +0 -16
@@ -1,339 +0,0 @@
1
- ---
2
- name: skill-writer
3
- description: Comprehensive guide for creating high-quality skills for Claude. Use when building a new skill, writing a SKILL.md, designing skill frontmatter, planning skill structure, debugging trigger issues, or reviewing an existing skill for improvements. Covers standalone skills, MCP-enhanced skills, and skill-tree programmatic skills.
4
- metadata:
5
- author: skill-tree
6
- version: 1.0.0
7
- category: meta
8
- tags: [skill-creation, authoring, best-practices]
9
- ---
10
-
11
- # Skill Writer
12
-
13
- Create well-structured, effective skills that trigger reliably, follow Anthropic's progressive disclosure model, and produce consistent results.
14
-
15
- ## Core Concepts
16
-
17
- A skill is a folder containing instructions that teach Claude to handle specific tasks or workflows. Skills eliminate the need to re-explain preferences, processes, and domain expertise in every conversation.
18
-
19
- ### Progressive Disclosure (Three Levels)
20
-
21
- 1. **YAML frontmatter** (always in system prompt): Enough for Claude to decide *when* to load the skill
22
- 2. **SKILL.md body** (loaded when relevant): Full instructions and guidance
23
- 3. **Linked files** (loaded as needed): References, scripts, assets in subdirectories
24
-
25
- This minimizes token usage while maintaining specialized expertise.
26
-
27
- ### Design Principles
28
-
29
- - **Composability**: Skills run alongside other skills. Never assume exclusive context.
30
- - **Portability**: Skills work across Claude.ai, Claude Code, and API without modification (given environment dependencies are met).
31
- - **Progressive complexity**: Start simple, add depth through references.
32
-
33
- ## Instructions
34
-
35
- ### Step 1: Define Use Cases
36
-
37
- Before writing anything, identify 2-3 concrete use cases.
38
-
39
- For each use case, document:
40
- - **Trigger**: What the user says or does
41
- - **Steps**: The multi-step workflow required
42
- - **Result**: The concrete outcome produced
43
-
44
- Determine which category the skill falls into:
45
-
46
- | Category | Purpose | Example |
47
- |----------|---------|---------|
48
- | Document/Asset Creation | Consistent, high-quality output | frontend-design, docx, pptx |
49
- | Workflow Automation | Multi-step processes with methodology | skill-creator, sprint-planner |
50
- | MCP Enhancement | Workflow guidance for MCP tool access | sentry-code-review |
51
-
52
- ### Step 2: Create the Folder Structure
53
-
54
- ```
55
- your-skill-name/
56
- ├── SKILL.md # Required - main instruction file
57
- ├── scripts/ # Optional - executable code (Python, Bash)
58
- ├── references/ # Optional - detailed docs loaded as needed
59
- └── assets/ # Optional - templates, fonts, icons
60
- ```
61
-
62
- Critical naming rules:
63
- - Folder: **kebab-case only** (`my-skill-name`)
64
- - File: **exactly** `SKILL.md` (case-sensitive, no variations)
65
- - No `README.md` inside the skill folder
66
- - No spaces, underscores, or capitals in folder name
67
-
68
- ### Step 3: Write the YAML Frontmatter
69
-
70
- The frontmatter is *the most important part* - it determines whether Claude loads the skill.
71
-
72
- Minimal required format:
73
-
74
- ```yaml
75
- ---
76
- name: your-skill-name
77
- description: What it does. Use when user asks to [specific phrases].
78
- ---
79
- ```
80
-
81
- #### The `name` Field
82
-
83
- - kebab-case only, no spaces or capitals
84
- - Must match the folder name
85
- - Never use "claude" or "anthropic" as a prefix (reserved)
86
-
87
- #### The `description` Field (Critical)
88
-
89
- Structure: `[What it does] + [When to use it] + [Key capabilities]`
90
-
91
- Must include BOTH:
92
- 1. What the skill does
93
- 2. When to use it (trigger conditions with specific phrases)
94
-
95
- Constraints:
96
- - Under 1024 characters
97
- - No XML angle brackets (`<` or `>`)
98
- - Include specific tasks/phrases users would actually say
99
- - Mention relevant file types if applicable
100
-
101
- **Good descriptions:**
102
-
103
- ```yaml
104
- # Specific + actionable + trigger phrases
105
- description: Analyzes Figma design files and generates developer
106
- handoff documentation. Use when user uploads .fig files, asks for
107
- "design specs", "component documentation", or "design-to-code handoff".
108
-
109
- # Clear value proposition + triggers
110
- description: End-to-end customer onboarding workflow for PayFlow.
111
- Handles account creation, payment setup, and subscription management.
112
- Use when user says "onboard new customer", "set up subscription",
113
- or "create PayFlow account".
114
- ```
115
-
116
- **Bad descriptions:**
117
-
118
- ```yaml
119
- # Too vague - won't trigger
120
- description: Helps with projects.
121
-
122
- # Missing triggers - Claude won't know when to load
123
- description: Creates sophisticated multi-page documentation systems.
124
-
125
- # Too technical, no user-facing triggers
126
- description: Implements the Project entity model with hierarchical
127
- relationships.
128
- ```
129
-
130
- #### Optional Fields
131
-
132
- ```yaml
133
- license: MIT # For open-source skills
134
- compatibility: Requires Python 3.10+ # 1-500 chars, environment needs
135
- allowed-tools: "Bash(python:*) WebFetch" # Restrict tool access
136
- metadata: # Custom key-value pairs
137
- author: Your Name
138
- version: 1.0.0
139
- mcp-server: server-name
140
- tags: [automation, productivity]
141
- ```
142
-
143
- #### Security Restrictions
144
-
145
- Forbidden in frontmatter:
146
- - XML angle brackets (`<` `>`) - prevents prompt injection
147
- - Skills named with "claude" or "anthropic" prefix
148
-
149
- ### Step 4: Write the Instructions Body
150
-
151
- After the frontmatter, write instructions in Markdown.
152
-
153
- #### Recommended Structure
154
-
155
- ```markdown
156
- # Skill Name
157
-
158
- ## Instructions
159
-
160
- ### Step 1: [First Major Step]
161
- Clear explanation of what happens.
162
-
163
- Example:
164
- \`\`\`bash
165
- python scripts/fetch_data.py --project-id PROJECT_ID
166
- \`\`\`
167
- Expected output: [describe what success looks like]
168
-
169
- (Add more steps as needed)
170
-
171
- ## Examples
172
-
173
- ### Example 1: [Common Scenario]
174
- User says: "Set up a new marketing campaign"
175
- Actions:
176
- 1. Fetch existing campaigns via MCP
177
- 2. Create new campaign with provided parameters
178
- Result: Campaign created with confirmation link
179
-
180
- ## Troubleshooting
181
-
182
- ### Error: [Common error message]
183
- Cause: [Why it happens]
184
- Solution: [How to fix]
185
- ```
186
-
187
- #### Writing Style Rules
188
-
189
- - **Imperative/infinitive form**: "To accomplish X, execute Y" or "Load this skill when Z"
190
- - **Avoid second person**: Do NOT write "You should..." or "If you need..."
191
- - **Be specific and actionable**: Include exact commands, parameters, expected outputs
192
- - **Use bullet points and numbered lists** for scanability
193
- - **Put critical instructions at the top** using `## Important` or `## Critical` headers
194
-
195
- #### Error Handling
196
-
197
- Always include error handling:
198
-
199
- ```markdown
200
- ## Common Issues
201
-
202
- ### MCP Connection Failed
203
- If "Connection refused" appears:
204
- 1. Verify MCP server is running: Check Settings > Extensions
205
- 2. Confirm API key is valid
206
- 3. Try reconnecting: Settings > Extensions > [Service] > Reconnect
207
- ```
208
-
209
- #### Progressive Disclosure in Practice
210
-
211
- Keep SKILL.md focused on core instructions (under 5,000 words). Move detailed documentation to `references/`:
212
-
213
- ```markdown
214
- Before writing queries, consult `references/api-patterns.md` for:
215
- - Rate limiting guidance
216
- - Pagination patterns
217
- - Error codes and handling
218
- ```
219
-
220
- #### Combating Instruction Drift
221
-
222
- For critical validations, prefer bundling a script over relying on language instructions:
223
-
224
- ```markdown
225
- CRITICAL: Before calling create_project, verify:
226
- - Project name is non-empty
227
- - At least one team member assigned
228
- - Start date is not in the past
229
- ```
230
-
231
- For deterministic checks, use `scripts/validate.py` instead of prose instructions.
232
-
233
- ### Step 5: Choose an Implementation Pattern
234
-
235
- Select the pattern that fits the skill's workflow. See `references/patterns.md` for detailed examples.
236
-
237
- | Pattern | Use When |
238
- |---------|----------|
239
- | Sequential Workflow | Multi-step processes in specific order |
240
- | Multi-MCP Coordination | Workflows spanning multiple services |
241
- | Iterative Refinement | Output quality improves with iteration |
242
- | Context-Aware Selection | Same outcome, different tools per context |
243
- | Domain Intelligence | Specialized knowledge beyond tool access |
244
-
245
- ### Step 6: Test the Skill
246
-
247
- #### Triggering Tests
248
- Run 10-20 test queries. Target: skill triggers on 90%+ of relevant queries.
249
-
250
- Should trigger:
251
- - Obvious task descriptions
252
- - Paraphrased requests
253
- - Domain-specific terminology
254
-
255
- Should NOT trigger:
256
- - Unrelated topics
257
- - Queries better served by other skills
258
-
259
- Debug triggering: Ask Claude "When would you use the [skill name] skill?" and compare against expected triggers.
260
-
261
- #### Functional Tests
262
- - Valid outputs generated
263
- - API/MCP calls succeed
264
- - Error handling works
265
- - Edge cases covered
266
-
267
- #### Performance Comparison
268
- Compare with and without the skill:
269
- - Number of back-and-forth messages
270
- - Failed API calls
271
- - Total tokens consumed
272
- - User corrections needed
273
-
274
- ### Step 7: Iterate
275
-
276
- Skills are living documents. Watch for:
277
-
278
- **Undertriggering** (skill doesn't load when it should):
279
- - Add more trigger phrases to the description
280
- - Include technical keywords and synonyms
281
-
282
- **Overtriggering** (skill loads for unrelated queries):
283
- - Add negative triggers: "Do NOT use for simple data exploration"
284
- - Be more specific about scope
285
- - Clarify boundaries with other skills
286
-
287
- **Execution issues** (inconsistent results):
288
- - Make instructions more specific
289
- - Add error handling
290
- - Move verbose content to references
291
-
292
- ## Skill-Tree Programmatic Skills
293
-
294
- When creating skills for the skill-tree library (as opposed to SKILL.md files), structure them with these fields:
295
-
296
- ```typescript
297
- {
298
- id: "kebab-case-id",
299
- name: "Human-Readable Name",
300
- version: "1.0.0",
301
- description: "Short description for semantic matching (1-2 sentences)",
302
- problem: "What problem this skill solves",
303
- triggerConditions: [
304
- { type: "error", value: "Cannot find module", description: "ES module import failure" },
305
- { type: "keyword", value: "typescript, import", description: "TypeScript imports" },
306
- { type: "pattern", value: "\\.(ts|tsx)$", description: "TypeScript files" }
307
- ],
308
- solution: "Step-by-step solution in imperative form",
309
- verification: "How to verify the skill worked",
310
- examples: [
311
- { scenario: "Description", before: "Before state", after: "After state" }
312
- ],
313
- tags: ["typescript", "modules"],
314
- status: "active"
315
- }
316
- ```
317
-
318
- Trigger condition types:
319
- - `error`: Error message patterns (regex)
320
- - `keyword`: Comma-separated keywords
321
- - `pattern`: Regex for file paths or content
322
- - `context`: Contextual description
323
- - `custom`: Freeform condition
324
-
325
- ## Quality Checklist
326
-
327
- Before shipping, verify against `references/quality-checklist.md`.
328
-
329
- Quick validation:
330
- - [ ] Folder is kebab-case, SKILL.md exists (exact spelling)
331
- - [ ] Frontmatter has `---` delimiters, `name` and `description` fields
332
- - [ ] Description includes WHAT it does and WHEN to use it
333
- - [ ] No XML tags anywhere in frontmatter
334
- - [ ] Instructions are specific and actionable (not vague)
335
- - [ ] Error handling included for common failure modes
336
- - [ ] Examples provided for primary use cases
337
- - [ ] SKILL.md is under 5,000 words
338
- - [ ] Detailed docs moved to references/
339
- - [ ] Tested: triggers correctly, doesn't overtrigger, produces correct output
@@ -1,326 +0,0 @@
1
- # Skill Examples
2
-
3
- Complete examples demonstrating different skill categories and patterns.
4
-
5
- ---
6
-
7
- ## Example 1: Document Creation Skill (Category 1)
8
-
9
- A standalone skill for generating API documentation.
10
-
11
- ```
12
- api-docs-generator/
13
- ├── SKILL.md
14
- ├── references/
15
- │ └── style-guide.md
16
- └── assets/
17
- └── doc-template.md
18
- ```
19
-
20
- ### SKILL.md
21
-
22
- ```yaml
23
- ---
24
- name: api-docs-generator
25
- description: >-
26
- Generates consistent API documentation from code and OpenAPI specs.
27
- Use when user asks to "document this API", "generate API docs",
28
- "create endpoint documentation", or uploads .yaml/.json OpenAPI files.
29
- metadata:
30
- author: api-team
31
- version: 1.2.0
32
- tags: [documentation, api, openapi]
33
- ---
34
- ```
35
-
36
- ```markdown
37
- # API Documentation Generator
38
-
39
- ## Instructions
40
-
41
- ### Step 1: Identify API Source
42
- Determine the documentation source:
43
- - OpenAPI/Swagger spec file (.yaml or .json)
44
- - Source code with route definitions
45
- - Existing partial documentation to extend
46
-
47
- ### Step 2: Extract Endpoints
48
- For each endpoint, capture:
49
- - HTTP method and path
50
- - Request parameters (path, query, body)
51
- - Response schema and status codes
52
- - Authentication requirements
53
-
54
- ### Step 3: Generate Documentation
55
- Apply the style guide from `references/style-guide.md`.
56
-
57
- For each endpoint, produce:
58
- 1. One-line description
59
- 2. Full URL with base path
60
- 3. Request example with curl
61
- 4. Response example with JSON
62
- 5. Error responses table
63
-
64
- ### Step 4: Validate
65
- - All endpoints from source are documented
66
- - Examples are syntactically valid
67
- - Cross-references between related endpoints exist
68
-
69
- ## Examples
70
-
71
- ### Example: REST API with OpenAPI spec
72
- User says: "Generate docs for this API"
73
- Given: openapi.yaml with 5 endpoints
74
- Result: Markdown documentation with curl examples for each endpoint
75
-
76
- ## Troubleshooting
77
-
78
- ### Missing endpoints
79
- Cause: Spec uses $ref to external files
80
- Solution: Resolve all $ref references before processing
81
- ```
82
-
83
- ---
84
-
85
- ## Example 2: Workflow Automation Skill (Category 2)
86
-
87
- A skill for standardized code review workflows.
88
-
89
- ```
90
- code-review/
91
- ├── SKILL.md
92
- ├── scripts/
93
- │ └── check-coverage.sh
94
- └── references/
95
- └── review-standards.md
96
- ```
97
-
98
- ### SKILL.md
99
-
100
- ```yaml
101
- ---
102
- name: code-review
103
- description: >-
104
- Conducts structured code reviews with consistent methodology.
105
- Use when user asks to "review this PR", "review my code",
106
- "check this for issues", or "do a code review". Covers security,
107
- performance, maintainability, and test coverage.
108
- metadata:
109
- author: engineering
110
- version: 2.0.0
111
- tags: [code-review, quality, security]
112
- ---
113
- ```
114
-
115
- ```markdown
116
- # Code Review
117
-
118
- ## Instructions
119
-
120
- ### Step 1: Understand the Change
121
- 1. Read the PR description or user's explanation of the change
122
- 2. Identify the affected files and their roles
123
- 3. Determine the change category: feature, bugfix, refactor, or config
124
-
125
- ### Step 2: Security Review
126
- Check for OWASP Top 10 vulnerabilities:
127
- - SQL injection in database queries
128
- - XSS in user-facing output
129
- - Authentication/authorization gaps
130
- - Secrets or credentials in code
131
- - Input validation at system boundaries
132
-
133
- ### Step 3: Code Quality Review
134
- Consult `references/review-standards.md` for project-specific standards.
135
-
136
- Check:
137
- - Functions under 50 lines
138
- - Clear naming conventions
139
- - Error handling for external calls
140
- - No dead code or commented-out blocks
141
- - DRY violations (3+ repetitions)
142
-
143
- ### Step 4: Test Coverage
144
- Run `scripts/check-coverage.sh` if available.
145
-
146
- Verify:
147
- - New code has corresponding tests
148
- - Edge cases are covered
149
- - Tests are meaningful (not just coverage padding)
150
-
151
- ### Step 5: Produce Review Summary
152
- Structure the review as:
153
- 1. **Summary**: One paragraph on overall assessment
154
- 2. **Critical Issues**: Must fix before merge (security, correctness)
155
- 3. **Suggestions**: Improvements that can be addressed later
156
- 4. **Positive Notes**: What was done well
157
-
158
- ## Examples
159
-
160
- ### Example: Feature PR with 3 files changed
161
- User says: "Review this PR"
162
- Actions:
163
- 1. Read diff for all 3 files
164
- 2. Check for security issues in new endpoint
165
- 3. Verify test coverage for new functionality
166
- 4. Flag missing input validation
167
- Result: Structured review with 1 critical issue and 2 suggestions
168
- ```
169
-
170
- ---
171
-
172
- ## Example 3: MCP Enhancement Skill (Category 3)
173
-
174
- A skill that enhances a project management MCP with workflow expertise.
175
-
176
- ```
177
- linear-sprint-planner/
178
- ├── SKILL.md
179
- └── references/
180
- └── velocity-formulas.md
181
- ```
182
-
183
- ### SKILL.md
184
-
185
- ```yaml
186
- ---
187
- name: linear-sprint-planner
188
- description: >-
189
- Plans and creates sprints in Linear with best practices for agile
190
- teams. Use when user says "plan this sprint", "create sprint tasks",
191
- "set up next sprint", or "help me with sprint planning". Requires
192
- Linear MCP server connection.
193
- compatibility: Requires Linear MCP server
194
- metadata:
195
- author: agile-team
196
- version: 1.0.0
197
- mcp-server: linear
198
- tags: [linear, sprint, agile, project-management]
199
- ---
200
- ```
201
-
202
- ```markdown
203
- # Linear Sprint Planner
204
-
205
- ## Instructions
206
-
207
- ### Step 1: Gather Sprint Context
208
- Call Linear MCP to fetch:
209
- 1. Current project status: `linear_get_projects`
210
- 2. Backlog items: `linear_list_issues` with status "Backlog"
211
- 3. Team members: `linear_get_team_members`
212
- 4. Previous sprint velocity (see `references/velocity-formulas.md`)
213
-
214
- ### Step 2: Analyze Capacity
215
- Calculate available capacity:
216
- - Team members x working days x focus factor (0.7)
217
- - Subtract known PTO or meetings
218
- - Compare against historical velocity
219
-
220
- ### Step 3: Prioritize and Select Items
221
- From the backlog, recommend items for the sprint:
222
- 1. Priority items first (P0, P1)
223
- 2. Dependencies resolved (blocked items excluded)
224
- 3. Total story points within capacity
225
- 4. Mix of feature work and tech debt (80/20 suggested)
226
-
227
- Present the recommended sprint plan to the user for approval.
228
-
229
- ### Step 4: Create Sprint in Linear
230
- After user approval:
231
- 1. Create sprint: `linear_create_cycle` with start/end dates
232
- 2. Move selected issues: `linear_update_issue` for each item
233
- 3. Assign owners based on expertise and load balancing
234
- 4. Add labels: `linear_add_label` for sprint tracking
235
-
236
- ### Step 5: Generate Sprint Summary
237
- Create a summary with:
238
- - Sprint goal (one sentence)
239
- - Total story points committed
240
- - Team member assignments
241
- - Key risks or dependencies
242
- - Definition of done
243
-
244
- ## Troubleshooting
245
-
246
- ### Linear MCP not connected
247
- If "Connection refused" or tool calls fail:
248
- 1. Verify Linear MCP is connected: Settings > Extensions
249
- 2. Check API key permissions (needs read/write)
250
- 3. Test independently: "Use Linear MCP to list my projects"
251
-
252
- ### No backlog items found
253
- Cause: Filter too restrictive or wrong project selected
254
- Solution: List all projects first, confirm the correct one
255
- ```
256
-
257
- ---
258
-
259
- ## Example 4: Skill-Tree Programmatic Skill
260
-
261
- For the skill-tree library, skills are structured as TypeScript objects:
262
-
263
- ```typescript
264
- const typescriptImportFix: Skill = {
265
- id: "typescript-import-fix",
266
- name: "TypeScript ES Module Import Fix",
267
- version: "1.0.0",
268
- description: "Fix TypeScript ES module import errors by adding .js extensions",
269
-
270
- problem: "When using ES modules with TypeScript, relative imports fail without explicit .js extensions. The TypeScript compiler does not add extensions during compilation, causing 'Cannot find module' errors at runtime.",
271
-
272
- triggerConditions: [
273
- {
274
- type: "error",
275
- value: "Cannot find module",
276
- description: "Node.js module resolution failure"
277
- },
278
- {
279
- type: "error",
280
- value: "ERR_MODULE_NOT_FOUND",
281
- description: "ES module not found error"
282
- },
283
- {
284
- type: "keyword",
285
- value: "typescript, import, esm, module",
286
- description: "TypeScript module-related discussion"
287
- },
288
- {
289
- type: "pattern",
290
- value: "from ['\"]\\./.*['\"]",
291
- description: "Relative import without .js extension"
292
- }
293
- ],
294
-
295
- solution: `1. Identify all relative imports in TypeScript files
296
- 2. Add .js extension to each relative import path:
297
- - import { foo } from './bar' → import { foo } from './bar.js'
298
- - import { baz } from '../utils' → import { baz } from '../utils.js'
299
- 3. Ensure tsconfig.json has "module": "ESNext" or "Node16"
300
- 4. Ensure package.json has "type": "module"
301
- 5. Rebuild the project: npx tsc --noEmit to verify`,
302
-
303
- verification: "Run the application. All imports resolve without 'Cannot find module' errors. TypeScript compilation succeeds with no module-related diagnostics.",
304
-
305
- examples: [
306
- {
307
- scenario: "Fixing imports in a utility file",
308
- before: `import { helper } from './utils'\nimport { Config } from '../types'`,
309
- after: `import { helper } from './utils.js'\nimport { Config } from '../types.js'`
310
- }
311
- ],
312
-
313
- notes: "This only applies to relative imports. Package imports (from 'lodash') do not need extensions. Index files should use './dir/index.js' explicitly.",
314
-
315
- author: "skill-tree",
316
- tags: ["typescript", "esm", "modules", "imports"],
317
- status: "active",
318
- createdAt: new Date(),
319
- updatedAt: new Date(),
320
- metrics: {
321
- usageCount: 0,
322
- successRate: 0,
323
- feedbackScores: []
324
- }
325
- };
326
- ```