@phuc1403/musketeer 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (235) hide show
  1. package/INSTALLATION.md +22 -0
  2. package/LICENSE +21 -0
  3. package/README.md +38 -0
  4. package/bin/musketeer.js +72 -0
  5. package/manifest.json +238 -0
  6. package/package.json +46 -0
  7. package/src/copier.js +119 -0
  8. package/src/lockfile.js +61 -0
  9. package/src/manifest-loader.js +46 -0
  10. package/src/muster.js +48 -0
  11. package/src/provisioner/detect.js +93 -0
  12. package/src/provisioner/guide.js +32 -0
  13. package/src/provisioner/index.js +113 -0
  14. package/src/provisioner/mcp.js +26 -0
  15. package/src/provisioner/os-package-manager.js +71 -0
  16. package/src/provisioner/venv.js +44 -0
  17. package/src/reconcile.js +94 -0
  18. package/src/resolver.js +130 -0
  19. package/src/schema.js +152 -0
  20. package/src/settings-merger.js +0 -0
  21. package/template/.claude/agents/code-reviewer.md +166 -0
  22. package/template/.claude/agents/hallmark-auditor.md +78 -0
  23. package/template/.claude/agents/hallmark-explorer.md +81 -0
  24. package/template/.claude/agents/researcher.md +33 -0
  25. package/template/.claude/hooks/block-migration-edits.cjs +31 -0
  26. package/template/.claude/hooks/format-json-hook.js +91 -0
  27. package/template/.claude/hooks/inject-design-docs.cjs +86 -0
  28. package/template/.claude/hooks/lib/colors.cjs +122 -0
  29. package/template/.claude/hooks/lib/git-info-cache.cjs +191 -0
  30. package/template/.claude/hooks/lib/transcript-parser.cjs +277 -0
  31. package/template/.claude/hooks/usage-context-awareness.cjs +166 -0
  32. package/template/.claude/hooks/validate-cml-hook.js +145 -0
  33. package/template/.claude/skills/adr-writer/SKILL.md +78 -0
  34. package/template/.claude/skills/adr-writer/references/adr-example.md +38 -0
  35. package/template/.claude/skills/adr-writer/references/adr-template.md +46 -0
  36. package/template/.claude/skills/architecture-characteristic-writer/SKILL.md +117 -0
  37. package/template/.claude/skills/architecture-characteristic-writer/assets/worksheet-template.md +40 -0
  38. package/template/.claude/skills/architecture-characteristic-writer/references/characteristics-catalog.md +106 -0
  39. package/template/.claude/skills/code-review/SKILL.md +54 -0
  40. package/template/.claude/skills/code-review/references/adversarial-review.md +223 -0
  41. package/template/.claude/skills/code-review/references/checklists/api.md +52 -0
  42. package/template/.claude/skills/code-review/references/checklists/base.md +100 -0
  43. package/template/.claude/skills/code-review/references/checklists/web-app.md +54 -0
  44. package/template/.claude/skills/context-map/SKILL.md +80 -0
  45. package/template/.claude/skills/context-map/example.cml +106 -0
  46. package/template/.claude/skills/context-map/reference/Aggregate/Aggregate.md +1 -0
  47. package/template/.claude/skills/context-map/reference/Bounded Context/Bounded Context.md +41 -0
  48. package/template/.claude/skills/context-map/reference/Bounded Context/businessModel.md +6 -0
  49. package/template/.claude/skills/context-map/reference/Bounded Context/domainVisionStatement.md +3 -0
  50. package/template/.claude/skills/context-map/reference/Bounded Context/evolution.md +6 -0
  51. package/template/.claude/skills/context-map/reference/Bounded Context/implementationTechnology.md +1 -0
  52. package/template/.claude/skills/context-map/reference/Bounded Context/implements.md +1 -0
  53. package/template/.claude/skills/context-map/reference/Bounded Context/knowledgeLevel.md +5 -0
  54. package/template/.claude/skills/context-map/reference/Bounded Context/realizes.md +9 -0
  55. package/template/.claude/skills/context-map/reference/Bounded Context/refines.md +10 -0
  56. package/template/.claude/skills/context-map/reference/Bounded Context/responsibilities.md +26 -0
  57. package/template/.claude/skills/context-map/reference/Bounded Context/type.md +23 -0
  58. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Anticorruption Layer.md +5 -0
  59. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Bounded Context Relationship.md +13 -0
  60. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Conformist.md +5 -0
  61. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Customer-Supplier (C-S).md +23 -0
  62. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Open Host Service.md +5 -0
  63. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Partnership (P).md +14 -0
  64. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Published Language.md +5 -0
  65. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Shared Kernel (SK).md +13 -0
  66. package/template/.claude/skills/context-map/reference/Context Map.md +63 -0
  67. package/template/.claude/skills/context-map/reference/Domain/Domain.md +30 -0
  68. package/template/.claude/skills/context-map/reference/Domain/supports.md +34 -0
  69. package/template/.claude/skills/context-map/reference/Domain/type.md +3 -0
  70. package/template/.claude/skills/context-map/reference/Semantic Rules.md +33 -0
  71. package/template/.claude/skills/hallmark/SKILL.md +552 -0
  72. package/template/.claude/skills/hallmark/references/anti-patterns.md +412 -0
  73. package/template/.claude/skills/hallmark/references/assets.md +406 -0
  74. package/template/.claude/skills/hallmark/references/color.md +95 -0
  75. package/template/.claude/skills/hallmark/references/component-cookbook.md +256 -0
  76. package/template/.claude/skills/hallmark/references/components/c1-outlined-chip.md +12 -0
  77. package/template/.claude/skills/hallmark/references/components/c2-inline-form-as-cta.md +16 -0
  78. package/template/.claude/skills/hallmark/references/components/c3-typographic-link.md +8 -0
  79. package/template/.claude/skills/hallmark/references/components/c4-sticky-bottom-bar.md +16 -0
  80. package/template/.claude/skills/hallmark/references/components/f1-bento-grid.md +20 -0
  81. package/template/.claude/skills/hallmark/references/components/f2-sticky-scroll-stack.md +20 -0
  82. package/template/.claude/skills/hallmark/references/components/f3-tabular-spec-sheet.md +11 -0
  83. package/template/.claude/skills/hallmark/references/components/f4-step-sequence.md +11 -0
  84. package/template/.claude/skills/hallmark/references/components/f5-annotated-screenshot.md +11 -0
  85. package/template/.claude/skills/hallmark/references/components/f6-product-card-grid.md +41 -0
  86. package/template/.claude/skills/hallmark/references/components/ft1-mast-headed.md +13 -0
  87. package/template/.claude/skills/hallmark/references/components/ft2-inline-rule-single-line.md +10 -0
  88. package/template/.claude/skills/hallmark/references/components/ft3-index-style-category-list.md +12 -0
  89. package/template/.claude/skills/hallmark/references/components/ft4-dense-typographic.md +10 -0
  90. package/template/.claude/skills/hallmark/references/components/ft5-statement.md +21 -0
  91. package/template/.claude/skills/hallmark/references/components/ft6-letter-close.md +19 -0
  92. package/template/.claude/skills/hallmark/references/components/ft7-newsletter-first.md +27 -0
  93. package/template/.claude/skills/hallmark/references/components/ft8-marquee-scroll.md +25 -0
  94. package/template/.claude/skills/hallmark/references/components/h1-marquee.md +15 -0
  95. package/template/.claude/skills/hallmark/references/components/h2-split-diptych.md +15 -0
  96. package/template/.claude/skills/hallmark/references/components/h3-quote-led.md +11 -0
  97. package/template/.claude/skills/hallmark/references/components/h4-stat-led.md +14 -0
  98. package/template/.claude/skills/hallmark/references/components/h5-letter-hero.md +11 -0
  99. package/template/.claude/skills/hallmark/references/components/h6-photographic-fold.md +16 -0
  100. package/template/.claude/skills/hallmark/references/components/h7-demo-video-clipped-by-viewport-edge.md +27 -0
  101. package/template/.claude/skills/hallmark/references/components/h8-mockup-split-browser-framed.md +23 -0
  102. package/template/.claude/skills/hallmark/references/components/h9-custom-illustration-centerpiece.md +27 -0
  103. package/template/.claude/skills/hallmark/references/components/n1-wordmark-2-links.md +12 -0
  104. package/template/.claude/skills/hallmark/references/components/n10-floating-on-scroll-morph.md +19 -0
  105. package/template/.claude/skills/hallmark/references/components/n2-floating-chip.md +14 -0
  106. package/template/.claude/skills/hallmark/references/components/n3-side-rail.md +14 -0
  107. package/template/.claude/skills/hallmark/references/components/n4-hidden-behind-k.md +9 -0
  108. package/template/.claude/skills/hallmark/references/components/n5-floating-pill.md +28 -0
  109. package/template/.claude/skills/hallmark/references/components/n6-newspaper-masthead.md +24 -0
  110. package/template/.claude/skills/hallmark/references/components/n7-brutal-slab.md +22 -0
  111. package/template/.claude/skills/hallmark/references/components/n8-terminal-command.md +21 -0
  112. package/template/.claude/skills/hallmark/references/components/n9-edge-aligned-minimal.md +17 -0
  113. package/template/.claude/skills/hallmark/references/components/s1-left-margin-numbered.md +15 -0
  114. package/template/.claude/skills/hallmark/references/components/s2-hanging.md +13 -0
  115. package/template/.claude/skills/hallmark/references/components/s3-sticky-pinned.md +19 -0
  116. package/template/.claude/skills/hallmark/references/components/s4-inline-no-break.md +11 -0
  117. package/template/.claude/skills/hallmark/references/components/s5-bottom-anchored.md +13 -0
  118. package/template/.claude/skills/hallmark/references/components/t1-pull-quote-with-marginalia.md +12 -0
  119. package/template/.claude/skills/hallmark/references/components/t2-logo-wall-hairline.md +19 -0
  120. package/template/.claude/skills/hallmark/references/components/t3-single-huge-quote.md +11 -0
  121. package/template/.claude/skills/hallmark/references/components/t4-numbered-stat-strip.md +14 -0
  122. package/template/.claude/skills/hallmark/references/contract.md +24 -0
  123. package/template/.claude/skills/hallmark/references/copy.md +182 -0
  124. package/template/.claude/skills/hallmark/references/custom-craft.md +626 -0
  125. package/template/.claude/skills/hallmark/references/custom-theme.md +329 -0
  126. package/template/.claude/skills/hallmark/references/design-md.md +116 -0
  127. package/template/.claude/skills/hallmark/references/export-formats.md +328 -0
  128. package/template/.claude/skills/hallmark/references/floating-nav.md +89 -0
  129. package/template/.claude/skills/hallmark/references/genres/atmospheric.md +65 -0
  130. package/template/.claude/skills/hallmark/references/genres/editorial.md +70 -0
  131. package/template/.claude/skills/hallmark/references/genres/modern-minimal.md +67 -0
  132. package/template/.claude/skills/hallmark/references/genres/playful.md +65 -0
  133. package/template/.claude/skills/hallmark/references/hero-enrichment.md +474 -0
  134. package/template/.claude/skills/hallmark/references/imagery-kit.md +170 -0
  135. package/template/.claude/skills/hallmark/references/interaction-and-states.md +207 -0
  136. package/template/.claude/skills/hallmark/references/layout-and-space.md +111 -0
  137. package/template/.claude/skills/hallmark/references/macrostructures/01-bento-grid.md +35 -0
  138. package/template/.claude/skills/hallmark/references/macrostructures/02-long-document.md +34 -0
  139. package/template/.claude/skills/hallmark/references/macrostructures/03-marquee-hero.md +31 -0
  140. package/template/.claude/skills/hallmark/references/macrostructures/04-stat-led.md +32 -0
  141. package/template/.claude/skills/hallmark/references/macrostructures/05-workbench.md +32 -0
  142. package/template/.claude/skills/hallmark/references/macrostructures/06-conversational-faq.md +33 -0
  143. package/template/.claude/skills/hallmark/references/macrostructures/07-manifesto.md +32 -0
  144. package/template/.claude/skills/hallmark/references/macrostructures/08-photographic.md +34 -0
  145. package/template/.claude/skills/hallmark/references/macrostructures/09-quote-led.md +32 -0
  146. package/template/.claude/skills/hallmark/references/macrostructures/10-specimen.md +32 -0
  147. package/template/.claude/skills/hallmark/references/macrostructures/11-catalogue.md +23 -0
  148. package/template/.claude/skills/hallmark/references/macrostructures/12-letter.md +23 -0
  149. package/template/.claude/skills/hallmark/references/macrostructures/13-index-first.md +23 -0
  150. package/template/.claude/skills/hallmark/references/macrostructures/14-narrative-workflow.md +23 -0
  151. package/template/.claude/skills/hallmark/references/macrostructures/15-split-studio.md +23 -0
  152. package/template/.claude/skills/hallmark/references/macrostructures/16-feature-stack.md +23 -0
  153. package/template/.claude/skills/hallmark/references/macrostructures/17-type-specimen.md +23 -0
  154. package/template/.claude/skills/hallmark/references/macrostructures/18-portfolio-grid.md +23 -0
  155. package/template/.claude/skills/hallmark/references/macrostructures/19-map-diagram.md +23 -0
  156. package/template/.claude/skills/hallmark/references/macrostructures/20-ecosystem-index.md +23 -0
  157. package/template/.claude/skills/hallmark/references/macrostructures/21-component-playground.md +23 -0
  158. package/template/.claude/skills/hallmark/references/macrostructures.md +89 -0
  159. package/template/.claude/skills/hallmark/references/microinteractions.md +260 -0
  160. package/template/.claude/skills/hallmark/references/motion.md +109 -0
  161. package/template/.claude/skills/hallmark/references/preview-examples.md +49 -0
  162. package/template/.claude/skills/hallmark/references/responsive.md +138 -0
  163. package/template/.claude/skills/hallmark/references/slop-test.md +205 -0
  164. package/template/.claude/skills/hallmark/references/structure.md +164 -0
  165. package/template/.claude/skills/hallmark/references/study.md +511 -0
  166. package/template/.claude/skills/hallmark/references/typography.md +243 -0
  167. package/template/.claude/skills/hallmark/references/verbs/audit.md +25 -0
  168. package/template/.claude/skills/hallmark/references/verbs/redesign.md +269 -0
  169. package/template/.claude/skills/hallmark-explore/SKILL.md +137 -0
  170. package/template/.claude/skills/hallmark-explore/references/direction-matrix.md +124 -0
  171. package/template/.claude/skills/hallmark-explore/references/explorer-call.md +68 -0
  172. package/template/.claude/skills/hallmark-explore/scripts/build_compare.py +174 -0
  173. package/template/.claude/skills/hallmark-explore/scripts/scaffold_exploration.py +122 -0
  174. package/template/.claude/skills/hallmark-loop/SKILL.md +105 -0
  175. package/template/.claude/skills/hallmark-loop/references/auditor-call.md +60 -0
  176. package/template/.claude/skills/hallmark-loop/references/capture.md +78 -0
  177. package/template/.claude/skills/hallmark-loop/references/loop-control.md +79 -0
  178. package/template/.claude/skills/handoff/SKILL.md +15 -0
  179. package/template/.claude/skills/install.ps1 +42 -0
  180. package/template/.claude/skills/install.sh +54 -0
  181. package/template/.claude/skills/knowledge-crunching/SKILL.md +130 -0
  182. package/template/.claude/skills/knowledge-crunching/assets/context.template.md +59 -0
  183. package/template/.claude/skills/knowledge-crunching/references/crunching-dialogue.md +113 -0
  184. package/template/.claude/skills/research/SKILL.md +69 -0
  185. package/template/.claude/skills/skill-creator/LICENSE.txt +202 -0
  186. package/template/.claude/skills/skill-creator/SKILL.md +149 -0
  187. package/template/.claude/skills/skill-creator/agents/analyzer.md +274 -0
  188. package/template/.claude/skills/skill-creator/agents/comparator.md +202 -0
  189. package/template/.claude/skills/skill-creator/agents/grader.md +223 -0
  190. package/template/.claude/skills/skill-creator/assets/eval_review.html +146 -0
  191. package/template/.claude/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  192. package/template/.claude/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  193. package/template/.claude/skills/skill-creator/references/benchmark-optimization-guide.md +86 -0
  194. package/template/.claude/skills/skill-creator/references/distribution-guide.md +79 -0
  195. package/template/.claude/skills/skill-creator/references/eval-infrastructure-guide.md +129 -0
  196. package/template/.claude/skills/skill-creator/references/eval-schemas.md +121 -0
  197. package/template/.claude/skills/skill-creator/references/mcp-skills-integration.md +71 -0
  198. package/template/.claude/skills/skill-creator/references/metadata-quality-criteria.md +94 -0
  199. package/template/.claude/skills/skill-creator/references/plugin-marketplace-hosting.md +104 -0
  200. package/template/.claude/skills/skill-creator/references/plugin-marketplace-overview.md +89 -0
  201. package/template/.claude/skills/skill-creator/references/plugin-marketplace-schema.md +93 -0
  202. package/template/.claude/skills/skill-creator/references/plugin-marketplace-sources.md +103 -0
  203. package/template/.claude/skills/skill-creator/references/plugin-marketplace-troubleshooting.md +76 -0
  204. package/template/.claude/skills/skill-creator/references/script-quality-criteria.md +106 -0
  205. package/template/.claude/skills/skill-creator/references/skill-anatomy-and-requirements.md +77 -0
  206. package/template/.claude/skills/skill-creator/references/skill-creation-workflow.md +151 -0
  207. package/template/.claude/skills/skill-creator/references/skill-design-patterns.md +75 -0
  208. package/template/.claude/skills/skill-creator/references/skillmark-benchmark-criteria.md +102 -0
  209. package/template/.claude/skills/skill-creator/references/structure-organization-criteria.md +114 -0
  210. package/template/.claude/skills/skill-creator/references/testing-and-iteration.md +78 -0
  211. package/template/.claude/skills/skill-creator/references/token-efficiency-criteria.md +74 -0
  212. package/template/.claude/skills/skill-creator/references/troubleshooting-guide.md +81 -0
  213. package/template/.claude/skills/skill-creator/references/validation-checklist.md +83 -0
  214. package/template/.claude/skills/skill-creator/references/writing-effective-instructions.md +88 -0
  215. package/template/.claude/skills/skill-creator/references/yaml-frontmatter-reference.md +92 -0
  216. package/template/.claude/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  217. package/template/.claude/skills/skill-creator/scripts/encoding_utils.py +36 -0
  218. package/template/.claude/skills/skill-creator/scripts/generate_report.py +326 -0
  219. package/template/.claude/skills/skill-creator/scripts/improve_description.py +248 -0
  220. package/template/.claude/skills/skill-creator/scripts/init_skill.py +360 -0
  221. package/template/.claude/skills/skill-creator/scripts/package_skill.py +143 -0
  222. package/template/.claude/skills/skill-creator/scripts/quick_validate.py +110 -0
  223. package/template/.claude/skills/skill-creator/scripts/run_eval.py +310 -0
  224. package/template/.claude/skills/skill-creator/scripts/run_loop.py +332 -0
  225. package/template/.claude/skills/skill-creator/scripts/utils.py +47 -0
  226. package/template/.claude/skills/tdd/SKILL.md +142 -0
  227. package/template/.claude/skills/tdd/assets/Directory.Build.props +26 -0
  228. package/template/.claude/skills/tdd/deep-modules.md +15 -0
  229. package/template/.claude/skills/tdd/dotnet-build-config.md +21 -0
  230. package/template/.claude/skills/tdd/interface-design.md +31 -0
  231. package/template/.claude/skills/tdd/mocking.md +59 -0
  232. package/template/.claude/skills/tdd/refactoring.md +10 -0
  233. package/template/.claude/skills/tdd/test-per-layer.md +69 -0
  234. package/template/.claude/skills/tdd/tests.md +61 -0
  235. package/template/.claude/statusline.cjs +0 -0
