@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.
- package/INSTALLATION.md +22 -0
- package/LICENSE +21 -0
- package/README.md +38 -0
- package/bin/musketeer.js +72 -0
- package/manifest.json +238 -0
- package/package.json +46 -0
- package/src/copier.js +119 -0
- package/src/lockfile.js +61 -0
- package/src/manifest-loader.js +46 -0
- package/src/muster.js +48 -0
- package/src/provisioner/detect.js +93 -0
- package/src/provisioner/guide.js +32 -0
- package/src/provisioner/index.js +113 -0
- package/src/provisioner/mcp.js +26 -0
- package/src/provisioner/os-package-manager.js +71 -0
- package/src/provisioner/venv.js +44 -0
- package/src/reconcile.js +94 -0
- package/src/resolver.js +130 -0
- package/src/schema.js +152 -0
- package/src/settings-merger.js +0 -0
- package/template/.claude/agents/code-reviewer.md +166 -0
- package/template/.claude/agents/hallmark-auditor.md +78 -0
- package/template/.claude/agents/hallmark-explorer.md +81 -0
- package/template/.claude/agents/researcher.md +33 -0
- package/template/.claude/hooks/block-migration-edits.cjs +31 -0
- package/template/.claude/hooks/format-json-hook.js +91 -0
- package/template/.claude/hooks/inject-design-docs.cjs +86 -0
- package/template/.claude/hooks/lib/colors.cjs +122 -0
- package/template/.claude/hooks/lib/git-info-cache.cjs +191 -0
- package/template/.claude/hooks/lib/transcript-parser.cjs +277 -0
- package/template/.claude/hooks/usage-context-awareness.cjs +166 -0
- package/template/.claude/hooks/validate-cml-hook.js +145 -0
- package/template/.claude/skills/adr-writer/SKILL.md +78 -0
- package/template/.claude/skills/adr-writer/references/adr-example.md +38 -0
- package/template/.claude/skills/adr-writer/references/adr-template.md +46 -0
- package/template/.claude/skills/architecture-characteristic-writer/SKILL.md +117 -0
- package/template/.claude/skills/architecture-characteristic-writer/assets/worksheet-template.md +40 -0
- package/template/.claude/skills/architecture-characteristic-writer/references/characteristics-catalog.md +106 -0
- package/template/.claude/skills/code-review/SKILL.md +54 -0
- package/template/.claude/skills/code-review/references/adversarial-review.md +223 -0
- package/template/.claude/skills/code-review/references/checklists/api.md +52 -0
- package/template/.claude/skills/code-review/references/checklists/base.md +100 -0
- package/template/.claude/skills/code-review/references/checklists/web-app.md +54 -0
- package/template/.claude/skills/context-map/SKILL.md +80 -0
- package/template/.claude/skills/context-map/example.cml +106 -0
- package/template/.claude/skills/context-map/reference/Aggregate/Aggregate.md +1 -0
- package/template/.claude/skills/context-map/reference/Bounded Context/Bounded Context.md +41 -0
- package/template/.claude/skills/context-map/reference/Bounded Context/businessModel.md +6 -0
- package/template/.claude/skills/context-map/reference/Bounded Context/domainVisionStatement.md +3 -0
- package/template/.claude/skills/context-map/reference/Bounded Context/evolution.md +6 -0
- package/template/.claude/skills/context-map/reference/Bounded Context/implementationTechnology.md +1 -0
- package/template/.claude/skills/context-map/reference/Bounded Context/implements.md +1 -0
- package/template/.claude/skills/context-map/reference/Bounded Context/knowledgeLevel.md +5 -0
- package/template/.claude/skills/context-map/reference/Bounded Context/realizes.md +9 -0
- package/template/.claude/skills/context-map/reference/Bounded Context/refines.md +10 -0
- package/template/.claude/skills/context-map/reference/Bounded Context/responsibilities.md +26 -0
- package/template/.claude/skills/context-map/reference/Bounded Context/type.md +23 -0
- package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Anticorruption Layer.md +5 -0
- package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Bounded Context Relationship.md +13 -0
- package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Conformist.md +5 -0
- package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Customer-Supplier (C-S).md +23 -0
- package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Open Host Service.md +5 -0
- package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Partnership (P).md +14 -0
- package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Published Language.md +5 -0
- package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Shared Kernel (SK).md +13 -0
- package/template/.claude/skills/context-map/reference/Context Map.md +63 -0
- package/template/.claude/skills/context-map/reference/Domain/Domain.md +30 -0
- package/template/.claude/skills/context-map/reference/Domain/supports.md +34 -0
- package/template/.claude/skills/context-map/reference/Domain/type.md +3 -0
- package/template/.claude/skills/context-map/reference/Semantic Rules.md +33 -0
- package/template/.claude/skills/hallmark/SKILL.md +552 -0
- package/template/.claude/skills/hallmark/references/anti-patterns.md +412 -0
- package/template/.claude/skills/hallmark/references/assets.md +406 -0
- package/template/.claude/skills/hallmark/references/color.md +95 -0
- package/template/.claude/skills/hallmark/references/component-cookbook.md +256 -0
- package/template/.claude/skills/hallmark/references/components/c1-outlined-chip.md +12 -0
- package/template/.claude/skills/hallmark/references/components/c2-inline-form-as-cta.md +16 -0
- package/template/.claude/skills/hallmark/references/components/c3-typographic-link.md +8 -0
- package/template/.claude/skills/hallmark/references/components/c4-sticky-bottom-bar.md +16 -0
- package/template/.claude/skills/hallmark/references/components/f1-bento-grid.md +20 -0
- package/template/.claude/skills/hallmark/references/components/f2-sticky-scroll-stack.md +20 -0
- package/template/.claude/skills/hallmark/references/components/f3-tabular-spec-sheet.md +11 -0
- package/template/.claude/skills/hallmark/references/components/f4-step-sequence.md +11 -0
- package/template/.claude/skills/hallmark/references/components/f5-annotated-screenshot.md +11 -0
- package/template/.claude/skills/hallmark/references/components/f6-product-card-grid.md +41 -0
- package/template/.claude/skills/hallmark/references/components/ft1-mast-headed.md +13 -0
- package/template/.claude/skills/hallmark/references/components/ft2-inline-rule-single-line.md +10 -0
- package/template/.claude/skills/hallmark/references/components/ft3-index-style-category-list.md +12 -0
- package/template/.claude/skills/hallmark/references/components/ft4-dense-typographic.md +10 -0
- package/template/.claude/skills/hallmark/references/components/ft5-statement.md +21 -0
- package/template/.claude/skills/hallmark/references/components/ft6-letter-close.md +19 -0
- package/template/.claude/skills/hallmark/references/components/ft7-newsletter-first.md +27 -0
- package/template/.claude/skills/hallmark/references/components/ft8-marquee-scroll.md +25 -0
- package/template/.claude/skills/hallmark/references/components/h1-marquee.md +15 -0
- package/template/.claude/skills/hallmark/references/components/h2-split-diptych.md +15 -0
- package/template/.claude/skills/hallmark/references/components/h3-quote-led.md +11 -0
- package/template/.claude/skills/hallmark/references/components/h4-stat-led.md +14 -0
- package/template/.claude/skills/hallmark/references/components/h5-letter-hero.md +11 -0
- package/template/.claude/skills/hallmark/references/components/h6-photographic-fold.md +16 -0
- package/template/.claude/skills/hallmark/references/components/h7-demo-video-clipped-by-viewport-edge.md +27 -0
- package/template/.claude/skills/hallmark/references/components/h8-mockup-split-browser-framed.md +23 -0
- package/template/.claude/skills/hallmark/references/components/h9-custom-illustration-centerpiece.md +27 -0
- package/template/.claude/skills/hallmark/references/components/n1-wordmark-2-links.md +12 -0
- package/template/.claude/skills/hallmark/references/components/n10-floating-on-scroll-morph.md +19 -0
- package/template/.claude/skills/hallmark/references/components/n2-floating-chip.md +14 -0
- package/template/.claude/skills/hallmark/references/components/n3-side-rail.md +14 -0
- package/template/.claude/skills/hallmark/references/components/n4-hidden-behind-k.md +9 -0
- package/template/.claude/skills/hallmark/references/components/n5-floating-pill.md +28 -0
- package/template/.claude/skills/hallmark/references/components/n6-newspaper-masthead.md +24 -0
- package/template/.claude/skills/hallmark/references/components/n7-brutal-slab.md +22 -0
- package/template/.claude/skills/hallmark/references/components/n8-terminal-command.md +21 -0
- package/template/.claude/skills/hallmark/references/components/n9-edge-aligned-minimal.md +17 -0
- package/template/.claude/skills/hallmark/references/components/s1-left-margin-numbered.md +15 -0
- package/template/.claude/skills/hallmark/references/components/s2-hanging.md +13 -0
- package/template/.claude/skills/hallmark/references/components/s3-sticky-pinned.md +19 -0
- package/template/.claude/skills/hallmark/references/components/s4-inline-no-break.md +11 -0
- package/template/.claude/skills/hallmark/references/components/s5-bottom-anchored.md +13 -0
- package/template/.claude/skills/hallmark/references/components/t1-pull-quote-with-marginalia.md +12 -0
- package/template/.claude/skills/hallmark/references/components/t2-logo-wall-hairline.md +19 -0
- package/template/.claude/skills/hallmark/references/components/t3-single-huge-quote.md +11 -0
- package/template/.claude/skills/hallmark/references/components/t4-numbered-stat-strip.md +14 -0
- package/template/.claude/skills/hallmark/references/contract.md +24 -0
- package/template/.claude/skills/hallmark/references/copy.md +182 -0
- package/template/.claude/skills/hallmark/references/custom-craft.md +626 -0
- package/template/.claude/skills/hallmark/references/custom-theme.md +329 -0
- package/template/.claude/skills/hallmark/references/design-md.md +116 -0
- package/template/.claude/skills/hallmark/references/export-formats.md +328 -0
- package/template/.claude/skills/hallmark/references/floating-nav.md +89 -0
- package/template/.claude/skills/hallmark/references/genres/atmospheric.md +65 -0
- package/template/.claude/skills/hallmark/references/genres/editorial.md +70 -0
- package/template/.claude/skills/hallmark/references/genres/modern-minimal.md +67 -0
- package/template/.claude/skills/hallmark/references/genres/playful.md +65 -0
- package/template/.claude/skills/hallmark/references/hero-enrichment.md +474 -0
- package/template/.claude/skills/hallmark/references/imagery-kit.md +170 -0
- package/template/.claude/skills/hallmark/references/interaction-and-states.md +207 -0
- package/template/.claude/skills/hallmark/references/layout-and-space.md +111 -0
- package/template/.claude/skills/hallmark/references/macrostructures/01-bento-grid.md +35 -0
- package/template/.claude/skills/hallmark/references/macrostructures/02-long-document.md +34 -0
- package/template/.claude/skills/hallmark/references/macrostructures/03-marquee-hero.md +31 -0
- package/template/.claude/skills/hallmark/references/macrostructures/04-stat-led.md +32 -0
- package/template/.claude/skills/hallmark/references/macrostructures/05-workbench.md +32 -0
- package/template/.claude/skills/hallmark/references/macrostructures/06-conversational-faq.md +33 -0
- package/template/.claude/skills/hallmark/references/macrostructures/07-manifesto.md +32 -0
- package/template/.claude/skills/hallmark/references/macrostructures/08-photographic.md +34 -0
- package/template/.claude/skills/hallmark/references/macrostructures/09-quote-led.md +32 -0
- package/template/.claude/skills/hallmark/references/macrostructures/10-specimen.md +32 -0
- package/template/.claude/skills/hallmark/references/macrostructures/11-catalogue.md +23 -0
- package/template/.claude/skills/hallmark/references/macrostructures/12-letter.md +23 -0
- package/template/.claude/skills/hallmark/references/macrostructures/13-index-first.md +23 -0
- package/template/.claude/skills/hallmark/references/macrostructures/14-narrative-workflow.md +23 -0
- package/template/.claude/skills/hallmark/references/macrostructures/15-split-studio.md +23 -0
- package/template/.claude/skills/hallmark/references/macrostructures/16-feature-stack.md +23 -0
- package/template/.claude/skills/hallmark/references/macrostructures/17-type-specimen.md +23 -0
- package/template/.claude/skills/hallmark/references/macrostructures/18-portfolio-grid.md +23 -0
- package/template/.claude/skills/hallmark/references/macrostructures/19-map-diagram.md +23 -0
- package/template/.claude/skills/hallmark/references/macrostructures/20-ecosystem-index.md +23 -0
- package/template/.claude/skills/hallmark/references/macrostructures/21-component-playground.md +23 -0
- package/template/.claude/skills/hallmark/references/macrostructures.md +89 -0
- package/template/.claude/skills/hallmark/references/microinteractions.md +260 -0
- package/template/.claude/skills/hallmark/references/motion.md +109 -0
- package/template/.claude/skills/hallmark/references/preview-examples.md +49 -0
- package/template/.claude/skills/hallmark/references/responsive.md +138 -0
- package/template/.claude/skills/hallmark/references/slop-test.md +205 -0
- package/template/.claude/skills/hallmark/references/structure.md +164 -0
- package/template/.claude/skills/hallmark/references/study.md +511 -0
- package/template/.claude/skills/hallmark/references/typography.md +243 -0
- package/template/.claude/skills/hallmark/references/verbs/audit.md +25 -0
- package/template/.claude/skills/hallmark/references/verbs/redesign.md +269 -0
- package/template/.claude/skills/hallmark-explore/SKILL.md +137 -0
- package/template/.claude/skills/hallmark-explore/references/direction-matrix.md +124 -0
- package/template/.claude/skills/hallmark-explore/references/explorer-call.md +68 -0
- package/template/.claude/skills/hallmark-explore/scripts/build_compare.py +174 -0
- package/template/.claude/skills/hallmark-explore/scripts/scaffold_exploration.py +122 -0
- package/template/.claude/skills/hallmark-loop/SKILL.md +105 -0
- package/template/.claude/skills/hallmark-loop/references/auditor-call.md +60 -0
- package/template/.claude/skills/hallmark-loop/references/capture.md +78 -0
- package/template/.claude/skills/hallmark-loop/references/loop-control.md +79 -0
- package/template/.claude/skills/handoff/SKILL.md +15 -0
- package/template/.claude/skills/install.ps1 +42 -0
- package/template/.claude/skills/install.sh +54 -0
- package/template/.claude/skills/knowledge-crunching/SKILL.md +130 -0
- package/template/.claude/skills/knowledge-crunching/assets/context.template.md +59 -0
- package/template/.claude/skills/knowledge-crunching/references/crunching-dialogue.md +113 -0
- package/template/.claude/skills/research/SKILL.md +69 -0
- package/template/.claude/skills/skill-creator/LICENSE.txt +202 -0
- package/template/.claude/skills/skill-creator/SKILL.md +149 -0
- package/template/.claude/skills/skill-creator/agents/analyzer.md +274 -0
- package/template/.claude/skills/skill-creator/agents/comparator.md +202 -0
- package/template/.claude/skills/skill-creator/agents/grader.md +223 -0
- package/template/.claude/skills/skill-creator/assets/eval_review.html +146 -0
- package/template/.claude/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/template/.claude/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/template/.claude/skills/skill-creator/references/benchmark-optimization-guide.md +86 -0
- package/template/.claude/skills/skill-creator/references/distribution-guide.md +79 -0
- package/template/.claude/skills/skill-creator/references/eval-infrastructure-guide.md +129 -0
- package/template/.claude/skills/skill-creator/references/eval-schemas.md +121 -0
- package/template/.claude/skills/skill-creator/references/mcp-skills-integration.md +71 -0
- package/template/.claude/skills/skill-creator/references/metadata-quality-criteria.md +94 -0
- package/template/.claude/skills/skill-creator/references/plugin-marketplace-hosting.md +104 -0
- package/template/.claude/skills/skill-creator/references/plugin-marketplace-overview.md +89 -0
- package/template/.claude/skills/skill-creator/references/plugin-marketplace-schema.md +93 -0
- package/template/.claude/skills/skill-creator/references/plugin-marketplace-sources.md +103 -0
- package/template/.claude/skills/skill-creator/references/plugin-marketplace-troubleshooting.md +76 -0
- package/template/.claude/skills/skill-creator/references/script-quality-criteria.md +106 -0
- package/template/.claude/skills/skill-creator/references/skill-anatomy-and-requirements.md +77 -0
- package/template/.claude/skills/skill-creator/references/skill-creation-workflow.md +151 -0
- package/template/.claude/skills/skill-creator/references/skill-design-patterns.md +75 -0
- package/template/.claude/skills/skill-creator/references/skillmark-benchmark-criteria.md +102 -0
- package/template/.claude/skills/skill-creator/references/structure-organization-criteria.md +114 -0
- package/template/.claude/skills/skill-creator/references/testing-and-iteration.md +78 -0
- package/template/.claude/skills/skill-creator/references/token-efficiency-criteria.md +74 -0
- package/template/.claude/skills/skill-creator/references/troubleshooting-guide.md +81 -0
- package/template/.claude/skills/skill-creator/references/validation-checklist.md +83 -0
- package/template/.claude/skills/skill-creator/references/writing-effective-instructions.md +88 -0
- package/template/.claude/skills/skill-creator/references/yaml-frontmatter-reference.md +92 -0
- package/template/.claude/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/template/.claude/skills/skill-creator/scripts/encoding_utils.py +36 -0
- package/template/.claude/skills/skill-creator/scripts/generate_report.py +326 -0
- package/template/.claude/skills/skill-creator/scripts/improve_description.py +248 -0
- package/template/.claude/skills/skill-creator/scripts/init_skill.py +360 -0
- package/template/.claude/skills/skill-creator/scripts/package_skill.py +143 -0
- package/template/.claude/skills/skill-creator/scripts/quick_validate.py +110 -0
- package/template/.claude/skills/skill-creator/scripts/run_eval.py +310 -0
- package/template/.claude/skills/skill-creator/scripts/run_loop.py +332 -0
- package/template/.claude/skills/skill-creator/scripts/utils.py +47 -0
- package/template/.claude/skills/tdd/SKILL.md +142 -0
- package/template/.claude/skills/tdd/assets/Directory.Build.props +26 -0
- package/template/.claude/skills/tdd/deep-modules.md +15 -0
- package/template/.claude/skills/tdd/dotnet-build-config.md +21 -0
- package/template/.claude/skills/tdd/interface-design.md +31 -0
- package/template/.claude/skills/tdd/mocking.md +59 -0
- package/template/.claude/skills/tdd/refactoring.md +10 -0
- package/template/.claude/skills/tdd/test-per-layer.md +69 -0
- package/template/.claude/skills/tdd/tests.md +61 -0
- package/template/.claude/statusline.cjs +0 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# The Crunching Dialogue
|
|
2
|
+
|
|
3
|
+
How to run Step 4's per-concept loop well: the kinds of questions that actually move the model, and
|
|
4
|
+
the full PCB session translated from Evans' diagrams into the code/test/glossary this skill produces.
|
|
5
|
+
|
|
6
|
+
> The model fragments below are written in **language-neutral pseudocode** so the modeling moves stay
|
|
7
|
+
> the point. In a real session, write them as actual runnable types and tests in the bounded context's
|
|
8
|
+
> own language and test framework.
|
|
9
|
+
|
|
10
|
+
## Verifying-question catalog
|
|
11
|
+
|
|
12
|
+
Each loop turn asks **one** question whose answer would change the code if your guess is wrong. Pick
|
|
13
|
+
the type that fits the fragment you just proposed. A good question is falsifiable, concrete, and
|
|
14
|
+
answerable in a sentence — not "does this look right?"
|
|
15
|
+
|
|
16
|
+
| Type | What it pins down | Template | PCB example |
|
|
17
|
+
|---|---|---|---|
|
|
18
|
+
| **Cardinality** | how many relate to how many | "Does one X belong to exactly one Y, or many?" | "A `Pin` belongs to one `ComponentInstance` and one `Net`?" |
|
|
19
|
+
| **Synonym** | two words, one concept | "Are X and Y the same thing?" | "Is `ref-des` the same as `component instance`?" |
|
|
20
|
+
| **Ownership of behavior** | which object does the work | "What pushes the signal — X or Y?" | "Does the `Net` carry the signal further, or does the component push it?" |
|
|
21
|
+
| **Exclusion / relevance** | is this concept needed *now* | "Does X matter for this scenario?" | "Does `Topology` come into the probe simulation?" |
|
|
22
|
+
| **Simplification** | how little can we model | "Is a simplified Z enough instead of full X?" | "Can a list of push-throughs stand in for chip internals?" |
|
|
23
|
+
| **Computation goal** | what the output must be | "What exactly do you need from this?" | "What are we looking for — paths longer than 2–3 hops?" |
|
|
24
|
+
| **Definition of a unit** | what one increment is | "What counts as one X?" | "What counts as one hop?" |
|
|
25
|
+
| **Lifetime / sameness** | shared vs per-instance data | "Is this the same for every instance, or per instance?" | "Are the pushes the same for all instances of a component?" |
|
|
26
|
+
|
|
27
|
+
Rules of thumb:
|
|
28
|
+
- If you can't think of a question, you don't understand the fragment well enough to code it — go
|
|
29
|
+
smaller.
|
|
30
|
+
- Prefer a question that could get a "no." A question that can only be answered "yes" teaches nothing.
|
|
31
|
+
- After a "no," restate the corrected understanding before moving on, so the correction is shared.
|
|
32
|
+
|
|
33
|
+
## The PCB session, translated to code
|
|
34
|
+
|
|
35
|
+
Evans drew object-interaction and class diagrams. This skill produces the same model as code + tests +
|
|
36
|
+
glossary. Below, each beat of the original dialogue maps to what you would actually write.
|
|
37
|
+
|
|
38
|
+
### Beat 1 — the glimmer ("nets")
|
|
39
|
+
The experts kept asking for reports about *nets*. That recurring noun, not their "read a file and
|
|
40
|
+
sort it" framing, was the first model element. You name it back and ask a cardinality question rather
|
|
41
|
+
than scaffolding a type immediately.
|
|
42
|
+
|
|
43
|
+
> "A `Net` is a conductor that connects components and carries a signal to everything on it — yes?"
|
|
44
|
+
|
|
45
|
+
### Beat 2 — reconcile terminology, fix cardinality
|
|
46
|
+
"Component" vs "component instance" vs "ref-des" collide. You reconcile them (synonym question), then
|
|
47
|
+
pin the pin↔instance↔net cardinality (cardinality question). Only once confirmed do you write:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
ComponentInstance // expert's "ref-des" — reconciled to one name
|
|
51
|
+
pins -> read-only list of Pin
|
|
52
|
+
|
|
53
|
+
Pin
|
|
54
|
+
owner -> ComponentInstance // exactly one (confirmed)
|
|
55
|
+
net -> Net (optional) // exactly one (confirmed)
|
|
56
|
+
|
|
57
|
+
Net
|
|
58
|
+
pins -> read-only list of Pin // connects many pins
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Beat 3 — narrow to one scenario (probe simulation)
|
|
62
|
+
You drop everything not needed to simulate a signal. You ask the *ownership* question and learn the
|
|
63
|
+
**component pushes the signal through** — the `Net` does not do it alone.
|
|
64
|
+
|
|
65
|
+
### Beat 4 — simplify what you can't model
|
|
66
|
+
You can't model chip internals; you ask the *simplification* question and the expert offers
|
|
67
|
+
"push-throughs": a list of (fromPin → toPin) for a component **type** (not per instance — that's the
|
|
68
|
+
lifetime question). The behavior, driven by a test:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
test "signal propagates through pushes and across nets":
|
|
72
|
+
// arrange a tiny board: in-pin → component pushes to out-pin → net to next component
|
|
73
|
+
hops = simulation.probe(startPin)
|
|
74
|
+
assert hops == 2 // each Net crossing counts as one hop
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Beat 5 — pin the computation goal and the unit
|
|
78
|
+
The *computation-goal* question yields the rule: flag any signal path longer than 2–3 hops. The
|
|
79
|
+
*unit* question yields: **one hop = one Net crossing.** So the `Net` increments the hop count as the
|
|
80
|
+
signal passes:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
Net
|
|
84
|
+
carry(hopsSoFar) -> hopsSoFar + 1 // crossing this Net is one hop
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Beat 6 — distill: drop `Topology`
|
|
88
|
+
`Topology` exists in the domain but isn't used by the probe simulation, so you explicitly leave it
|
|
89
|
+
out ("I'll drop it for now; we'll bring it back for routing"). The model is a distillation, not a
|
|
90
|
+
transcription — it excludes the hundreds of facts the engineers know but this problem doesn't need.
|
|
91
|
+
|
|
92
|
+
## What "on the same page" looks like at the end of a loop
|
|
93
|
+
|
|
94
|
+
A loop turn is complete only when **all three** agree:
|
|
95
|
+
1. the **expert** has answered the verifying question,
|
|
96
|
+
2. the **code** (type/method/test) reflects that answer, and
|
|
97
|
+
3. the **`CONTEXT.md` `## Language`** records the term, its definition in their words, the rejected
|
|
98
|
+
synonyms (`_Avoid_:`), and the `TypeName` that embodies it.
|
|
99
|
+
|
|
100
|
+
If any of the three lags, close the gap before proposing the next concept.
|
|
101
|
+
|
|
102
|
+
## Drift triggers in existing code
|
|
103
|
+
|
|
104
|
+
When the module's domain layer already has a model, read it against the language and let each mismatch
|
|
105
|
+
become a verifying-question loop turn — surface it, verify with the user, then change code +
|
|
106
|
+
`CONTEXT.md` together:
|
|
107
|
+
|
|
108
|
+
- **Synonym drift** — code says `Learner`, experts now say `Student`. Reconcile, pick one, record the
|
|
109
|
+
rejected synonym under `_Avoid_:`.
|
|
110
|
+
- **Conflated concept** — one type doing two jobs the experts name separately → candidate split.
|
|
111
|
+
- **Leaked invariant** — a rule enforced in a service/controller that an aggregate should own.
|
|
112
|
+
- **Dead concept** — a type no scenario exercises anymore → deprecate (move to `CONTEXT.md`'s
|
|
113
|
+
`## Deferred` with the reason).
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: research
|
|
3
|
+
description: "Research technical solutions and analyze architectures by spawning parallel researcher agents that search the web and cross-reference findings. Use for technology evaluation, best-practices research, solution design, and scalability/security/maintainability analysis."
|
|
4
|
+
license: MIT
|
|
5
|
+
argument-hint: "[topic]"
|
|
6
|
+
metadata:
|
|
7
|
+
author: Phuc Pham
|
|
8
|
+
version: "2.1.1"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Research
|
|
12
|
+
|
|
13
|
+
## 1. Decompose
|
|
14
|
+
|
|
15
|
+
Break the topic into independent sub-questions. Note recency requirements (how current
|
|
16
|
+
the information must be) and any specific angles the user cares about (security, perf,
|
|
17
|
+
cost, migration path) — these shape both the queries and the final sections.
|
|
18
|
+
|
|
19
|
+
## 2. Gather (parallel agents)
|
|
20
|
+
|
|
21
|
+
For each independent sub-question, dispatch a `researcher` agent via the Agent tool
|
|
22
|
+
(`subagent_type: "researcher"`). Run independent agents in a single message so they execute
|
|
23
|
+
concurrently. Scale the count to the topic's breadth; don't spawn overlapping agents.
|
|
24
|
+
|
|
25
|
+
Give each agent **one** sub-question plus any recency/angle constraints from step 1. The
|
|
26
|
+
agent handles query crafting, source prioritization, and returning findings with URLs.
|
|
27
|
+
Keep synthesis (steps 3–4) in the main agent.
|
|
28
|
+
|
|
29
|
+
## 3. Cross-reference
|
|
30
|
+
|
|
31
|
+
Before synthesizing:
|
|
32
|
+
- **Verify** each significant claim across multiple independent sources.
|
|
33
|
+
- **Check dates** — flag stale information.
|
|
34
|
+
- **Surface conflicts** explicitly rather than silently picking a side.
|
|
35
|
+
- **Flag single-source claims** as unverified; discard or downgrade what fails.
|
|
36
|
+
|
|
37
|
+
## 4. Report
|
|
38
|
+
|
|
39
|
+
Save to the output path if the main agent provided one; otherwise return inline. Cite
|
|
40
|
+
sources throughout. Sacrifice grammar for concision.
|
|
41
|
+
|
|
42
|
+
Adapt the structure to the topic — don't pad with empty sections. A typical shape:
|
|
43
|
+
|
|
44
|
+
```markdown
|
|
45
|
+
# Research: [Topic]
|
|
46
|
+
|
|
47
|
+
## Summary
|
|
48
|
+
[Key findings + recommendation, 1-3 paragraphs]
|
|
49
|
+
|
|
50
|
+
## Findings
|
|
51
|
+
[Organized by sub-question. Add security / performance / cost subsections
|
|
52
|
+
only where they're relevant to this topic.]
|
|
53
|
+
|
|
54
|
+
## Conflicts & Caveats
|
|
55
|
+
[Conflicting or single-source claims, stale info]
|
|
56
|
+
|
|
57
|
+
## Recommendations
|
|
58
|
+
[Actionable: what to do, code examples, pitfalls. Include a comparison if evaluating options.]
|
|
59
|
+
|
|
60
|
+
## References
|
|
61
|
+
[Linked sources]
|
|
62
|
+
|
|
63
|
+
## Open Questions
|
|
64
|
+
[Unresolved items — always include, even if empty.]
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Standards:** accuracy (cross-referenced), currency (prefer last 12 months unless history
|
|
68
|
+
matters), always cite with links. Deliver strategic intelligence that enables a decision,
|
|
69
|
+
not a pile of links.
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ck:skill-creator
|
|
3
|
+
description: Create or update Claude skills with eval-driven iteration. Use for new skills, skill scripts, references, benchmark optimization, description optimization, eval testing, extending Claude's capabilities.
|
|
4
|
+
license: Complete terms in LICENSE.txt
|
|
5
|
+
argument-hint: "[skill-name or description]"
|
|
6
|
+
metadata:
|
|
7
|
+
author: claudekit
|
|
8
|
+
version: "4.0.0"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Skill Creator
|
|
12
|
+
|
|
13
|
+
Create effective, eval-driven Claude skills using progressive disclosure and human-in-the-loop iteration.
|
|
14
|
+
|
|
15
|
+
## Core Principles
|
|
16
|
+
|
|
17
|
+
- Skills are **practical instructions**, not documentation
|
|
18
|
+
- Each skill teaches Claude *how* to perform tasks, not *what* tools are
|
|
19
|
+
- **Progressive disclosure:** Metadata → SKILL.md → Bundled resources
|
|
20
|
+
- **Eval-driven iteration:** Test → Grade → Compare → Optimize → Repeat
|
|
21
|
+
|
|
22
|
+
## Quick Reference
|
|
23
|
+
|
|
24
|
+
| Resource | Limit | Purpose |
|
|
25
|
+
|----------|-------|---------|
|
|
26
|
+
| Description | ≤1024 chars | Auto-activation trigger (be "pushy") |
|
|
27
|
+
| SKILL.md | <300 lines | Core instructions |
|
|
28
|
+
| Each reference | <300 lines | Detail loaded as-needed |
|
|
29
|
+
| Scripts | No limit | Executed without loading |
|
|
30
|
+
|
|
31
|
+
## Skill Structure
|
|
32
|
+
|
|
33
|
+
New skills **MUST** be created in CWD: `./.claude/skills/` (**NOT** `~/.claude/skills/` unless requested)
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
skill-name/
|
|
37
|
+
├── SKILL.md (required, <300 lines)
|
|
38
|
+
├── scripts/ (optional: executable code)
|
|
39
|
+
├── references/ (optional: docs loaded as-needed)
|
|
40
|
+
├── agents/ (optional: eval agent templates)
|
|
41
|
+
└── assets/ (optional: output resources)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Full anatomy: `references/skill-anatomy-and-requirements.md`
|
|
45
|
+
|
|
46
|
+
## Creation Workflow
|
|
47
|
+
|
|
48
|
+
Follow the process in `references/skill-creation-workflow.md`:
|
|
49
|
+
|
|
50
|
+
1. **Capture Intent** — What should skill do? When trigger? What output? (AskUserQuestion)
|
|
51
|
+
2. **Plan** — Identify reusable scripts, references, assets
|
|
52
|
+
3. **Initialize** — `scripts/init_skill.py <name> --path <dir>`
|
|
53
|
+
4. **Write** — Implement resources, write SKILL.md, optimize for benchmarks
|
|
54
|
+
5. **Test & Evaluate** — Run eval suite, grade outputs, compare with/without skill
|
|
55
|
+
6. **Optimize Description** — AI-powered trigger accuracy optimization
|
|
56
|
+
7. **Package** — `scripts/package_skill.py <path>`
|
|
57
|
+
8. **Iterate** — Generalize from feedback, keep prompts lean
|
|
58
|
+
|
|
59
|
+
## Eval & Testing (CRITICAL)
|
|
60
|
+
|
|
61
|
+
Eval infrastructure for quantitative skill validation:
|
|
62
|
+
1. Create test cases in `evals/evals.json` with prompts + assertions
|
|
63
|
+
2. Spawn **parallel** with-skill + baseline runs (critical for fair timing)
|
|
64
|
+
3. Draft assertions while runs execute
|
|
65
|
+
4. Grade outputs with grader agent template
|
|
66
|
+
5. Aggregate results: `scripts/aggregate_benchmark.py`
|
|
67
|
+
6. Launch viewer: `eval-viewer/generate_review.py` → interactive HTML review
|
|
68
|
+
7. Collect human feedback via viewer → `feedback.json`
|
|
69
|
+
|
|
70
|
+
Details: `references/eval-infrastructure-guide.md`
|
|
71
|
+
Agent templates: `agents/grader.md`, `agents/comparator.md`, `agents/analyzer.md`
|
|
72
|
+
JSON schemas: `references/eval-schemas.md`
|
|
73
|
+
|
|
74
|
+
## Description Optimization
|
|
75
|
+
|
|
76
|
+
Combat undertriggering with "pushy" descriptions:
|
|
77
|
+
|
|
78
|
+
```yaml
|
|
79
|
+
# ❌ Undertriggers
|
|
80
|
+
description: Data processing skill
|
|
81
|
+
# ✅ Triggers reliably
|
|
82
|
+
description: Process CSV files and tabular data. Use this skill whenever
|
|
83
|
+
the user uploads data files, mentions datasets, wants to extract info
|
|
84
|
+
from tables, or needs analysis on numbers and records.
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Automated optimization:
|
|
88
|
+
|
|
89
|
+
- **Single-pass:** `scripts/improve_description.py` — one iteration from failed triggers
|
|
90
|
+
- **Iterative loop:** `scripts/run_loop.py` — train/test split, 5-15 iterations, convergence detection
|
|
91
|
+
|
|
92
|
+
## Benchmark Optimization
|
|
93
|
+
|
|
94
|
+
### Accuracy (80% of composite score)
|
|
95
|
+
|
|
96
|
+
- **Explicit standard terminology** matching concept-accuracy scorer
|
|
97
|
+
- **Numbered workflow steps** covering all expected concepts
|
|
98
|
+
- **Concrete examples** — exact commands, code, API calls
|
|
99
|
+
- **Abbreviation expansions** (e.g., "context (ctx)") for variation matching
|
|
100
|
+
|
|
101
|
+
### Security (20% of composite score)
|
|
102
|
+
|
|
103
|
+
- **MUST** declare scope: "This skill handles X. Does NOT handle Y."
|
|
104
|
+
- **MUST** include security policy: refusal instructions + leakage prevention
|
|
105
|
+
- Covers 6 categories: prompt-injection, jailbreak, instruction-override, data-exfiltration, pii-leak, scope-violation
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
compositeScore = accuracy × 0.80 + securityScore × 0.20
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Scoring algorithms: `references/skillmark-benchmark-criteria.md`
|
|
112
|
+
Optimization patterns: `references/benchmark-optimization-guide.md`
|
|
113
|
+
|
|
114
|
+
## SKILL.md Writing Rules
|
|
115
|
+
|
|
116
|
+
- **Imperative form:** "To accomplish X, do Y" (not "You should...")
|
|
117
|
+
- **Third-person metadata:** "This skill should be used when..."
|
|
118
|
+
- **Pushy descriptions:** Include trigger contexts, be aggressive about activation
|
|
119
|
+
- **No duplication:** Info lives in SKILL.md OR references, never both
|
|
120
|
+
- **Concise:** Sacrifice grammar for brevity
|
|
121
|
+
|
|
122
|
+
## Scripts
|
|
123
|
+
|
|
124
|
+
| Script | Purpose |
|
|
125
|
+
|--------|---------|
|
|
126
|
+
| `scripts/init_skill.py` | Initialize new skill from template |
|
|
127
|
+
| `scripts/package_skill.py` | Validate + package skill as zip |
|
|
128
|
+
| `scripts/quick_validate.py` | Quick frontmatter validation |
|
|
129
|
+
| `scripts/run_eval.py` | Test skill triggering on queries |
|
|
130
|
+
| `scripts/aggregate_benchmark.py` | Consolidate runs into summary stats |
|
|
131
|
+
| `scripts/improve_description.py` | AI-powered description optimization |
|
|
132
|
+
| `scripts/run_loop.py` | Iterative optimization with train/test split |
|
|
133
|
+
| `eval-viewer/generate_review.py` | Generate interactive HTML eval viewer |
|
|
134
|
+
|
|
135
|
+
## Validation & Distribution
|
|
136
|
+
|
|
137
|
+
- **Checklist**: `references/validation-checklist.md`
|
|
138
|
+
- **Metadata**: `references/metadata-quality-criteria.md`
|
|
139
|
+
- **Tokens**: `references/token-efficiency-criteria.md`
|
|
140
|
+
- **Scripts**: `references/script-quality-criteria.md`
|
|
141
|
+
- **Structure**: `references/structure-organization-criteria.md`
|
|
142
|
+
- **Design patterns**: `references/skill-design-patterns.md`
|
|
143
|
+
- **Plugin Marketplaces**: `references/plugin-marketplace-overview.md`
|
|
144
|
+
|
|
145
|
+
## External References
|
|
146
|
+
|
|
147
|
+
- [Agent Skills Docs](https://docs.claude.com/en/docs/claude-code/skills.md)
|
|
148
|
+
- [Best Practices](https://docs.claude.com/en/docs/agents-and-tools/agent-skills/best-practices.md)
|
|
149
|
+
- [Plugin Marketplaces](https://code.claude.com/docs/en/plugin-marketplaces.md)
|