cognitive-core 0.2.1 → 0.2.2

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 (331) 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/learning/pipeline.d.ts +4 -31
  6. package/dist/learning/pipeline.d.ts.map +1 -1
  7. package/dist/learning/pipeline.js +12 -64
  8. package/dist/learning/pipeline.js.map +1 -1
  9. package/dist/memory/curated-loader.d.ts +21 -4
  10. package/dist/memory/curated-loader.d.ts.map +1 -1
  11. package/dist/memory/curated-loader.js +53 -16
  12. package/dist/memory/curated-loader.js.map +1 -1
  13. package/dist/memory/index.d.ts +2 -1
  14. package/dist/memory/index.d.ts.map +1 -1
  15. package/dist/memory/index.js +3 -1
  16. package/dist/memory/index.js.map +1 -1
  17. package/dist/memory/playbook.d.ts +6 -0
  18. package/dist/memory/playbook.d.ts.map +1 -1
  19. package/dist/memory/playbook.js +15 -0
  20. package/dist/memory/playbook.js.map +1 -1
  21. package/dist/memory/source-resolver.d.ts +120 -0
  22. package/dist/memory/source-resolver.d.ts.map +1 -0
  23. package/dist/memory/source-resolver.js +300 -0
  24. package/dist/memory/source-resolver.js.map +1 -0
  25. package/dist/types/config.d.ts +141 -0
  26. package/dist/types/config.d.ts.map +1 -1
  27. package/dist/types/config.js +40 -0
  28. package/dist/types/config.js.map +1 -1
  29. package/dist/types/index.d.ts +1 -1
  30. package/dist/types/index.d.ts.map +1 -1
  31. package/dist/types/index.js +1 -1
  32. package/dist/types/index.js.map +1 -1
  33. package/dist/workspace/types.d.ts +12 -54
  34. package/dist/workspace/types.d.ts.map +1 -1
  35. package/dist/workspace/types.js.map +1 -1
  36. package/package.json +2 -2
  37. package/playbooks/compound-engineering/adversarial-review.json +51 -0
  38. package/playbooks/compound-engineering/agent-native-architecture.json +59 -0
  39. package/playbooks/compound-engineering/agent-native-review.json +54 -0
  40. package/playbooks/compound-engineering/api-contract-review.json +52 -0
  41. package/playbooks/compound-engineering/brainstorm-requirements.json +55 -0
  42. package/playbooks/compound-engineering/bug-reproduction.json +62 -0
  43. package/playbooks/compound-engineering/confidence-calibration.json +49 -0
  44. package/playbooks/compound-engineering/correctness-review.json +49 -0
  45. package/playbooks/compound-engineering/data-migration-safety.json +59 -0
  46. package/playbooks/compound-engineering/deployment-verification.json +63 -0
  47. package/playbooks/compound-engineering/error-recovery-patterns.json +53 -0
  48. package/playbooks/compound-engineering/implementation-planning.json +64 -0
  49. package/playbooks/compound-engineering/issue-pattern-analysis.json +53 -0
  50. package/playbooks/compound-engineering/knowledge-compounding.json +63 -0
  51. package/playbooks/compound-engineering/learnings-research.json +54 -0
  52. package/playbooks/compound-engineering/maintainability-review.json +49 -0
  53. package/playbooks/compound-engineering/performance-review.json +54 -0
  54. package/playbooks/compound-engineering/plan-adversarial-review.json +56 -0
  55. package/playbooks/compound-engineering/plan-feasibility-review.json +56 -0
  56. package/playbooks/compound-engineering/project-standards-review.json +52 -0
  57. package/playbooks/compound-engineering/reliability-review.json +53 -0
  58. package/playbooks/compound-engineering/review-orchestration.json +64 -0
  59. package/playbooks/compound-engineering/security-review.json +54 -0
  60. package/playbooks/compound-engineering/systematic-execution.json +64 -0
  61. package/playbooks/compound-engineering/testing-review.json +50 -0
  62. package/src/atlas.ts +96 -0
  63. package/src/memory/curated-loader.ts +69 -16
  64. package/src/memory/index.ts +16 -0
  65. package/src/memory/playbook.ts +19 -0
  66. package/src/memory/source-resolver.ts +422 -0
  67. package/src/types/config.ts +46 -0
  68. package/src/types/index.ts +4 -0
  69. package/src/workspace/types.ts +22 -78
  70. package/tests/integration/curated-sources-e2e.test.ts +502 -0
  71. package/tests/memory/compound-engineering-seed.test.ts +338 -0
  72. package/tests/memory/curated-loader-extended.test.ts +225 -0
  73. package/tests/memory/playbook-quality-validation.test.ts +430 -0
  74. package/tests/memory/source-resolver.test.ts +700 -0
  75. package/.claude/settings.local.json +0 -11
  76. package/dist/learning/llm-extractor.d.ts +0 -88
  77. package/dist/learning/llm-extractor.d.ts.map +0 -1
  78. package/dist/learning/llm-extractor.js +0 -372
  79. package/dist/learning/llm-extractor.js.map +0 -1
  80. package/dist/learning/loop-coordinator.d.ts +0 -61
  81. package/dist/learning/loop-coordinator.d.ts.map +0 -1
  82. package/dist/learning/loop-coordinator.js +0 -96
  83. package/dist/learning/loop-coordinator.js.map +0 -1
  84. package/references/agent-workspace/CLAUDE.md +0 -74
  85. package/references/agent-workspace/README.md +0 -587
  86. package/references/agent-workspace/media/banner.png +0 -0
  87. package/references/agent-workspace/package-lock.json +0 -2061
  88. package/references/agent-workspace/package.json +0 -54
  89. package/references/agent-workspace/src/handle.ts +0 -122
  90. package/references/agent-workspace/src/index.ts +0 -32
  91. package/references/agent-workspace/src/manager.ts +0 -102
  92. package/references/agent-workspace/src/readers/json.ts +0 -71
  93. package/references/agent-workspace/src/readers/markdown.ts +0 -37
  94. package/references/agent-workspace/src/readers/raw.ts +0 -27
  95. package/references/agent-workspace/src/types.ts +0 -68
  96. package/references/agent-workspace/src/validation.ts +0 -93
  97. package/references/agent-workspace/src/writers/json.ts +0 -17
  98. package/references/agent-workspace/src/writers/markdown.ts +0 -27
  99. package/references/agent-workspace/src/writers/raw.ts +0 -22
  100. package/references/agent-workspace/tests/errors.test.ts +0 -652
  101. package/references/agent-workspace/tests/handle.test.ts +0 -144
  102. package/references/agent-workspace/tests/manager.test.ts +0 -124
  103. package/references/agent-workspace/tests/readers.test.ts +0 -205
  104. package/references/agent-workspace/tests/validation.test.ts +0 -196
  105. package/references/agent-workspace/tests/writers.test.ts +0 -108
  106. package/references/agent-workspace/tsconfig.json +0 -20
  107. package/references/agent-workspace/tsup.config.ts +0 -9
  108. package/references/minimem/.claude/settings.json +0 -7
  109. package/references/minimem/.sudocode/issues.jsonl +0 -18
  110. package/references/minimem/.sudocode/specs.jsonl +0 -1
  111. package/references/minimem/CLAUDE.md +0 -310
  112. package/references/minimem/README.md +0 -556
  113. package/references/minimem/claude-plugin/.claude-plugin/plugin.json +0 -10
  114. package/references/minimem/claude-plugin/.mcp.json +0 -7
  115. package/references/minimem/claude-plugin/README.md +0 -158
  116. package/references/minimem/claude-plugin/commands/recall.md +0 -47
  117. package/references/minimem/claude-plugin/commands/remember.md +0 -41
  118. package/references/minimem/claude-plugin/hooks/__tests__/hooks.test.ts +0 -272
  119. package/references/minimem/claude-plugin/hooks/hooks.json +0 -27
  120. package/references/minimem/claude-plugin/hooks/session-end.sh +0 -86
  121. package/references/minimem/claude-plugin/hooks/session-start.sh +0 -85
  122. package/references/minimem/claude-plugin/skills/memory/SKILL.md +0 -108
  123. package/references/minimem/package-lock.json +0 -5373
  124. package/references/minimem/package.json +0 -60
  125. package/references/minimem/scripts/postbuild.js +0 -35
  126. package/references/minimem/src/__tests__/edge-cases.test.ts +0 -371
  127. package/references/minimem/src/__tests__/errors.test.ts +0 -265
  128. package/references/minimem/src/__tests__/helpers.ts +0 -199
  129. package/references/minimem/src/__tests__/internal.test.ts +0 -407
  130. package/references/minimem/src/__tests__/knowledge.test.ts +0 -287
  131. package/references/minimem/src/__tests__/minimem.integration.test.ts +0 -1127
  132. package/references/minimem/src/__tests__/session.test.ts +0 -190
  133. package/references/minimem/src/cli/__tests__/commands.test.ts +0 -759
  134. package/references/minimem/src/cli/commands/__tests__/conflicts.test.ts +0 -141
  135. package/references/minimem/src/cli/commands/append.ts +0 -76
  136. package/references/minimem/src/cli/commands/config.ts +0 -262
  137. package/references/minimem/src/cli/commands/conflicts.ts +0 -413
  138. package/references/minimem/src/cli/commands/daemon.ts +0 -169
  139. package/references/minimem/src/cli/commands/index.ts +0 -12
  140. package/references/minimem/src/cli/commands/init.ts +0 -88
  141. package/references/minimem/src/cli/commands/mcp.ts +0 -177
  142. package/references/minimem/src/cli/commands/push-pull.ts +0 -213
  143. package/references/minimem/src/cli/commands/search.ts +0 -158
  144. package/references/minimem/src/cli/commands/status.ts +0 -84
  145. package/references/minimem/src/cli/commands/sync-init.ts +0 -290
  146. package/references/minimem/src/cli/commands/sync.ts +0 -70
  147. package/references/minimem/src/cli/commands/upsert.ts +0 -197
  148. package/references/minimem/src/cli/config.ts +0 -584
  149. package/references/minimem/src/cli/index.ts +0 -264
  150. package/references/minimem/src/cli/shared.ts +0 -161
  151. package/references/minimem/src/cli/sync/__tests__/central.test.ts +0 -152
  152. package/references/minimem/src/cli/sync/__tests__/conflicts.test.ts +0 -209
  153. package/references/minimem/src/cli/sync/__tests__/daemon.test.ts +0 -118
  154. package/references/minimem/src/cli/sync/__tests__/detection.test.ts +0 -207
  155. package/references/minimem/src/cli/sync/__tests__/integration.test.ts +0 -476
  156. package/references/minimem/src/cli/sync/__tests__/registry.test.ts +0 -363
  157. package/references/minimem/src/cli/sync/__tests__/state.test.ts +0 -255
  158. package/references/minimem/src/cli/sync/__tests__/validation.test.ts +0 -193
  159. package/references/minimem/src/cli/sync/__tests__/watcher.test.ts +0 -178
  160. package/references/minimem/src/cli/sync/central.ts +0 -292
  161. package/references/minimem/src/cli/sync/conflicts.ts +0 -204
  162. package/references/minimem/src/cli/sync/daemon.ts +0 -407
  163. package/references/minimem/src/cli/sync/detection.ts +0 -138
  164. package/references/minimem/src/cli/sync/index.ts +0 -107
  165. package/references/minimem/src/cli/sync/operations.ts +0 -373
  166. package/references/minimem/src/cli/sync/registry.ts +0 -279
  167. package/references/minimem/src/cli/sync/state.ts +0 -355
  168. package/references/minimem/src/cli/sync/validation.ts +0 -206
  169. package/references/minimem/src/cli/sync/watcher.ts +0 -234
  170. package/references/minimem/src/cli/version.ts +0 -34
  171. package/references/minimem/src/core/index.ts +0 -9
  172. package/references/minimem/src/core/indexer.ts +0 -628
  173. package/references/minimem/src/core/searcher.ts +0 -221
  174. package/references/minimem/src/db/schema.ts +0 -183
  175. package/references/minimem/src/db/sqlite-vec.ts +0 -24
  176. package/references/minimem/src/embeddings/__tests__/embeddings.test.ts +0 -431
  177. package/references/minimem/src/embeddings/batch-gemini.ts +0 -392
  178. package/references/minimem/src/embeddings/batch-openai.ts +0 -409
  179. package/references/minimem/src/embeddings/embeddings.ts +0 -434
  180. package/references/minimem/src/index.ts +0 -109
  181. package/references/minimem/src/internal.ts +0 -299
  182. package/references/minimem/src/minimem.ts +0 -1276
  183. package/references/minimem/src/search/__tests__/hybrid.test.ts +0 -247
  184. package/references/minimem/src/search/graph.ts +0 -234
  185. package/references/minimem/src/search/hybrid.ts +0 -151
  186. package/references/minimem/src/search/search.ts +0 -256
  187. package/references/minimem/src/server/__tests__/mcp.test.ts +0 -341
  188. package/references/minimem/src/server/__tests__/tools.test.ts +0 -364
  189. package/references/minimem/src/server/mcp.ts +0 -326
  190. package/references/minimem/src/server/tools.ts +0 -720
  191. package/references/minimem/src/session.ts +0 -460
  192. package/references/minimem/tsconfig.json +0 -19
  193. package/references/minimem/tsup.config.ts +0 -26
  194. package/references/minimem/vitest.config.ts +0 -24
  195. package/references/sessionlog/.husky/pre-commit +0 -1
  196. package/references/sessionlog/.lintstagedrc.json +0 -4
  197. package/references/sessionlog/.prettierignore +0 -4
  198. package/references/sessionlog/.prettierrc.json +0 -11
  199. package/references/sessionlog/LICENSE +0 -21
  200. package/references/sessionlog/README.md +0 -453
  201. package/references/sessionlog/eslint.config.js +0 -58
  202. package/references/sessionlog/package-lock.json +0 -3672
  203. package/references/sessionlog/package.json +0 -65
  204. package/references/sessionlog/src/__tests__/agent-hooks.test.ts +0 -570
  205. package/references/sessionlog/src/__tests__/agent-registry.test.ts +0 -127
  206. package/references/sessionlog/src/__tests__/claude-code-hooks.test.ts +0 -225
  207. package/references/sessionlog/src/__tests__/claude-generator.test.ts +0 -46
  208. package/references/sessionlog/src/__tests__/commit-msg.test.ts +0 -86
  209. package/references/sessionlog/src/__tests__/cursor-agent.test.ts +0 -224
  210. package/references/sessionlog/src/__tests__/e2e-live.test.ts +0 -890
  211. package/references/sessionlog/src/__tests__/event-log.test.ts +0 -183
  212. package/references/sessionlog/src/__tests__/flush-sentinel.test.ts +0 -105
  213. package/references/sessionlog/src/__tests__/gemini-agent.test.ts +0 -375
  214. package/references/sessionlog/src/__tests__/git-hooks.test.ts +0 -78
  215. package/references/sessionlog/src/__tests__/hook-managers.test.ts +0 -121
  216. package/references/sessionlog/src/__tests__/lifecycle-tasks.test.ts +0 -759
  217. package/references/sessionlog/src/__tests__/opencode-agent.test.ts +0 -338
  218. package/references/sessionlog/src/__tests__/redaction.test.ts +0 -136
  219. package/references/sessionlog/src/__tests__/session-repo.test.ts +0 -353
  220. package/references/sessionlog/src/__tests__/session-store.test.ts +0 -166
  221. package/references/sessionlog/src/__tests__/setup-ccweb.test.ts +0 -466
  222. package/references/sessionlog/src/__tests__/skill-live.test.ts +0 -461
  223. package/references/sessionlog/src/__tests__/summarize.test.ts +0 -348
  224. package/references/sessionlog/src/__tests__/task-plan-e2e.test.ts +0 -610
  225. package/references/sessionlog/src/__tests__/task-plan-live.test.ts +0 -632
  226. package/references/sessionlog/src/__tests__/transcript-timestamp.test.ts +0 -121
  227. package/references/sessionlog/src/__tests__/types.test.ts +0 -166
  228. package/references/sessionlog/src/__tests__/utils.test.ts +0 -333
  229. package/references/sessionlog/src/__tests__/validation.test.ts +0 -103
  230. package/references/sessionlog/src/__tests__/worktree.test.ts +0 -57
  231. package/references/sessionlog/src/agent/agents/claude-code.ts +0 -1089
  232. package/references/sessionlog/src/agent/agents/cursor.ts +0 -361
  233. package/references/sessionlog/src/agent/agents/gemini-cli.ts +0 -632
  234. package/references/sessionlog/src/agent/agents/opencode.ts +0 -540
  235. package/references/sessionlog/src/agent/registry.ts +0 -143
  236. package/references/sessionlog/src/agent/session-types.ts +0 -113
  237. package/references/sessionlog/src/agent/types.ts +0 -220
  238. package/references/sessionlog/src/cli.ts +0 -597
  239. package/references/sessionlog/src/commands/clean.ts +0 -133
  240. package/references/sessionlog/src/commands/disable.ts +0 -84
  241. package/references/sessionlog/src/commands/doctor.ts +0 -145
  242. package/references/sessionlog/src/commands/enable.ts +0 -202
  243. package/references/sessionlog/src/commands/explain.ts +0 -261
  244. package/references/sessionlog/src/commands/reset.ts +0 -105
  245. package/references/sessionlog/src/commands/resume.ts +0 -180
  246. package/references/sessionlog/src/commands/rewind.ts +0 -195
  247. package/references/sessionlog/src/commands/setup-ccweb.ts +0 -275
  248. package/references/sessionlog/src/commands/status.ts +0 -172
  249. package/references/sessionlog/src/config.ts +0 -165
  250. package/references/sessionlog/src/events/event-log.ts +0 -126
  251. package/references/sessionlog/src/git-operations.ts +0 -558
  252. package/references/sessionlog/src/hooks/git-hooks.ts +0 -165
  253. package/references/sessionlog/src/hooks/lifecycle.ts +0 -391
  254. package/references/sessionlog/src/index.ts +0 -650
  255. package/references/sessionlog/src/security/redaction.ts +0 -283
  256. package/references/sessionlog/src/session/state-machine.ts +0 -452
  257. package/references/sessionlog/src/store/checkpoint-store.ts +0 -509
  258. package/references/sessionlog/src/store/native-store.ts +0 -173
  259. package/references/sessionlog/src/store/provider-types.ts +0 -99
  260. package/references/sessionlog/src/store/session-store.ts +0 -266
  261. package/references/sessionlog/src/strategy/attribution.ts +0 -296
  262. package/references/sessionlog/src/strategy/common.ts +0 -207
  263. package/references/sessionlog/src/strategy/content-overlap.ts +0 -228
  264. package/references/sessionlog/src/strategy/manual-commit.ts +0 -988
  265. package/references/sessionlog/src/strategy/types.ts +0 -279
  266. package/references/sessionlog/src/summarize/claude-generator.ts +0 -115
  267. package/references/sessionlog/src/summarize/summarize.ts +0 -432
  268. package/references/sessionlog/src/types.ts +0 -508
  269. package/references/sessionlog/src/utils/chunk-files.ts +0 -49
  270. package/references/sessionlog/src/utils/commit-message.ts +0 -65
  271. package/references/sessionlog/src/utils/detect-agent.ts +0 -36
  272. package/references/sessionlog/src/utils/hook-managers.ts +0 -125
  273. package/references/sessionlog/src/utils/ide-tags.ts +0 -32
  274. package/references/sessionlog/src/utils/paths.ts +0 -79
  275. package/references/sessionlog/src/utils/preview-rewind.ts +0 -80
  276. package/references/sessionlog/src/utils/rewind-conflict.ts +0 -121
  277. package/references/sessionlog/src/utils/shadow-branch.ts +0 -109
  278. package/references/sessionlog/src/utils/string-utils.ts +0 -46
  279. package/references/sessionlog/src/utils/todo-extract.ts +0 -188
  280. package/references/sessionlog/src/utils/trailers.ts +0 -187
  281. package/references/sessionlog/src/utils/transcript-parse.ts +0 -177
  282. package/references/sessionlog/src/utils/transcript-timestamp.ts +0 -59
  283. package/references/sessionlog/src/utils/tree-ops.ts +0 -219
  284. package/references/sessionlog/src/utils/tty.ts +0 -72
  285. package/references/sessionlog/src/utils/validation.ts +0 -65
  286. package/references/sessionlog/src/utils/worktree.ts +0 -58
  287. package/references/sessionlog/src/wire-types.ts +0 -59
  288. package/references/sessionlog/templates/setup-env.sh +0 -153
  289. package/references/sessionlog/tsconfig.json +0 -18
  290. package/references/sessionlog/vitest.config.ts +0 -12
  291. package/references/skill-tree/.claude/settings.json +0 -6
  292. package/references/skill-tree/.sudocode/issues.jsonl +0 -19
  293. package/references/skill-tree/.sudocode/specs.jsonl +0 -3
  294. package/references/skill-tree/CLAUDE.md +0 -126
  295. package/references/skill-tree/README.md +0 -372
  296. package/references/skill-tree/docs/GAPS_v1.md +0 -221
  297. package/references/skill-tree/docs/INTEGRATION_PLAN.md +0 -467
  298. package/references/skill-tree/docs/TODOS.md +0 -91
  299. package/references/skill-tree/docs/anthropic_skill_guide.md +0 -1364
  300. package/references/skill-tree/docs/design/federated-skill-trees.md +0 -524
  301. package/references/skill-tree/docs/design/multi-agent-sync.md +0 -759
  302. package/references/skill-tree/docs/scraper/BRAINSTORM.md +0 -583
  303. package/references/skill-tree/docs/scraper/POC_PLAN.md +0 -420
  304. package/references/skill-tree/docs/scraper/README.md +0 -170
  305. package/references/skill-tree/examples/basic-usage.ts +0 -164
  306. package/references/skill-tree/package-lock.json +0 -1852
  307. package/references/skill-tree/package.json +0 -66
  308. package/references/skill-tree/scraper/README.md +0 -123
  309. package/references/skill-tree/scraper/docs/DESIGN.md +0 -683
  310. package/references/skill-tree/scraper/docs/PLAN.md +0 -336
  311. package/references/skill-tree/scraper/drizzle.config.ts +0 -10
  312. package/references/skill-tree/scraper/package-lock.json +0 -6329
  313. package/references/skill-tree/scraper/package.json +0 -68
  314. package/references/skill-tree/scraper/test/fixtures/invalid-skill/missing-description.md +0 -7
  315. package/references/skill-tree/scraper/test/fixtures/invalid-skill/missing-name.md +0 -7
  316. package/references/skill-tree/scraper/test/fixtures/minimal-skill/SKILL.md +0 -27
  317. package/references/skill-tree/scraper/test/fixtures/skill-json/SKILL.json +0 -21
  318. package/references/skill-tree/scraper/test/fixtures/skill-with-meta/SKILL.md +0 -54
  319. package/references/skill-tree/scraper/test/fixtures/skill-with-meta/_meta.json +0 -24
  320. package/references/skill-tree/scraper/test/fixtures/valid-skill/SKILL.md +0 -93
  321. package/references/skill-tree/scraper/test/fixtures/valid-skill/_meta.json +0 -22
  322. package/references/skill-tree/scraper/tsup.config.ts +0 -14
  323. package/references/skill-tree/scraper/vitest.config.ts +0 -17
  324. package/references/skill-tree/scripts/convert-to-vitest.ts +0 -166
  325. package/references/skill-tree/skills/skill-writer/SKILL.md +0 -339
  326. package/references/skill-tree/skills/skill-writer/references/examples.md +0 -326
  327. package/references/skill-tree/skills/skill-writer/references/patterns.md +0 -210
  328. package/references/skill-tree/skills/skill-writer/references/quality-checklist.md +0 -123
  329. package/references/skill-tree/test/run-all.ts +0 -106
  330. package/references/skill-tree/test/utils.ts +0 -128
  331. package/references/skill-tree/vitest.config.ts +0 -16