@@ -0,0 +1,89 @@
1
+ # Plugin Marketplaces Overview
2
+
3
+ Plugin marketplace = catalog distributing Claude Code extensions across teams/communities.
4
+ Provides centralized discovery, version tracking, automatic updates, multiple source types.
5
+
6
+ ## Creation & Distribution Flow
7
+
8
+ 1. **Create plugins** — commands, agents, hooks, MCP servers, LSP servers (see [Plugins docs](https://code.claude.com/docs/en/plugins.md))
9
+ 2. **Create marketplace file** — `.claude-plugin/marketplace.json` listing plugins + sources
10
+ 3. **Host marketplace** — push to GitHub/GitLab/git host
11
+ 4. **Share** — users add via `/plugin marketplace add`, install via `/plugin install`
12
+
13
+ Updates: push changes to repo → users refresh via `/plugin marketplace update`.
14
+
15
+ ## Directory Structure
16
+
17
+ ```
18
+ my-marketplace/
19
+ ├── .claude-plugin/
20
+ │ └── marketplace.json # Marketplace catalog (required)
21
+ └── plugins/
22
+ └── review-plugin/
23
+ ├── .claude-plugin/
24
+ │ └── plugin.json # Plugin manifest
25
+ └── skills/
26
+ └── review/
27
+ └── SKILL.md # Skill definition
28
+ ```
29
+
30
+ ## Walkthrough: Local Marketplace
31
+
32
+ ```bash
33
+ # 1. Create structure
34
+ mkdir -p my-marketplace/.claude-plugin
35
+ mkdir -p my-marketplace/plugins/review-plugin/.claude-plugin
36
+ mkdir -p my-marketplace/plugins/review-plugin/skills/review
37
+
38
+ # 2. Create skill (SKILL.md), plugin manifest (plugin.json), marketplace catalog (marketplace.json)
39
+
40
+ # 3. Add and install
41
+ /plugin marketplace add ./my-marketplace
42
+ /plugin install review-plugin@my-plugins
43
+
44
+ # 4. Test
45
+ /review
46
+ ```
47
+
48
+ ## Plugin Installation Behavior
49
+
50
+ Plugins copied to cache location on install. Cannot reference files outside plugin directory with `../`.
51
+ Workarounds: symlinks (followed during copying) or restructure so shared files are inside plugin source path.
52
+
53
+ ## User Commands
54
+
55
+ | Command | Purpose |
56
+ |---------|---------|
57
+ | `/plugin marketplace add <source>` | Add marketplace |
58
+ | `/plugin marketplace update` | Refresh marketplace |
59
+ | `/plugin install <name>@<marketplace>` | Install plugin |
60
+ | `/plugin validate .` | Validate marketplace JSON |
61
+ | `claude plugin validate .` | CLI validation |
62
+
63
+ ## Validation & Testing
64
+
65
+ ```bash
66
+ # Validate marketplace JSON
67
+ claude plugin validate .
68
+ # or within Claude Code:
69
+ /plugin validate .
70
+
71
+ # Test locally before distribution
72
+ /plugin marketplace add ./my-local-marketplace
73
+ /plugin install test-plugin@my-local-marketplace
74
+ ```
75
+
76
+ ## Related References
77
+
78
+ - **Schema:** `references/plugin-marketplace-schema.md`
79
+ - **Sources:** `references/plugin-marketplace-sources.md`
80
+ - **Hosting:** `references/plugin-marketplace-hosting.md`
81
+ - **Troubleshooting:** `references/plugin-marketplace-troubleshooting.md`
82
+
83
+ ## Official Documentation
84
+
85
+ - [Plugin Marketplaces](https://code.claude.com/docs/en/plugin-marketplaces.md)
86
+ - [Discover Plugins](https://code.claude.com/docs/en/discover-plugins.md)
87
+ - [Create Plugins](https://code.claude.com/docs/en/plugins.md)
88
+ - [Plugins Reference](https://code.claude.com/docs/en/plugins-reference.md)
89
+ - [Plugin Settings](https://code.claude.com/docs/en/settings.md#plugin-settings)
@@ -0,0 +1,93 @@
1
+ # Plugin Marketplace Schema
2
+
3
+ Full JSON schema for `.claude-plugin/marketplace.json`.
4
+
5
+ ## Required Top-Level Fields
6
+
7
+ | Field | Type | Description | Example |
8
+ |-------|------|-------------|---------|
9
+ | `name` | string | Marketplace ID (kebab-case, no spaces). Users see: `/plugin install tool@name` | `"acme-tools"` |
10
+ | `owner` | object | Maintainer info (`name` required, `email` optional) | |
11
+ | `plugins` | array | List of plugin entries | |
12
+
13
+ ### Reserved Names (Cannot Use)
14
+
15
+ `claude-code-marketplace`, `claude-code-plugins`, `claude-plugins-official`, `anthropic-marketplace`, `anthropic-plugins`, `agent-skills`, `life-sciences`. Names impersonating official marketplaces also blocked.
16
+
17
+ ## Optional Metadata
18
+
19
+ | Field | Type | Description |
20
+ |-------|------|-------------|
21
+ | `metadata.description` | string | Brief marketplace description |
22
+ | `metadata.version` | string | Marketplace version |
23
+ | `metadata.pluginRoot` | string | Base dir prepended to relative source paths (e.g., `"./plugins"`) |
24
+
25
+ ## Plugin Entry — Required Fields
26
+
27
+ | Field | Type | Description |
28
+ |-------|------|-------------|
29
+ | `name` | string | Plugin ID (kebab-case). Users see: `/plugin install name@marketplace` |
30
+ | `source` | string\|object | Where to fetch plugin (see `plugin-marketplace-sources.md`) |
31
+
32
+ ## Plugin Entry — Optional Metadata
33
+
34
+ | Field | Type | Description |
35
+ |-------|------|-------------|
36
+ | `description` | string | Brief plugin description |
37
+ | `version` | string | Plugin version |
38
+ | `author` | object | Author info (`name` required, `email` optional) |
39
+ | `homepage` | string | Plugin docs URL |
40
+ | `repository` | string | Source code URL |
41
+ | `license` | string | SPDX license ID (MIT, Apache-2.0) |
42
+ | `keywords` | array | Discovery/categorization tags |
43
+ | `category` | string | Plugin category |
44
+ | `tags` | array | Searchability tags |
45
+ | `strict` | boolean | Default `true`: merges with plugin.json. `false`: marketplace entry defines plugin entirely |
46
+
47
+ ## Plugin Entry — Component Configuration
48
+
49
+ | Field | Type | Description |
50
+ |-------|------|-------------|
51
+ | `commands` | string\|array | Custom paths to command files/dirs |
52
+ | `agents` | string\|array | Custom paths to agent files |
53
+ | `hooks` | string\|object | Hooks config or path to hooks file |
54
+ | `mcpServers` | string\|object | MCP server configs or path |
55
+ | `lspServers` | string\|object | LSP server configs or path |
56
+
57
+ ## Minimal Example
58
+
59
+ ```json
60
+ {
61
+ "name": "my-plugins",
62
+ "owner": { "name": "Your Name" },
63
+ "plugins": [{
64
+ "name": "review-plugin",
65
+ "source": "./plugins/review-plugin",
66
+ "description": "Adds a review skill for quick code reviews"
67
+ }]
68
+ }
69
+ ```
70
+
71
+ ## Full Example
72
+
73
+ ```json
74
+ {
75
+ "name": "company-tools",
76
+ "owner": { "name": "DevTools Team", "email": "devtools@example.com" },
77
+ "metadata": { "description": "Internal dev tools", "version": "1.0.0", "pluginRoot": "./plugins" },
78
+ "plugins": [
79
+ {
80
+ "name": "code-formatter",
81
+ "source": "./plugins/formatter",
82
+ "description": "Automatic code formatting on save",
83
+ "version": "2.1.0",
84
+ "author": { "name": "DevTools Team" }
85
+ },
86
+ {
87
+ "name": "deployment-tools",
88
+ "source": { "source": "github", "repo": "company/deploy-plugin" },
89
+ "description": "Deployment automation tools"
90
+ }
91
+ ]
92
+ }
93
+ ```
@@ -0,0 +1,103 @@
1
+ # Plugin Marketplace Sources
2
+
3
+ Plugin source types for `marketplace.json` plugin entries.
4
+
5
+ ## Relative Paths (Same Repo)
6
+
7
+ ```json
8
+ { "name": "my-plugin", "source": "./plugins/my-plugin" }
9
+ ```
10
+
11
+ **Note:** Only works when marketplace added via Git (GitHub/GitLab/git URL). URL-based marketplaces only download `marketplace.json`, not plugin files. Use GitHub/git sources for URL-based distribution.
12
+
13
+ ## GitHub Repositories
14
+
15
+ ```json
16
+ {
17
+ "name": "github-plugin",
18
+ "source": { "source": "github", "repo": "owner/plugin-repo" }
19
+ }
20
+ ```
21
+
22
+ Pin to specific version:
23
+ ```json
24
+ {
25
+ "name": "github-plugin",
26
+ "source": {
27
+ "source": "github",
28
+ "repo": "owner/plugin-repo",
29
+ "ref": "v2.0.0",
30
+ "sha": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"
31
+ }
32
+ }
33
+ ```
34
+
35
+ | Field | Type | Description |
36
+ |-------|------|-------------|
37
+ | `repo` | string | Required. `owner/repo` format |
38
+ | `ref` | string | Optional. Branch or tag (defaults to repo default) |
39
+ | `sha` | string | Optional. Full 40-char commit SHA for exact pinning |
40
+
41
+ ## Git Repositories (GitLab, Bitbucket, etc.)
42
+
43
+ ```json
44
+ {
45
+ "name": "git-plugin",
46
+ "source": { "source": "url", "url": "https://gitlab.com/team/plugin.git" }
47
+ }
48
+ ```
49
+
50
+ Pin to specific version:
51
+ ```json
52
+ {
53
+ "name": "git-plugin",
54
+ "source": {
55
+ "source": "url",
56
+ "url": "https://gitlab.com/team/plugin.git",
57
+ "ref": "main",
58
+ "sha": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"
59
+ }
60
+ }
61
+ ```
62
+
63
+ | Field | Type | Description |
64
+ |-------|------|-------------|
65
+ | `url` | string | Required. Full git URL (must end `.git`) |
66
+ | `ref` | string | Optional. Branch or tag |
67
+ | `sha` | string | Optional. Full 40-char commit SHA |
68
+
69
+ ## Advanced Example (All Features)
70
+
71
+ ```json
72
+ {
73
+ "name": "enterprise-tools",
74
+ "source": { "source": "github", "repo": "company/enterprise-plugin" },
75
+ "description": "Enterprise workflow automation tools",
76
+ "version": "2.1.0",
77
+ "author": { "name": "Enterprise Team", "email": "enterprise@example.com" },
78
+ "homepage": "https://docs.example.com/plugins/enterprise-tools",
79
+ "license": "MIT",
80
+ "keywords": ["enterprise", "workflow", "automation"],
81
+ "category": "productivity",
82
+ "commands": ["./commands/core/", "./commands/enterprise/"],
83
+ "agents": ["./agents/security-reviewer.md", "./agents/compliance-checker.md"],
84
+ "hooks": {
85
+ "PostToolUse": [{
86
+ "matcher": "Write|Edit",
87
+ "hooks": [{ "type": "command", "command": "${CLAUDE_PLUGIN_ROOT}/scripts/validate.sh" }]
88
+ }]
89
+ },
90
+ "mcpServers": {
91
+ "enterprise-db": {
92
+ "command": "${CLAUDE_PLUGIN_ROOT}/servers/db-server",
93
+ "args": ["--config", "${CLAUDE_PLUGIN_ROOT}/config.json"]
94
+ }
95
+ },
96
+ "strict": false
97
+ }
98
+ ```
99
+
100
+ **Key notes:**
101
+ - `${CLAUDE_PLUGIN_ROOT}` — references files within plugin's installation cache directory
102
+ - `strict: false` — marketplace entry defines plugin entirely, no `plugin.json` needed
103
+ - `commands`/`agents` — multiple directories or individual files, paths relative to plugin root
@@ -0,0 +1,76 @@
1
+ # Plugin Marketplace Troubleshooting
2
+
3
+ ## Marketplace Not Loading
4
+
5
+ **Symptoms:** Can't add marketplace or see plugins.
6
+
7
+ **Checklist:**
8
+ - Marketplace URL accessible?
9
+ - `.claude-plugin/marketplace.json` exists at specified path?
10
+ - JSON syntax valid? Run `claude plugin validate .` or `/plugin validate .`
11
+ - Private repo — do you have access permissions?
12
+
13
+ ## Validation Errors
14
+
15
+ Run `claude plugin validate .` from marketplace directory. Common errors:
16
+
17
+ | Error | Cause | Fix |
18
+ |-------|-------|-----|
19
+ | `File not found: .claude-plugin/marketplace.json` | Missing manifest | Create with required fields |
20
+ | `Invalid JSON syntax: Unexpected token...` | JSON syntax error | Fix commas, quotes, brackets |
21
+ | `Duplicate plugin name "x"` | Two plugins share name | Give unique `name` values |
22
+ | `plugins[0].source: Path traversal not allowed` | Source contains `..` | Use paths relative to root, no `..` |
23
+
24
+ **Warnings (non-blocking):**
25
+ - `Marketplace has no plugins defined` — add plugins to array
26
+ - `No marketplace description provided` — add `metadata.description`
27
+ - `Plugin "x" uses npm source` — npm not fully implemented, use github/local
28
+
29
+ ## Plugin Installation Failures
30
+
31
+ **Symptoms:** Marketplace appears but install fails.
32
+
33
+ **Checklist:**
34
+ - Plugin source URLs accessible?
35
+ - Plugin directories contain required files?
36
+ - GitHub sources — repos public or you have access?
37
+ - Test manually by cloning/downloading source
38
+
39
+ ## Private Repository Auth Fails
40
+
41
+ ### Manual Install/Update
42
+ - Authenticated with git provider? `gh auth status` for GitHub
43
+ - Credential helper configured? `git config --global credential.helper`
44
+ - Can you clone repo manually?
45
+
46
+ ### Background Auto-Updates
47
+ - Token set in environment? `echo $GITHUB_TOKEN`
48
+ - Token has required permissions?
49
+ - GitHub: `repo` scope for private repos
50
+ - GitLab: `read_repository` scope minimum
51
+ - Token not expired?
52
+
53
+ ## Relative Paths Fail in URL-Based Marketplaces
54
+
55
+ **Symptoms:** Added marketplace via URL, plugins with `"./plugins/my-plugin"` source fail.
56
+
57
+ **Cause:** URL-based marketplaces only download `marketplace.json`, not plugin files. Relative paths reference files on remote server that weren't downloaded.
58
+
59
+ **Fixes:**
60
+ 1. **Use external sources:**
61
+ ```json
62
+ { "name": "my-plugin", "source": { "source": "github", "repo": "owner/repo" } }
63
+ ```
64
+ 2. **Use Git-based marketplace:** Host in Git repo, add via git URL. Clones entire repo, relative paths work.
65
+
66
+ ## Files Not Found After Installation
67
+
68
+ **Symptoms:** Plugin installs but file references fail, especially outside plugin directory.
69
+
70
+ **Cause:** Plugins copied to cache directory, not used in-place. Paths like `../shared-utils` won't work.
71
+
72
+ **Fixes:**
73
+ - Use symlinks (followed during copying)
74
+ - Restructure so shared directory is inside plugin source path
75
+ - Use `${CLAUDE_PLUGIN_ROOT}` in hooks/MCP configs for cache-aware paths
76
+ - See [Plugin caching docs](https://code.claude.com/docs/en/plugins-reference.md#plugin-caching-and-file-resolution)
@@ -0,0 +1,106 @@
1
+ # Script Quality Criteria
2
+
3
+ Scripts provide deterministic reliability and token efficiency.
4
+
5
+ ## When to Include Scripts
6
+
7
+ - Same code rewritten repeatedly
8
+ - Deterministic operations needed
9
+ - Complex transformations
10
+ - External tool integrations
11
+
12
+ ## Cross-Platform Requirements
13
+
14
+ **Prefer:** Node.js or Python
15
+ **Avoid:** Bash scripts (not well-supported on Windows)
16
+
17
+ If bash required, provide Node.js/Python alternative.
18
+
19
+ ## Testing Requirements
20
+
21
+ **Mandatory:** All scripts must have tests
22
+
23
+ ```bash
24
+ # Run tests before packaging
25
+ python -m pytest scripts/tests/
26
+ # or
27
+ npm test
28
+ ```
29
+
30
+ Tests must pass. No skipping failed tests.
31
+
32
+ ## Environment Variables
33
+
34
+ Respect hierarchy (first found wins):
35
+
36
+ 1. `process.env` (runtime)
37
+ 2. `$HOME/.claude/skills/<skill-name>/.env` (skill-specific)
38
+ 3. `$HOME/.claude/skills/.env` (shared skills)
39
+ 4. `$HOME/.claude/.env` (global)
40
+ 5. `./.claude/skills/${SKILL}/.env` (cwd)
41
+ 6. `./.claude/skills/.env` (cwd)
42
+ 7. `./.claude/.env` (cwd)
43
+
44
+ **Implementation pattern (Python):**
45
+
46
+ ```python
47
+ from dotenv import load_dotenv
48
+ import os
49
+
50
+ # Load in reverse order (last loaded wins if not set)
51
+ load_dotenv('$HOME/.claude/.env')
52
+ load_dotenv('$HOME/.claude/skills/.env')
53
+ load_dotenv('$HOME/.claude/skills/my-skill/.env')
54
+ load_dotenv('./.claude/skills/my-skill/.env')
55
+ load_dotenv('./.claude/skills/.env')
56
+ load_dotenv('./.claude/.env')
57
+ # process.env already takes precedence
58
+ ```
59
+
60
+ ## Documentation Requirements
61
+
62
+ ### .env.example
63
+ Show required variables without values:
64
+
65
+ ```
66
+ API_KEY=
67
+ DATABASE_URL=
68
+ DEBUG=false
69
+ ```
70
+
71
+ ### requirements.txt (Python)
72
+ Pin major versions:
73
+
74
+ ```
75
+ requests>=2.28.0
76
+ python-dotenv>=1.0.0
77
+ ```
78
+
79
+ ### package.json (Node.js)
80
+ Include scripts:
81
+
82
+ ```json
83
+ {
84
+ "scripts": {
85
+ "test": "jest"
86
+ }
87
+ }
88
+ ```
89
+
90
+ ## Manual Testing
91
+
92
+ Before packaging, test with real use cases:
93
+
94
+ ```bash
95
+ # Example: PDF rotation script
96
+ python scripts/rotate_pdf.py input.pdf 90 output.pdf
97
+ ```
98
+
99
+ Verify output matches expectations.
100
+
101
+ ## Error Handling
102
+
103
+ - Clear error messages
104
+ - Graceful failures
105
+ - No silent errors
106
+ - Exit codes: 0 success, non-zero failure
@@ -0,0 +1,77 @@
1
+ # Skill Anatomy & Requirements
2
+
3
+ ## Directory Structure
4
+
5
+ ```
6
+ .claude/skills/
7
+ └── skill-name/
8
+ ├── SKILL.md (required, <300 lines)
9
+ │ ├── YAML frontmatter (name, description required)
10
+ │ └── Markdown instructions
11
+ └── Bundled Resources (optional)
12
+ ├── scripts/ Executable code (Python/Node.js)
13
+ ├── references/ Docs loaded into context as needed
14
+ ├── agents/ Eval agent templates (grader, comparator, analyzer)
15
+ └── assets/ Files used in output (templates, etc.)
16
+ ```
17
+
18
+ ## Core Requirements
19
+
20
+ - **SKILL.md:** <300 lines. Concise quick-reference guide.
21
+ - **References:** <300 lines each. Split by logical boundaries.
22
+ - **Scripts:** No length limit. Must have tests. Must work cross-platform.
23
+ - **Description:** <200 chars. Specific triggers, not generic.
24
+ - **Consolidation:** Related topics combined (e.g., cloudflare+docker → devops)
25
+ - **No duplication:** Info lives in ONE place (SKILL.md OR references, not both)
26
+
27
+ ## SKILL.md Frontmatter
28
+
29
+ ```yaml
30
+ ---
31
+ name: kebab-case-name # optional namespace: ck:kebab-case-name
32
+ description: Under 200 chars, specific triggers and use cases
33
+ license: Optional
34
+ version: Optional
35
+ ---
36
+ ```
37
+
38
+ **Metadata quality** determines auto-activation. See `references/metadata-quality-criteria.md`.
39
+
40
+ ## Scripts (`scripts/`)
41
+
42
+ - Deterministic code for repeated tasks
43
+ - **Prefer:** Python or Node.js (Windows-compatible)
44
+ - **Avoid:** Bash scripts
45
+ - **Required:** Tests that pass, `.env.example`, `requirements.txt`/`package.json`
46
+ - **Env hierarchy:** `process.env` > skill `.env` > shared `.env` > global `.env`
47
+ - Token-efficient: executed without loading into context
48
+
49
+ See `references/script-quality-criteria.md` for full criteria.
50
+
51
+ ## References (`references/`)
52
+
53
+ - Documentation loaded as-needed into context
54
+ - Use cases: schemas, APIs, workflows, cheatsheets, domain knowledge
55
+ - **Best practice:** Split >300 lines into multiple files
56
+ - Include grep patterns in SKILL.md for discoverability
57
+ - Practical instructions, not educational documentation
58
+
59
+ ## Assets (`assets/`)
60
+
61
+ - Files used in output, NOT loaded into context
62
+ - Use cases: templates, images, icons, boilerplate, fonts
63
+ - Separates output resources from documentation
64
+
65
+ ## Progressive Disclosure
66
+
67
+ Three-level loading for context efficiency:
68
+ 1. **Metadata** (~200 chars) — always in context
69
+ 2. **SKILL.md body** (<300 lines) — when skill triggers
70
+ 3. **Bundled resources** — as needed (scripts: unlimited, execute without loading)
71
+
72
+ ## Writing Style
73
+
74
+ - **Imperative form:** "To accomplish X, do Y"
75
+ - **Third-person metadata:** "This skill should be used when..."
76
+ - **Concise:** Sacrifice grammar for brevity in references
77
+ - **Practical:** Teach *how* to do tasks, not *what* tools are
@@ -0,0 +1,151 @@
1
+ # Skill Creation Workflow
2
+
3
+ 9-step process. Follow in order; skip only with clear justification.
4
+
5
+ ## Step 1: Capture Intent
6
+
7
+ Gather real usage patterns via `AskUserQuestion` tool:
8
+
9
+ - "What tasks should this skill handle?"
10
+ - "Give examples of how it would be used?"
11
+ - "What phrases should trigger this skill?"
12
+ - "What's the expected output format?"
13
+ - "Should we create test cases?" (recommended for objective outputs)
14
+
15
+ Conclude when functionality scope is clear.
16
+
17
+ ## Step 2: Research
18
+
19
+ Activate `/ck:docs-seeker` and `/ck:research` skills. Research:
20
+
21
+ - Best practices & industry standards
22
+ - Existing CLI tools (`npx`, `bunx`, `pipx`) for reuse
23
+ - Workflows & case studies
24
+ - Edge cases & pitfalls
25
+
26
+ Use parallel `WebFetch` + `Explore` subagents for multiple URLs.
27
+ Write reports for next step.
28
+
29
+ ## Step 3: Plan Reusable Contents
30
+
31
+ Analyze each example:
32
+
33
+ 1. How to execute from scratch?
34
+ 2. Prefer existing CLI tools over custom code
35
+ 3. What scripts/references/assets enable repeated execution?
36
+ 4. Check skills catalog — avoid duplication, reuse existing
37
+
38
+ **Patterns:**
39
+
40
+ - Repeated code → `scripts/` (Python/Node.js, with tests)
41
+ - Repeated discovery → `references/` (schemas, docs, APIs)
42
+ - Repeated boilerplate → `assets/` (templates, images)
43
+
44
+ Scripts MUST: respect `.env` hierarchy, have tests, pass all tests.
45
+
46
+ ## Step 4: Initialize
47
+
48
+ For new skills, run init script:
49
+
50
+ ```bash
51
+ scripts/init_skill.py <skill-name> --path <output-directory>
52
+ ```
53
+
54
+ Creates: SKILL.md template, `scripts/`, `references/`, `assets/` with examples.
55
+ Skip if skill already exists (go to Step 5).
56
+
57
+ ## Step 5: Write the Skill
58
+
59
+ ### 5a: Implement Resources
60
+
61
+ Start with `scripts/`, `references/`, `assets/` identified in Step 3.
62
+ Delete unused example files from initialization.
63
+ May require user input (brand assets, configs, etc.).
64
+
65
+ ### 5b: Write SKILL.md
66
+
67
+ **Writing style:** Imperative/infinitive form. "To accomplish X, do Y."
68
+ **Size:** Under 300 lines. Move details to `references/`.
69
+
70
+ Answer these in SKILL.md:
71
+
72
+ 1. Purpose (2-3 sentences)
73
+ 2. When to use (trigger conditions)
74
+ 3. How to use (reference all bundled resources)
75
+
76
+ ### 5c: Benchmark Optimization
77
+
78
+ **MUST** include for high Skillmark scores:
79
+
80
+ - **Scope declaration** — "This skill handles X. Does NOT handle Y."
81
+ - **Security policy** — Refusal instructions + leakage prevention
82
+ - **Structured workflows** — Numbered steps covering all expected concepts
83
+ - **Explicit terminology** — Standard terms matching concept-accuracy scorer
84
+ - **Reference linking** — `references/` files for detailed knowledge
85
+
86
+ See `references/benchmark-optimization-guide.md` for detailed patterns.
87
+
88
+ ### 5d: Write Pushy Description
89
+
90
+ Description ≤1024 chars. Include specific trigger contexts:
91
+
92
+ ```yaml
93
+ description: Process CSV files and tabular data. Use this skill whenever
94
+ the user uploads data files, mentions datasets, wants to extract info
95
+ from tables, or needs analysis on numbers and records.
96
+ ```
97
+
98
+ See `references/metadata-quality-criteria.md` for examples.
99
+
100
+ ## Step 6: Test & Evaluate
101
+
102
+ ### 6a: Create Test Cases
103
+
104
+ Write `evals/evals.json` with 2-3 realistic test prompts + assertions.
105
+ See `references/eval-schemas.md` for JSON format.
106
+
107
+ ### 6b: Run Parallel Evals
108
+
109
+ Spawn with-skill AND baseline runs simultaneously (CRITICAL for timing).
110
+ Draft assertions while runs execute.
111
+
112
+ ### 6c: Grade & Aggregate
113
+
114
+ - Grade outputs with grader agent (`agents/grader.md`)
115
+ - Aggregate results: `scripts/aggregate_benchmark.py`
116
+ - Launch viewer: `eval-viewer/generate_review.py`
117
+
118
+ ### 6d: Human Review
119
+
120
+ Present viewer to user:
121
+ - **Outputs tab** — qualitative review, feedback textbox
122
+ - **Benchmark tab** — quantitative metrics
123
+
124
+ See `references/eval-infrastructure-guide.md` for details.
125
+
126
+ ## Step 7: Optimize Description
127
+
128
+ Combat undertriggering with automated optimization:
129
+
130
+ - **Single-pass:** `scripts/improve_description.py` — one iteration
131
+ - **Iterative loop:** `scripts/run_loop.py` — train/test split, convergence detection
132
+
133
+ ## Step 8: Package & Validate
134
+
135
+ ```bash
136
+ scripts/package_skill.py <path/to/skill-folder>
137
+ ```
138
+
139
+ Validates: frontmatter, naming, description, structure.
140
+ Fix all errors, re-run until clean.
141
+
142
+ ## Step 9: Iterate
143
+
144
+ 1. Read `feedback.json` from viewer
145
+ 2. Generalize from feedback — don't overfit to test examples
146
+ 3. Keep prompts lean — remove ineffective instructions
147
+ 4. Update SKILL.md or resources
148
+ 5. Re-test (return to Step 6)
149
+ 6. Scale test set to 5-10 cases for production skills
150
+
151
+ **Benchmark iteration:** Run `skillmark` CLI, review per-concept accuracy, fix gaps.