@@ -1,1364 +0,0 @@
1
- # The Complete Guide
2
-
3
- # to Building Skills
4
-
5
- # for Claude
6
-
7
-
8
- ## Contents
9
-
10
- - Introduction
11
- - Fundamentals
12
- - Planning and design
13
- - Testing and iteration
14
- - Distribution and sharing
15
- - Patterns and troubleshooting
16
- - Resources and references
17
-
18
-
19
- ## Introduction
20
-
21
- A skill is a set of instructions - packaged as a simple folder - that teaches Claude
22
- how to handle specific tasks or workflows. Skills are one of the most powerful
23
- ways to customize Claude for your specific needs. Instead of re-explaining your
24
- preferences, processes, and domain expertise in every conversation, skills let you
25
- teach Claude once and benefit every time.
26
-
27
- Skills are powerful when you have repeatable workflows: generating frontend
28
- designs from specs, conducting research with consistent methodology, creating
29
- documents that follow your team's style guide, or orchestrating multi-step
30
- processes. They work well with Claude's built-in capabilities like code execution
31
- and document creation. For those building MCP integrations, skills add another
32
- powerful layer helping turn raw tool access into reliable, optimized workflows.
33
-
34
- This guide covers everything you need to know to build effective skills - from
35
- planning and structure to testing and distribution. Whether you're building a
36
- skill for yourself, your team, or for the community, you'll find practical patterns
37
- and real-world examples throughout.
38
-
39
- What you'll learn:
40
-
41
- - Technical requirements and best practices for skill structure
42
- - Patterns for standalone skills and MCP-enhanced workflows
43
- - Patterns we've seen work well across different use cases
44
- - How to test, iterate, and distribute your skills
45
-
46
- Who this is for:
47
-
48
- - Developers who want Claude to follow specific workflows consistently
49
- - Power users who want Claude to follow specific workflows
50
- - Teams looking to standardize how Claude works across their organization
51
-
52
- ```
53
- Two Paths Through This Guide
54
- Building standalone skills? Focus on Fundamentals, Planning and Design, and
55
- category 1-2. Enhancing an MCP integration? The "Skills + MCP" section and
56
- category 3 are for you. Both paths share the same technical requirements, but
57
- you choose what's relevant to your use case.
58
- What you'll get out of this guide: By the end, you'll be able to build a functional
59
- skill in a single sitting. Expect about 15-30 minutes to build and test your first
60
- working skill using the skill-creator.
61
- Let's get started.
62
- ```
63
- ```
64
- 3
65
- ```
66
-
67
- Chapter 1
68
-
69
- ## Fundamentals
70
-
71
-
72
- Chapter 1
73
-
74
- Fundamentals
75
-
76
- What is a skill?
77
-
78
- A skill is a folder containing:
79
-
80
- - SKILL.md (required): Instructions in Markdown with YAML frontmatter
81
- - scripts/ (optional): Executable code (Python, Bash, etc.)
82
- - references/ (optional): Documentation loaded as needed
83
- - assets/ (optional): Templates, fonts, icons used in output
84
-
85
- Core design principles
86
-
87
- Progressive Disclosure
88
-
89
- Skills use a three-level system:
90
-
91
- - First level (YAML frontmatter): Always loaded in Claude's system prompt.
92
- Provides just enough information for Claude to know when each skill should
93
- be used without loading all of it into context.
94
- - Second level (SKILL.md body): Loaded when Claude thinks the skill is
95
- relevant to the current task. Contains the full instructions and guidance.
96
- - Third level (Linked files): Additional files bundled within the skill directory
97
- that Claude can choose to navigate and discover only as needed.
98
-
99
- This progressive disclosure minimizes token usage while maintaining
100
- specialized expertise.
101
-
102
- ```
103
- Composability
104
- Claude can load multiple skills simultaneously. Your skill should work well
105
- alongside others, not assume it's the only capability available.
106
- Portability
107
- Skills work identically across Claude.ai, Claude Code, and API. Create a skill once
108
- and it works across all surfaces without modification, provided the environment
109
- supports any dependencies the skill requires.
110
- ```
111
- ```
112
- For MCP Builders: Skills + Connectors
113
- 💡 Building standalone skills without MCP? Skip to Planning and Design - you can
114
- always return here later.
115
- If you already have a working MCP server, you've done the hard part. Skills are
116
- the knowledge layer on top - capturing the workflows and best practices you
117
- already know, so Claude can apply them consistently.
118
- ```
119
- ```
120
- The kitchen analogy
121
- MCP provides the professional kitchen: access to tools, ingredients, and
122
- equipment.
123
- Skills provide the recipes: step-by-step instructions on how to create something
124
- valuable.
125
- ```
126
-
127
- Together, they enable users to accomplish complex tasks without needing to
128
- figure out every step themselves.
129
-
130
- How they work together:
131
-
132
- ```
133
- MCP (Connectivity) Skills (Knowledge)
134
- Connects Claude to your service
135
- (Notion, Asana, Linear, etc.)
136
- ```
137
- ```
138
- Teaches Claude how to use your service
139
- effectively
140
- Provides real-time data access and tool
141
- invocation
142
- ```
143
- ```
144
- Captures workflows and best practices
145
- ```
146
- ```
147
- What Claude can do How Claude should do it
148
- ```
149
- Why this matters for your MCP users
150
-
151
- Without skills:
152
-
153
- - Users connect your MCP but don't know what to do next
154
- - Support tickets asking "how do I do X with your integration"
155
- - Each conversation starts from scratch
156
- - Inconsistent results because users prompt differently each time
157
- - Users blame your connector when the real issue is workflow guidance
158
-
159
- With skills:
160
-
161
- - Pre-built workflows activate automatically when needed
162
- - Consistent, reliable tool usage
163
- - Best practices embedded in every interaction
164
- - Lower learning curve for your integration
165
-
166
-
167
- Chapter 2
168
-
169
- ## Planning and design
170
-
171
-
172
- Chapter 2
173
-
174
- Planning and design
175
-
176
- Start with use cases
177
-
178
- Before writing any code, identify 2-3 concrete use cases your skill should enable.
179
-
180
- Good use case definition:
181
-
182
- ```
183
- Use Case: Project Sprint Planning
184
- Trigger: User says "help me plan this sprint" or "create
185
- sprint tasks"
186
- Steps:
187
- ```
188
- 1. Fetch current project status from Linear (via MCP)
189
- 2. Analyze team velocity and capacity
190
- 3. Suggest task prioritization
191
- 4. Create tasks in Linear with proper labels and estimates
192
- Result: Fully planned sprint with tasks created
193
-
194
- Ask yourself:
195
-
196
- - What does a user want to accomplish?
197
- - What multi-step workflows does this require?
198
- - Which tools are needed (built-in or MCP?)
199
- - What domain knowledge or best practices should be embedded?
200
-
201
- ```
202
- Common skill use case categories
203
- At Anthropic, we’ve observed three common use cases:
204
- Category 1: Document & Asset Creation
205
- Used for: Creating consistent, high-quality output including documents,
206
- presentations, apps, designs, code, etc.
207
- Real example: frontend-design skill (also see skills for docx, pptx, xlsx, and
208
- ppt)
209
- "Create distinctive, production-grade frontend interfaces with high design
210
- quality. Use when building web components, pages, artifacts, posters, or
211
- applications."
212
- ```
213
- ```
214
- Key techniques:
215
- ```
216
- - Embedded style guides and brand standards
217
- - Template structures for consistent output
218
- - Quality checklists before finalizing
219
- - No external tools required - uses Claude's built-in capabilities
220
-
221
-
222
- Category 2: Workflow Automation
223
-
224
- Used for: Multi-step processes that benefit from consistent methodology,
225
- including coordination across multiple MCP servers.
226
-
227
- _Real example:_ skill-creator skill
228
-
229
- "Interactive guide for creating new skills. Walks the user through use case
230
- definition, frontmatter generation, instruction writing, and validation."
231
-
232
- Key techniques:
233
-
234
- - Step-by-step workflow with validation gates
235
- - Templates for common structures
236
- - Built-in review and improvement suggestions
237
- - Iterative refinement loops
238
-
239
- Category 3: MCP Enhancement
240
-
241
- Used for: Workflow guidance to enhance the tool access an MCP server provides.
242
-
243
- _Real example:_ sentry-code-review skill (from Sentry)
244
-
245
- "Automatically analyzes and fixes detected bugs in GitHub Pull Requests using
246
- Sentry's error monitoring data via their MCP server."
247
-
248
- Key techniques:
249
-
250
- - Coordinates multiple MCP calls in sequence
251
- - Embeds domain expertise
252
- - Provides context users would otherwise need to specify
253
- - Error handling for common MCP issues
254
-
255
- ```
256
- Define success criteria
257
- How will you know your skill is working?
258
- These are aspirational targets - rough benchmarks rather than precise
259
- thresholds. Aim for rigor but accept that there will be an element of vibes-based
260
- assessment. We are actively developing more robust measurement guidance and
261
- tooling.
262
- Quantitative metrics:
263
- ```
264
- - Skill triggers on 90% of relevant queries
265
- _- How to measure:_ Run 10-20 test queries that should trigger your skill. Track
266
- how many times it loads automatically vs. requires explicit invocation.
267
- - Completes workflow in X tool calls
268
- _- How to measure:_ Compare the same task with and without the skill enabled.
269
- Count tool calls and total tokens consumed.
270
- - 0 failed API calls per workflow
271
- _- How to measure:_ Monitor MCP server logs during test runs. Track retry rates
272
- and error codes.
273
- Qualitative metrics:
274
- - Users don't need to prompt Claude about next steps
275
- _- How to assess:_ During testing, note how often you need to redirect or clarify.
276
- Ask beta users for feedback.
277
- - Workflows complete without user correction
278
- _- How to assess:_ Run the same request 3-5 times. Compare outputs for
279
- structural consistency and quality.
280
- - Consistent results across sessions
281
- _- How to assess:_ Can a new user accomplish the task on first try with minimal
282
- guidance?
283
-
284
-
285
- Technical requirements
286
-
287
- File structure
288
-
289
- ```
290
- your-skill-name/
291
- ├── SKILL.md # Required - main skill file
292
- ├── scripts/ # Optional - executable code
293
- │ ├── process_data.py # Example
294
- │ └── validate.sh # Example
295
- ├── references/ # Optional - documentation
296
- │ ├── api-guide.md # Example
297
- │ └── examples/ # Example
298
- └── assets/ # Optional - templates, etc.
299
- └── report-template.md # Example
300
- ```
301
- Critical rules
302
-
303
- SKILL.md naming:
304
-
305
- - Must be exactly SKILL.md (case-sensitive)
306
- - No variations accepted (SKILL.MD, skill.md, etc.)
307
-
308
- Skill folder naming:
309
-
310
- - Use kebab-case: notion-project-setup ✅
311
- - No spaces: Notion Project Setup ❌
312
- - No underscores: notion_project_setup ❌
313
- - No capitals: NotionProjectSetup ❌
314
-
315
- No README.md:
316
-
317
- - Don't include README.md inside your skill folder
318
- - All documentation goes in SKILL.md or references/
319
- - Note: when distributing via GitHub, you'll still want a repo-level README for
320
- human users — see Distribution and Sharing.
321
-
322
- ```
323
- YAML frontmatter: The most important part
324
- The YAML frontmatter is how Claude decides whether to load your skill. Get this
325
- right.
326
- ```
327
- ```
328
- Minimal required format
329
- ```
330
- ```
331
- ---
332
- name: your-skill-name
333
- description: What it does. Use when user asks to [specific
334
- phrases].
335
- ---
336
- ```
337
- ```
338
- That's all you need to start.
339
- Field requirements
340
- name (required):
341
- ```
342
- - kebab-case only
343
- - No spaces or capitals
344
- - Should match folder name
345
- description (required):
346
- - MUST include BOTH:
347
- _-_ What the skill does
348
- _-_ When to use it (trigger conditions)
349
- - Under 1024 characters
350
- - No XML tags (< or >)
351
- - Include specific tasks users might say
352
- - Mention file types if relevant
353
-
354
-
355
- license (optional):
356
-
357
- - Use if making skill open source
358
- - Common: MIT, Apache-2.
359
-
360
- compatibility (optional)
361
-
362
- - 1-500 characters
363
- - Indicates environment requirements: e.g. intended product, required system
364
- packages, network access needs, etc.
365
-
366
- metadata (optional):
367
-
368
- - Any custom key-value pairs
369
- - Suggested: author, version, mcp-server
370
- _- Example:_
371
- ```yaml
372
- metadata:
373
- author: ProjectHub
374
- version: 1.0.0 mcp-server: projecthub
375
- ```
376
-
377
- Security restrictions
378
-
379
- Forbidden in frontmatter:
380
-
381
- - XML angle brackets (< >)
382
- - Skills with "claude" or "anthropic" in name (reserved)
383
-
384
- Why: Frontmatter appears in Claude's system prompt. Malicious content could
385
- inject instructions.
386
-
387
- ```
388
- Writing effective skills
389
- The description field
390
- According to Anthropic's engineering blog: "This metadata...provides just
391
- enough information for Claude to know when each skill should be used without
392
- loading all of it into context." This is the first level of progressive disclosure.
393
- ```
394
- ```
395
- Structure:
396
- ```
397
- ```
398
- [What it does] + [When to use it] + [Key capabilities]
399
- ```
400
- ```
401
- Examples of good descriptions:
402
- ```
403
- ```
404
- # Good - specific and actionable
405
- description: Analyzes Figma design files and generates
406
- developer handoff documentation. Use when user uploads .fig
407
- files, asks for "design specs", "component documentation", or
408
- "design-to-code handoff".
409
- # Good - includes trigger phrases
410
- description: Manages Linear project workflows including sprint
411
- planning, task creation, and status tracking. Use when user
412
- mentions "sprint", "Linear tasks", "project planning", or asks
413
- to "create tickets".
414
- # Good - clear value proposition
415
- description: End-to-end customer onboarding workflow for
416
- PayFlow. Handles account creation, payment setup, and
417
- subscription management. Use when user says "onboard new
418
- customer", "set up subscription", or "create PayFlow account".
419
- ```
420
-
421
- Examples of bad descriptions:
422
-
423
- ```
424
- # Too vague
425
- description: Helps with projects.
426
- # Missing triggers
427
- description: Creates sophisticated multi-page documentation
428
- systems.
429
- # Too technical, no user triggers
430
- description: Implements the Project entity model with
431
- hierarchical relationships.
432
- ```
433
- Writing the main instructions
434
-
435
- After the frontmatter, write the actual instructions in Markdown.
436
-
437
- Recommended structure:
438
-
439
- _Adapt this template for your skill. Replace bracketed sections with your specific
440
- content._
441
-
442
- ```
443
- ---
444
- name: your-skill
445
- description: [--.]
446
- ---
447
- # Your Skill Name
448
- -# Instructions
449
- --# Step 1: [First Major Step]
450
- Clear explanation of what happens.
451
- ```
452
- ```
453
- Example:
454
- ```bash
455
- python scripts/fetch_data.py --project-id PROJECT_ID
456
- Expected output: [describe what success looks like]
457
- ```
458
- ```
459
- (Add more steps as needed)
460
- ```
461
- ```
462
- Examples
463
- Example 1: [common scenario]
464
- User says: "Set up a new marketing campaign"
465
- Actions:
466
- ```
467
- 1. Fetch existing campaigns via MCP
468
- 2. Create new campaign with provided parameters
469
- Result: Campaign created with confirmation link
470
- (Add more examples as needed)
471
-
472
- ```
473
- Troubleshooting
474
- Error: [Common error message]
475
- Cause: [Why it happens]
476
- Solution: [How to fix]
477
- (Add more error cases as needed)
478
- ```
479
-
480
- Best Practices for Instructions
481
-
482
- Be Specific and Actionable
483
-
484
- ✅ Good:
485
-
486
- ```
487
- Run `python scripts/validate.py --input {filename}` to check
488
- data format.
489
- If validation fails, common issues include:
490
- ```
491
- - Missing required fields (add them to the CSV)
492
- - Invalid date formats (use YYYY-MM-DD)
493
-
494
- ❌ Bad:
495
-
496
- ```
497
- Validate the data before proceeding.
498
- ```
499
- Include error handling
500
-
501
- ```
502
- -# Common Issues
503
- --# MCP Connection Failed
504
- If you see "Connection refused":
505
- ```
506
- 1. Verify MCP server is running: Check Settings > Extensions
507
- 2. Confirm API key is valid
508
- 3. Try reconnecting: Settings > Extensions > [Your Service] >
509
- Reconnect
510
-
511
- ```
512
- Reference bundled resources clearly
513
- ```
514
- ```
515
- Before writing queries, consult `references/api-patterns.md`
516
- for:
517
- ```
518
- - Rate limiting guidance
519
- - Pagination patterns
520
- - Error codes and handling
521
-
522
- ```
523
- Use progressive disclosure
524
- Keep SKILL.md focused on core instructions. Move detailed documentation to
525
- `references/` and link to it. (See Core Design Principles for how the three-
526
- level system works.)
527
- ```
528
-
529
- Chapter 3
530
-
531
- ## Testing and iteration
532
-
533
-
534
- Chapter 3
535
-
536
- Testing and iteration
537
-
538
- Skills can be tested at varying levels of rigor depending on your needs:
539
-
540
- - Manual testing in Claude.ai - Run queries directly and observe behavior. Fast
541
- iteration, no setup required.
542
- - Scripted testing in Claude Code - Automate test cases for repeatable
543
- validation across changes.
544
- - Programmatic testing via skills API - Build evaluation suites that run
545
- systematically against defined test sets.
546
-
547
- Choose the approach that matches your quality requirements and the visibility
548
- of your skill. A skill used internally by a small team has different testing needs
549
- than one deployed to thousands of enterprise users.
550
-
551
- ```
552
- Pro Tip: Iterate on a single task before expanding
553
- ```
554
- We’ve found that the most effective skill creators iterate on a single challenging
555
- task until Claude succeeds, then extract the winning approach into a skill. This
556
- leverages Claude’s in-context learning and provides faster signal than broad
557
- testing. Once you have a working foundation, expand to multiple test cases for
558
- coverage.
559
-
560
- ```
561
- Recommended Testing Approach
562
- Based on early experience, effective skills testing typically covers three areas:
563
- ```
564
- 1. Triggering tests
565
- Goal: Ensure your skill loads at the right times.
566
- Test cases:
567
- - ✅ Triggers on obvious tasks
568
- - ✅ Triggers on paraphrased requests
569
- - ❌ Doesn't trigger on unrelated topics
570
- Example test suite:
571
-
572
- ```
573
- Should trigger:
574
- ```
575
- - "Help me set up a new ProjectHub workspace"
576
- - "I need to create a project in ProjectHub"
577
- - "Initialize a ProjectHub project for Q4 planning"
578
- Should NOT trigger:
579
- - "What's the weather in San Francisco?"
580
- - "Help me write Python code"
581
- - "Create a spreadsheet" (unless ProjectHub skill handles
582
- sheets)
583
-
584
-
585
- 2. Functional tests
586
-
587
- Goal: Verify the skill produces correct outputs.
588
-
589
- Test cases:
590
-
591
- - Valid outputs generated
592
- - API calls succeed
593
- - Error handling works
594
- - Edge cases covered
595
-
596
- Example:
597
-
598
- ```
599
- Test: Create project with 5 tasks
600
- Given: Project name "Q4 Planning", 5 task descriptions
601
- When: Skill executes workflow
602
- Then:
603
- ```
604
- - Project created in ProjectHub
605
- - 5 tasks created with correct properties
606
- - All tasks linked to project
607
- - No API errors
608
- 3. Performance comparison
609
-
610
- Goal: Prove the skill improves results vs. baseline.
611
-
612
- Use the metrics from Define Success Criteria. Here's what a comparison might
613
- look like.
614
-
615
- Baseline comparison:
616
-
617
- ```
618
- Without skill:
619
- ```
620
- - User provides instructions each time
621
- - 15 back-and-forth messages
622
- - 3 failed API calls requiring retry
623
- - 12,000 tokens consumed
624
-
625
- ```
626
- With skill:
627
- ```
628
- - Automatic workflow execution
629
- - 2 clarifying questions only
630
- - 0 failed API calls
631
- - 6,000 tokens consumed
632
-
633
- ```
634
- Using the skill-creator skill
635
- The skill-creator skill - available in Claude.ai via plugin directory or
636
- download for Claude Code - can help you build and iterate on skills. If you
637
- have an MCP server and know your top 2–3 workflows, you can build and test a
638
- functional skill in a single sitting - often in 15–30 minutes.
639
- Creating skills:
640
- ```
641
- - Generate skills from natural language descriptions
642
- - Produce properly formatted SKILL.md with frontmatter
643
- - Suggest trigger phrases and structure
644
- Reviewing skills:
645
- - Flag common issues (vague descriptions, missing triggers, structural
646
- problems)
647
- - Identify potential over/under-triggering risks
648
- - Suggest test cases based on the skill's stated purpose
649
- Iterative improvement:
650
- - After using your skill and encountering edge cases or failures, bring those
651
- examples back to skill-creator
652
- - Example: "Use the issues & solution identified in this chat to improve how the
653
- skill handles [specific edge case]"
654
-
655
-
656
- To use:
657
-
658
- ```
659
- "Use the skill-creator skill to help me build a skill for
660
- [your use case]"
661
- ```
662
- _Note: skill-creator helps you design and refine skills but does not execute
663
- automated test suites or produce quantitative evaluation results._
664
-
665
- Iteration based on feedback
666
-
667
- Skills are living documents. Plan to iterate based on:
668
-
669
- Undertriggering signals:
670
-
671
- - Skill doesn't load when it should
672
- - Users manually enabling it
673
- - Support questions about when to use it
674
-
675
- ```
676
- Solution: Add more detail and nuance to the description - this may include
677
- keywords particularly for technical terms
678
- ```
679
- Overtriggering signals:
680
-
681
- - Skill loads for irrelevant queries
682
- - Users disabling it
683
- - Confusion about purpose
684
-
685
- ```
686
- Solution: Add negative triggers, be more specific
687
- ```
688
- ```
689
- Execution issues:
690
- ```
691
- - Inconsistent results
692
- - API call failures
693
- - User corrections needed
694
-
695
- ```
696
- Solution: Improve instructions, add error handling
697
- ```
698
-
699
- Chapter 4
700
-
701
- ## Distribution and sharing
702
-
703
-
704
- Chapter 4
705
-
706
- Distribution and sharing
707
-
708
- Skills make your MCP integration more complete. As users compare connectors,
709
- those with skills offer a faster path to value, giving you an edge over MCP-only
710
- alternatives.
711
-
712
- Current distribution model (January 2026)
713
-
714
- How individual users get skills:
715
-
716
- 1. Download the skill folder
717
- 2. Zip the folder (if needed)
718
- 3. Upload to Claude.ai via Settings > Capabilities > Skills
719
- 4. Or place in Claude Code skills directory
720
-
721
- Organization-level skills:
722
-
723
- - Admins can deploy skills workspace-wide (shipped December 18, 2025)
724
- - Automatic updates
725
- - Centralized management
726
-
727
- An open standard
728
-
729
- We've published Agent Skills as an open standard. Like MCP, we believe skills
730
- should be portable across tools and platforms - the same skill should work
731
- whether you're using Claude or other AI platforms. That said, some skills are
732
- designed to take full advantage of a specific platform's capabilities; authors can
733
- note this in the skill's compatibility field. We've been collaborating with
734
- members of the ecosystem on the standard, and we're excited by early adoption.
735
-
736
- ```
737
- Using skills via API
738
- For programmatic use cases - such as building applications, agents, or automated
739
- workflows that leverage skills - the API provides direct control over skill
740
- management and execution.
741
- Key capabilities:
742
- ```
743
- - `/v1/skills` endpoint for listing and managing skills
744
- - Add skills to Messages API requests via the `container.skills` parameter
745
- - Version control and management through the Claude Console
746
- - Works with the Claude Agent SDK for building custom agents
747
- When to use skills via the API vs. Claude.ai:
748
-
749
- ```
750
- Use Case Best Surface
751
- End users interacting with skills directly Claude.ai / Claude Code
752
- Manual testing and iteration during development Claude.ai / Claude Code
753
- Individual, ad-hoc workflows Claude.ai / Claude Code
754
- Applications using skills programmatically API
755
- Production deployments at scale API
756
- Automated pipelines and agent systems API
757
- ```
758
-
759
- Note: Skills in the API require the Code Execution Tool beta, which provides the
760
- secure environment skills need to run.
761
-
762
- For implementation details, see:
763
-
764
- - Skills API Quickstart
765
- - Create Custom skills
766
- - Skills in the Agent SDK
767
-
768
- Recommended approach today
769
-
770
- Start by hosting your skill on GitHub with a public repo, clear README (for
771
- human visitors — this is separate from your skill folder, which should not contain
772
- a README.md), and example usage with screenshots. Then add a section
773
- to your MCP documentation that links to the skill, explains why using both
774
- together is valuable, and provides a quick-start guide.
775
-
776
- 1. Host on GitHub
777
- _-_ Public repo for open-source skills
778
- _-_ Clear README with installation instructions
779
- _-_ Example usage and screenshots
780
- 2. Document in Your MCP Repo
781
- _-_ Link to skills from MCP documentation
782
- _-_ Explain the value of using both together
783
- _-_ Provide quick-start guide
784
- 3. Create an Installation Guide
785
-
786
- ```
787
- -# Installing the [Your Service] skill
788
- ```
789
- 1. Download the skill:
790
- - Clone repo: `git clone https:-/github.com/yourcompany/
791
- skills`
792
- - Or download ZIP from Releases
793
- 2. Install in Claude:
794
- - Open Claude.ai > Settings > skills
795
- - Click "Upload skill"
796
- - Select the skill folder (zipped)
797
- 3. Enable the skill:
798
- - Toggle on the [Your Service] skill
799
- - Ensure your MCP server is connected
800
- 4. Test:
801
- - Ask Claude: "Set up a new project in [Your Service]"
802
-
803
- ```
804
- Positioning your skill
805
- How you describe your skill determines whether users understand its value and
806
- actually try it. When writing about your skill—in your README, documentation,
807
- or marketing - keep these principles in mind.
808
- Focus on outcomes, not features:
809
- ✅ Good:
810
- ```
811
- ```
812
- "The ProjectHub skill enables teams to set up complete project
813
- workspaces in seconds — including pages, databases, and
814
- templates — instead of spending 30 minutes on manual setup."
815
- ```
816
- ```
817
- ❌ Bad:
818
- ```
819
- ```
820
- "The ProjectHub skill is a folder containing YAML frontmatter
821
- and Markdown instructions that calls our MCP server tools."
822
- ```
823
- ```
824
- Highlight the MCP + skills story:
825
- ```
826
- ```
827
- "Our MCP server gives Claude access to your Linear projects.
828
- Our skills teach Claude your team's sprint planning workflow.
829
- Together, they enable AI-powered project management."
830
- ```
831
-
832
- Chapter 5
833
-
834
- ## Patterns and troubleshooting
835
-
836
-
837
- Chapter 5
838
-
839
- Patterns and troubleshooting
840
-
841
- These patterns emerged from skills created by early adopters and internal teams.
842
- They represent common approaches we've seen work well, not prescriptive
843
- templates.
844
-
845
- Choosing your approach: Problem-first vs. tool-first
846
-
847
- Think of it like Home Depot. You might walk in with a problem - "I need to fix a
848
- kitchen cabinet" - and an employee points you to the right tools. Or you might
849
- pick out a new drill and ask how to use it for your specific job.
850
-
851
- Skills work the same way:
852
-
853
- - Problem-first: "I need to set up a project workspace" → Your skill orchestrates
854
- the right MCP calls in the right sequence. Users describe outcomes; the skill
855
- handles the tools.
856
- - Tool-first: "I have Notion MCP connected" → Your skill teaches Claude the
857
- optimal workflows and best practices. Users have access; the skill provides
858
- expertise.
859
-
860
- Most skills lean one direction. Knowing which framing fits your use case helps
861
- you choose the right pattern below.
862
-
863
- ```
864
- Pattern 1: Sequential workflow orchestration
865
- Use when: Your users need multi-step processes in a specific order.
866
- Example structure:
867
- ```
868
- ```
869
- -# Workflow: Onboard New Customer
870
- --# Step 1: Create Account
871
- Call MCP tool: `create_customer`
872
- Parameters: name, email, company
873
- --# Step 2: Setup Payment
874
- Call MCP tool: `setup_payment_method`
875
- Wait for: payment method verification
876
- --# Step 3: Create Subscription
877
- Call MCP tool: `create_subscription`
878
- Parameters: plan_id, customer_id (from Step 1)
879
- --# Step 4: Send Welcome Email
880
- Call MCP tool: `send_email`
881
- Template: welcome_email_template
882
- ```
883
- ```
884
- Key techniques:
885
- ```
886
- - Explicit step ordering
887
- - Dependencies between steps
888
- - Validation at each stage
889
- - Rollback instructions for failures
890
-
891
-
892
- Pattern 2: Multi-MCP coordination
893
-
894
- Use when: Workflows span multiple services.
895
-
896
- Example: Design-to-development handoff
897
-
898
- ```
899
- --# Phase 1: Design Export (Figma MCP)
900
- ```
901
- 1. Export design assets from Figma
902
- 2. Generate design specifications
903
- 3. Create asset manifest
904
- --# Phase 2: Asset Storage (Drive MCP)
905
- 1. Create project folder in Drive
906
- 2. Upload all assets
907
- 3. Generate shareable links
908
- --# Phase 3: Task Creation (Linear MCP)
909
- 1. Create development tasks
910
- 2. Attach asset links to tasks
911
- 3. Assign to engineering team
912
- --# Phase 4: Notification (Slack MCP)
913
- 1. Post handoff summary to #engineering
914
- 2. Include asset links and task references
915
-
916
- Key techniques:
917
-
918
- - Clear phase separation
919
- - Data passing between MCPs
920
- - Validation before moving to next phase
921
- - Centralized error handling
922
-
923
- ```
924
- Pattern 3: Iterative refinement
925
- Use when: Output quality improves with iteration.
926
- Example: Report generation
927
- ```
928
- ```
929
- -# Iterative Report Creation
930
- --# Initial Draft
931
- ```
932
- 1. Fetch data via MCP
933
- 2. Generate first draft report
934
- 3. Save to temporary file
935
- --# Quality Check
936
- 1. Run validation script: `scripts/check_report.py`
937
- 2. Identify issues:
938
- - Missing sections
939
- - Inconsistent formatting
940
- - Data validation errors
941
- --# Refinement Loop
942
- 1. Address each identified issue
943
- 2. Regenerate affected sections
944
- 3. Re-validate
945
- 4. Repeat until quality threshold met
946
- --# Finalization
947
- 1. Apply final formatting
948
- 2. Generate summary
949
- 3. Save final version
950
-
951
- ```
952
- Key techniques:
953
- ```
954
- - Explicit quality criteria
955
- - Iterative improvement
956
- - Validation scripts
957
- - Know when to stop iterating
958
-
959
-
960
- Pattern 4: Context-aware tool selection
961
-
962
- Use when: Same outcome, different tools depending on context.
963
-
964
- Example: File storage
965
-
966
- ```
967
- -# Smart File Storage
968
- --# Decision Tree
969
- ```
970
- 1. Check file type and size
971
- 2. Determine best storage location:
972
- - Large files (>10MB): Use cloud storage MCP
973
- - Collaborative docs: Use Notion/Docs MCP
974
- - Code files: Use GitHub MCP
975
- - Temporary files: Use local storage
976
- --# Execute Storage
977
- Based on decision:
978
- - Call appropriate MCP tool
979
- - Apply service-specific metadata
980
- - Generate access link
981
- --# Provide Context to User
982
- Explain why that storage was chosen
983
-
984
- Key techniques:
985
-
986
- - Clear decision criteria
987
- - Fallback options
988
- - Transparency about choices
989
-
990
- ```
991
- Pattern 5: Domain-specific intelligence
992
- Use when: Your skill adds specialized knowledge beyond tool access.
993
- Example: Financial compliance
994
- ```
995
- ```
996
- -# Payment Processing with Compliance
997
- --# Before Processing (Compliance Check)
998
- ```
999
- 1. Fetch transaction details via MCP
1000
- 2. Apply compliance rules:
1001
- - Check sanctions lists
1002
- - Verify jurisdiction allowances
1003
- - Assess risk level
1004
- 3. Document compliance decision
1005
- --# Processing
1006
- IF compliance passed:
1007
- - Call payment processing MCP tool
1008
- - Apply appropriate fraud checks
1009
- - Process transaction
1010
- ELSE:
1011
- - Flag for review
1012
- - Create compliance case
1013
- --# Audit Trail
1014
- - Log all compliance checks
1015
- - Record processing decisions
1016
- - Generate audit report
1017
-
1018
- ```
1019
- Key techniques:
1020
- ```
1021
- - Domain expertise embedded in logic
1022
- - Compliance before action
1023
- - Comprehensive documentation
1024
- - Clear governance
1025
-
1026
-
1027
- Troubleshooting
1028
-
1029
- Skill won't upload
1030
-
1031
- Error: "Could not find SKILL.md in uploaded folder"
1032
-
1033
- Cause: File not named exactly SKILL.md
1034
-
1035
- Solution:
1036
-
1037
- - Rename to SKILL.md (case-sensitive)
1038
- - Verify with: ls -la should show SKILL.md
1039
-
1040
- Error: "Invalid frontmatter"
1041
-
1042
- Cause: YAML formatting issue
1043
-
1044
- Common mistakes:
1045
-
1046
- ```
1047
- # Wrong - missing delimiters
1048
- name: my-skill
1049
- description: Does things
1050
- # Wrong - unclosed quotes
1051
- name: my-skill
1052
- description: "Does things
1053
- # Correct
1054
- ---
1055
- name: my-skill
1056
- description: Does things
1057
- ---
1058
- ```
1059
- Error: "Invalid skill name"
1060
-
1061
- Cause: Name has spaces or capitals
1062
-
1063
- ```
1064
- # Wrong
1065
- name: My Cool Skill
1066
- # Correct
1067
- name: my-cool-skill
1068
- ```
1069
- ```
1070
- Skill doesn't trigger
1071
- Symptom: Skill never loads automatically
1072
- Fix:
1073
- Revise your description field. See The Description Field for good/bad examples.
1074
- Quick checklist:
1075
- ```
1076
- - Is it too generic? ("Helps with projects" won't work)
1077
- - Does it include trigger phrases users would actually say?
1078
- - Does it mention relevant file types if applicable?
1079
- Debugging approach:
1080
- Ask Claude: "When would you use the [skill name] skill?" Claude will quote the
1081
- description back. Adjust based on what's missing.
1082
- Skill triggers too often
1083
- Symptom: Skill loads for unrelated queries
1084
- Solutions:
1085
- 1. Add negative triggers
1086
-
1087
- ```
1088
- description: Advanced data analysis for CSV files. Use for
1089
- statistical modeling, regression, clustering. Do NOT use for
1090
- simple data exploration (use data-viz skill instead).
1091
- ```
1092
-
1093
- 2. Be more specific
1094
-
1095
- ```
1096
- # Too broad
1097
- description: Processes documents
1098
- # More specific
1099
- description: Processes PDF legal documents for contract review
1100
- ```
1101
- 3. Clarify scope
1102
-
1103
- ```
1104
- description: PayFlow payment processing for e-commerce. Use
1105
- specifically for online payment workflows, not for general
1106
- financial queries.
1107
- ```
1108
- MCP connection issues
1109
-
1110
- Symptom: Skill loads but MCP calls fail
1111
-
1112
- Checklist:
1113
-
1114
- 1. Verify MCP server is connected
1115
- _-_ Claude.ai: Settings > Extensions > [Your Service]
1116
- _-_ Should show "Connected" status
1117
- 2. Check authentication
1118
- _-_ API keys valid and not expired
1119
- _-_ Proper permissions/scopes granted
1120
- _-_ OAuth tokens refreshed
1121
- 3. Test MCP independently
1122
- _-_ Ask Claude to call MCP directly (without skill)
1123
- _-_ "Use [Service] MCP to fetch my projects"
1124
- _-_ If this fails, issue is MCP not skill
1125
- 4. Verify tool names
1126
- _-_ Skill references correct MCP tool names
1127
- _-_ Check MCP server documentation
1128
- _-_ Tool names are case-sensitive
1129
-
1130
- ```
1131
- Instructions not followed
1132
- Symptom: Skill loads but Claude doesn't follow instructions
1133
- Common causes:
1134
- ```
1135
- 1. Instructions too verbose
1136
- _-_ Keep instructions concise
1137
- _-_ Use bullet points and numbered lists
1138
- _-_ Move detailed reference to separate files
1139
- 2. Instructions buried
1140
- _-_ Put critical instructions at the top
1141
- _-_ Use ## Important or ## Critical headers
1142
- _-_ Repeat key points if needed
1143
- 3. Ambiguous language
1144
-
1145
- ```
1146
- # Bad
1147
- Make sure to validate things properly
1148
- # Good
1149
- CRITICAL: Before calling create_project, verify:
1150
- ```
1151
- - Project name is non-empty
1152
- - At least one team member assigned
1153
- - Start date is not in the past
1154
-
1155
- ```
1156
- Advanced technique: For critical validations, consider bundling a script
1157
- that performs the checks programmatically rather than relying on language
1158
- instructions. Code is deterministic; language interpretation isn't. See the Office
1159
- skills for examples of this pattern.
1160
- ```
1161
- 4. Model "laziness" Add explicit encouragement:
1162
-
1163
- ```
1164
- -# Performance Notes
1165
- ```
1166
- - Take your time to do this thoroughly
1167
- - Quality is more important than speed
1168
- - Do not skip validation steps
1169
-
1170
- ```
1171
- Note: Adding this to user prompts is more effective than in SKILL.md
1172
- ```
1173
-
1174
- Large context issues
1175
-
1176
- Symptom: Skill seems slow or responses degraded
1177
-
1178
- Causes:
1179
-
1180
- - Skill content too large
1181
- - Too many skills enabled simultaneously
1182
- - All content loaded instead of progressive disclosure
1183
-
1184
- Solutions:
1185
-
1186
- 1. Optimize SKILL.md size
1187
- _-_ Move detailed docs to references/
1188
- _-_ Link to references instead of inline
1189
- _-_ Keep SKILL.md under 5,000 words
1190
- 2. Reduce enabled skills
1191
- _-_ Evaluate if you have more than 20 - 50 skills enabled simultaneously
1192
- _-_ Recommend selective enablement
1193
- _-_ Consider skill "packs" for related capabilities
1194
-
1195
-
1196
- Chapter 6
1197
-
1198
- ## Resources and references
1199
-
1200
-
1201
- Chapter 6
1202
-
1203
- Resources and references
1204
-
1205
- If you're building your first skill, start with the Best Practices Guide, then
1206
- reference the API docs as needed.
1207
-
1208
- Official Documentation
1209
-
1210
- Anthropic Resources:
1211
-
1212
- - Best Practices Guide
1213
- - Skills Documentation
1214
- - API Reference
1215
- - MCP Documentation
1216
-
1217
- Blog Posts:
1218
-
1219
- - Introducing Agent Skills
1220
- - Engineering Blog: Equipping Agents for the Real World
1221
- - Skills Explained
1222
- - How to Create Skills for Claude
1223
- - Building Skills for Claude Code
1224
- - Improving Frontend Design through Skills
1225
-
1226
- Example skills
1227
-
1228
- Public skills repository:
1229
-
1230
- - GitHub: anthropics/skills
1231
- - Contains Anthropic-created skills you can customize
1232
-
1233
- ```
1234
- Tools and Utilities
1235
- skill-creator skill:
1236
- ```
1237
- - Built into Claude.ai and available for Claude Code
1238
- - Can generate skills from descriptions
1239
- - Reviews and provides recommendations
1240
- - Use: "Help me build a skill using skill-creator"
1241
- Validation:
1242
- - skill-creator can assess your skills
1243
- - Ask: "Review this skill and suggest improvements"
1244
-
1245
- ```
1246
- Getting Support
1247
- For Technical Questions:
1248
- ```
1249
- - General questions: Community forums at the Claude Developers Discord
1250
- For Bug Reports:
1251
- - GitHub Issues: anthropics/skills/issues
1252
- - Include: Skill name, error message, steps to reproduce
1253
-
1254
-
1255
- Reference A: Quick
1256
-
1257
- checklist
1258
-
1259
- Use this checklist to validate your skill before and after upload. If you want
1260
- a faster start, use the skill-creator skill to generate your first draft, then run
1261
- through this list to make sure you haven't missed anything.
1262
-
1263
- Before you start
1264
-
1265
- ```
1266
- Identified 2-3 concrete use cases
1267
- Tools identified (built-in or MCP)
1268
- Reviewed this guide and example skills
1269
- Planned folder structure
1270
- ```
1271
- During development
1272
-
1273
- ```
1274
- Folder named in kebab-case
1275
- SKILL.md file exists (exact spelling)
1276
- YAML frontmatter has --- delimiters
1277
- name field: kebab-case, no spaces, no capitals
1278
- description includes WHAT and WHEN
1279
- No XML tags (< >) anywhere
1280
- Instructions are clear and actionable
1281
- Error handling included
1282
- Examples provided
1283
- References clearly linked
1284
- ```
1285
- ```
1286
- Before upload
1287
- Tested triggering on obvious tasks
1288
- Tested triggering on paraphrased requests
1289
- Verified doesn't trigger on unrelated topics
1290
- Functional tests pass
1291
- Tool integration works (if applicable)
1292
- Compressed as .zip file
1293
- ```
1294
- ```
1295
- After upload
1296
- Test in real conversations
1297
- Monitor for under/over-triggering
1298
- Collect user feedback
1299
- Iterate on description and instructions
1300
- Update version in metadata
1301
- ```
1302
-
1303
- Reference B: YAML
1304
-
1305
- frontmatter
1306
-
1307
- Required fields
1308
-
1309
- ```
1310
- ---
1311
- name: skill-name-in-kebab-case
1312
- description: What it does and when to use it. Include specific
1313
- trigger phrases.
1314
- ---
1315
- ```
1316
- All optional fields
1317
-
1318
- ```
1319
- name: skill-name
1320
- description: [required description]
1321
- license: MIT # Optional: License for open-source
1322
- allowed-tools: "Bash(python:*) Bash(npm:*) WebFetch" # Optional:
1323
- Restrict tool access
1324
- metadata: # Optional: Custom fields
1325
- author: Company Name
1326
- version: 1.0.0
1327
- mcp-server: server-name
1328
- category: productivity
1329
- tags: [project-management, automation]
1330
- documentation: https:-/example.com/docs
1331
- support: support@example.com
1332
- ```
1333
- ```
1334
- Security notes
1335
- Allowed:
1336
- ```
1337
- - Any standard YAML types (strings, numbers, booleans, lists, objects)
1338
- - Custom metadata fields
1339
- - Long descriptions (up to 1024 characters)
1340
- Forbidden:
1341
- - XML angle brackets (< >) - security restriction
1342
- - Code execution in YAML (uses safe YAML parsing)
1343
- - Skills named with "claude" or "anthropic" prefix (reserved)
1344
-
1345
-
1346
- Reference C: Complete skill
1347
-
1348
- examples
1349
-
1350
- For full, production-ready skills demonstrating the patterns in this guide:
1351
-
1352
- - Document Skills - PDF, DOCX, PPTX, XLSX creation
1353
- - Example Skills - Various workflow patterns
1354
- - Partner Skills Directory - View skills from various partners such as Asana,
1355
- Atlassian, Canva, Figma, Sentry, Zapier, and more
1356
-
1357
- These repositories stay up-to-date and include additional examples beyond
1358
- what's covered here. Clone them, modify them for your use case, and use them as
1359
- templates.
1360
-
1361
-
1362
- claude.ai
1363
-
1364
-