@skill-graph/cli 0.5.6
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/CHANGELOG.md +247 -0
- package/LICENSE +200 -0
- package/NOTICE +62 -0
- package/README.md +398 -0
- package/SKILL_GRAPH.md +443 -0
- package/bin/skill-graph.js +374 -0
- package/docs/ADOPTION.md +117 -0
- package/docs/CONFORMANCE.md +66 -0
- package/docs/PRIMER.md +384 -0
- package/docs/QUICKSTART-30MIN.md +333 -0
- package/docs/ROUTING-METRICS.md +120 -0
- package/docs/SKILL-MD-FORMAT-COMPATIBILITY.md +127 -0
- package/docs/SKILL_AUDIT_CHECKLIST.md +199 -0
- package/docs/SKILL_AUDIT_LOOP.md +195 -0
- package/docs/SKILL_METADATA_PROTOCOL.md +609 -0
- package/docs/_archived/marketplace-publication-priority-2026-05-18.md +239 -0
- package/docs/adr/0001-predicate-set.md +69 -0
- package/docs/adr/0002-json-ld-context.md +82 -0
- package/docs/adr/0003-ontoclean-rigidity-tags.md +65 -0
- package/docs/adr/0004-persistent-identifiers.md +74 -0
- package/docs/adr/0005-freshness-consolidation.md +70 -0
- package/docs/adr/0006-revise-predicate-rename.md +105 -0
- package/docs/adr/0007-audit-loop-cadence.md +99 -0
- package/docs/adr/0008-skill-surface-split-and-curation-policy.md +93 -0
- package/docs/category-consumers.md +168 -0
- package/docs/concept-map.md +194 -0
- package/docs/diagrams/drift-states.mmd +21 -0
- package/docs/diagrams/manifest-pipeline.mmd +25 -0
- package/docs/diagrams/routing-harness.mmd +41 -0
- package/docs/diagrams/starter-graph.mmd +53 -0
- package/docs/field-decision-guide.md +315 -0
- package/docs/field-rationale.md +211 -0
- package/docs/field-reference.generated.md +624 -0
- package/docs/field-reference.md +1426 -0
- package/docs/glossary.md +190 -0
- package/docs/head-noun-glossary.md +63 -0
- package/docs/images/audit-phases.png +0 -0
- package/docs/images/drift-states.png +0 -0
- package/docs/images/graded-mode.png +0 -0
- package/docs/images/manifest-pipeline.png +0 -0
- package/docs/images/routing-harness.png +0 -0
- package/docs/images/skill-anatomy.png +0 -0
- package/docs/images/starter-graph.png +0 -0
- package/docs/images/system-model.png +0 -0
- package/docs/integrations/github-actions.md +155 -0
- package/docs/manifest-field-mapping.md +443 -0
- package/docs/marketplace-publication-queue.generated.md +240 -0
- package/docs/marketplace-release-agent-prompt.md +82 -0
- package/docs/marketplace-skill-candidate-list.md +272 -0
- package/docs/marketplace-syndication.md +222 -0
- package/docs/migration-sample-review.md +155 -0
- package/docs/migrations/v4-to-v5.md +168 -0
- package/docs/migrations/v5-to-v6.md +221 -0
- package/docs/name-exceptions.yaml +37 -0
- package/docs/plans/marketplace-p1-public-migration-plan.md +41 -0
- package/docs/plans/multi-root-workspace.md +148 -0
- package/docs/plans/scripts-roadmap.md +107 -0
- package/docs/plans/v4-schema-bump.md +160 -0
- package/docs/plans/wave-2-extraction.md +122 -0
- package/docs/positioning-vs-marketplaces.md +175 -0
- package/docs/proposals/skill-audit-loop-positioning.md +160 -0
- package/docs/quality-doctrine.md +138 -0
- package/docs/recommended-skills.md +150 -0
- package/docs/research/skill-comprehension-eval-research.md +1830 -0
- package/docs/research/skill-retrieval-evidence.md +66 -0
- package/docs/skill-metadata-protocol.md +471 -0
- package/docs/skills-sh-maintainer-cleanup-request.md +80 -0
- package/examples/audits/a11y/findings.md +52 -0
- package/examples/audits/a11y/scorecard.md +21 -0
- package/examples/audits/a11y/verdict.md +44 -0
- package/examples/audits/debugging/findings.md +59 -0
- package/examples/audits/debugging/scorecard.md +22 -0
- package/examples/audits/debugging/verdict.md +33 -0
- package/examples/audits/documentation/findings.md +59 -0
- package/examples/audits/documentation/scorecard.md +22 -0
- package/examples/audits/documentation/verdict.md +33 -0
- package/examples/evals/a11y.json +140 -0
- package/examples/evals/api-design.json +52 -0
- package/examples/evals/code-review.json +52 -0
- package/examples/evals/data-modeling.json +52 -0
- package/examples/evals/database-migration.json +52 -0
- package/examples/evals/debugging.json +118 -0
- package/examples/evals/dependency-architecture.json +52 -0
- package/examples/evals/design-system-architecture.json +52 -0
- package/examples/evals/error-tracking.json +52 -0
- package/examples/evals/event-contract-design.json +52 -0
- package/examples/evals/form-ux-architecture.json +52 -0
- package/examples/evals/framework-fit-analysis.json +52 -0
- package/examples/evals/graph-audit.json +139 -0
- package/examples/evals/information-architecture.json +52 -0
- package/examples/evals/interaction-feedback.json +52 -0
- package/examples/evals/interaction-patterns.json +52 -0
- package/examples/evals/layout-composition.json +52 -0
- package/examples/evals/lint-overlay.json +117 -0
- package/examples/evals/microcopy.json +52 -0
- package/examples/evals/observability-modeling.json +52 -0
- package/examples/evals/pattern-recognition.json +96 -0
- package/examples/evals/performance-engineering.json +52 -0
- package/examples/evals/refactor.json +128 -0
- package/examples/evals/semiotics.json +52 -0
- package/examples/evals/skill-infrastructure.json +96 -0
- package/examples/evals/skill-router.json +140 -0
- package/examples/evals/skill-router.routing.json +113 -0
- package/examples/evals/system-interface-contracts.json +52 -0
- package/examples/evals/task-analysis.json +52 -0
- package/examples/evals/testing-strategy.json +118 -0
- package/examples/evals/type-safety.json +249 -0
- package/examples/evals/visual-design-foundations.json +52 -0
- package/examples/evals/webhook-integration.json +52 -0
- package/examples/exports/a11y.skill-md.md +80 -0
- package/examples/exports/debugging.skill-md.md +80 -0
- package/examples/exports/refactor.skill-md.md +78 -0
- package/examples/exports/testing-strategy.skill-md.md +81 -0
- package/examples/projects/markdown-static-site/README.md +115 -0
- package/examples/projects/markdown-static-site/skills/content-source-router/SKILL.md +131 -0
- package/examples/projects/markdown-static-site/skills/image-optimization-pipeline-config/SKILL.md +132 -0
- package/examples/projects/markdown-static-site/skills/link-rot-detection/SKILL.md +103 -0
- package/examples/projects/markdown-static-site/skills/markdown-post-frontmatter-validation/SKILL.md +133 -0
- package/examples/projects/markdown-static-site/skills/migrate-posts-to-v2-frontmatter/SKILL.md +140 -0
- package/examples/projects/saas-stripe-postgres/README.md +208 -0
- package/examples/projects/saas-stripe-postgres/db/migrations/0004_canonicalize_orders.sql +37 -0
- package/examples/projects/saas-stripe-postgres/db/schema.sql +112 -0
- package/examples/projects/saas-stripe-postgres/skills/migrate-orders-to-canonical-schema/SKILL.md +149 -0
- package/examples/projects/saas-stripe-postgres/skills/nextjs-server-action-validation/SKILL.md +154 -0
- package/examples/projects/saas-stripe-postgres/skills/payment-provider-router/SKILL.md +153 -0
- package/examples/projects/saas-stripe-postgres/skills/postgres-rls-pattern/SKILL.md +163 -0
- package/examples/projects/saas-stripe-postgres/skills/stripe-webhook-signature-verification/SKILL.md +137 -0
- package/examples/protocol/skill-metadata-template.md +301 -0
- package/examples/protocol/skills.manifest.sample.json +13245 -0
- package/examples/skill-metadata-template.md +317 -0
- package/examples/skills.manifest.sample.json +13519 -0
- package/examples/tests/v3-1-skos-fixture/SKILL.md +93 -0
- package/marketplace/README.md +17 -0
- package/marketplace/skills/a11y/SKILL.md +66 -0
- package/marketplace/skills/acid-fundamentals/SKILL.md +106 -0
- package/marketplace/skills/agent-engineering/SKILL.md +386 -0
- package/marketplace/skills/agent-eval-design/SKILL.md +55 -0
- package/marketplace/skills/ai-native-development/SKILL.md +294 -0
- package/marketplace/skills/api-design/SKILL.md +60 -0
- package/marketplace/skills/architecture-decision-records/SKILL.md +55 -0
- package/marketplace/skills/background-jobs/SKILL.md +265 -0
- package/marketplace/skills/bounded-context-mapping/SKILL.md +55 -0
- package/marketplace/skills/cap-theorem-tradeoffs/SKILL.md +127 -0
- package/marketplace/skills/client-server-boundary/SKILL.md +187 -0
- package/marketplace/skills/code-review/SKILL.md +120 -0
- package/marketplace/skills/color-system-design/SKILL.md +43 -0
- package/marketplace/skills/component-architecture/SKILL.md +126 -0
- package/marketplace/skills/compression/SKILL.md +112 -0
- package/marketplace/skills/conceptual-modeling/SKILL.md +181 -0
- package/marketplace/skills/connection-pooling/SKILL.md +105 -0
- package/marketplace/skills/constraint-awareness/SKILL.md +287 -0
- package/marketplace/skills/content-monitor/SKILL.md +209 -0
- package/marketplace/skills/context-engineering/SKILL.md +320 -0
- package/marketplace/skills/context-graph/SKILL.md +174 -0
- package/marketplace/skills/context-management/SKILL.md +174 -0
- package/marketplace/skills/context-window/SKILL.md +239 -0
- package/marketplace/skills/contract-testing/SKILL.md +120 -0
- package/marketplace/skills/cron-scheduling/SKILL.md +223 -0
- package/marketplace/skills/dark-mode-implementation/SKILL.md +47 -0
- package/marketplace/skills/data-modeling/SKILL.md +59 -0
- package/marketplace/skills/data-modeling-fundamentals/SKILL.md +117 -0
- package/marketplace/skills/database-migration/SKILL.md +429 -0
- package/marketplace/skills/debugging/SKILL.md +67 -0
- package/marketplace/skills/dependency-architecture/SKILL.md +58 -0
- package/marketplace/skills/design-module-composition/SKILL.md +43 -0
- package/marketplace/skills/design-system-architecture/SKILL.md +61 -0
- package/marketplace/skills/design-thinking/SKILL.md +44 -0
- package/marketplace/skills/diagnosis/SKILL.md +296 -0
- package/marketplace/skills/diff-analysis/SKILL.md +188 -0
- package/marketplace/skills/e2e-test-design/SKILL.md +113 -0
- package/marketplace/skills/entity-relationship-modeling/SKILL.md +218 -0
- package/marketplace/skills/epistemic-grounding/SKILL.md +112 -0
- package/marketplace/skills/error-boundary/SKILL.md +235 -0
- package/marketplace/skills/error-tracking/SKILL.md +261 -0
- package/marketplace/skills/eval-driven-development/SKILL.md +147 -0
- package/marketplace/skills/evaluation/SKILL.md +113 -0
- package/marketplace/skills/event-contract-design/SKILL.md +60 -0
- package/marketplace/skills/event-storming/SKILL.md +56 -0
- package/marketplace/skills/form-ux-architecture/SKILL.md +60 -0
- package/marketplace/skills/framework-fit-analysis/SKILL.md +59 -0
- package/marketplace/skills/frontend-architecture/SKILL.md +43 -0
- package/marketplace/skills/generative-ui/SKILL.md +118 -0
- package/marketplace/skills/graph-audit/SKILL.md +81 -0
- package/marketplace/skills/guardrails/SKILL.md +118 -0
- package/marketplace/skills/hooks-patterns/SKILL.md +185 -0
- package/marketplace/skills/http-semantics/SKILL.md +136 -0
- package/marketplace/skills/ideation/SKILL.md +41 -0
- package/marketplace/skills/indexing-strategy/SKILL.md +108 -0
- package/marketplace/skills/information-architecture/SKILL.md +59 -0
- package/marketplace/skills/integration-test-design/SKILL.md +111 -0
- package/marketplace/skills/intent-recognition/SKILL.md +136 -0
- package/marketplace/skills/interaction-feedback/SKILL.md +59 -0
- package/marketplace/skills/interaction-patterns/SKILL.md +59 -0
- package/marketplace/skills/journey-mapping/SKILL.md +41 -0
- package/marketplace/skills/keywords/SKILL.md +213 -0
- package/marketplace/skills/knowledge-modeling/SKILL.md +232 -0
- package/marketplace/skills/layout-composition/SKILL.md +59 -0
- package/marketplace/skills/linguistics/SKILL.md +429 -0
- package/marketplace/skills/lint-overlay/SKILL.md +76 -0
- package/marketplace/skills/mental-models/SKILL.md +126 -0
- package/marketplace/skills/merge-queue/SKILL.md +94 -0
- package/marketplace/skills/methodology/SKILL.md +317 -0
- package/marketplace/skills/microcopy/SKILL.md +232 -0
- package/marketplace/skills/middleware-patterns/SKILL.md +363 -0
- package/marketplace/skills/mobile-responsive-ux/SKILL.md +287 -0
- package/marketplace/skills/mutation-testing/SKILL.md +112 -0
- package/marketplace/skills/naming-conventions/SKILL.md +112 -0
- package/marketplace/skills/observability-modeling/SKILL.md +59 -0
- package/marketplace/skills/ontology-modeling/SKILL.md +67 -0
- package/marketplace/skills/owasp-security/SKILL.md +153 -0
- package/marketplace/skills/pattern-recognition/SKILL.md +472 -0
- package/marketplace/skills/performance-budgets/SKILL.md +185 -0
- package/marketplace/skills/performance-engineering/SKILL.md +58 -0
- package/marketplace/skills/performance-testing/SKILL.md +125 -0
- package/marketplace/skills/printify/SKILL.md +42 -0
- package/marketplace/skills/prioritization/SKILL.md +118 -0
- package/marketplace/skills/problem-framing/SKILL.md +41 -0
- package/marketplace/skills/problem-locating-solving/SKILL.md +203 -0
- package/marketplace/skills/project-knowledge-extraction/SKILL.md +54 -0
- package/marketplace/skills/prompt-craft/SKILL.md +134 -0
- package/marketplace/skills/prompt-injection-defense/SKILL.md +132 -0
- package/marketplace/skills/property-based-testing/SKILL.md +100 -0
- package/marketplace/skills/prototyping/SKILL.md +43 -0
- package/marketplace/skills/query-optimization/SKILL.md +144 -0
- package/marketplace/skills/real-time-updates/SKILL.md +324 -0
- package/marketplace/skills/ref-patterns/SKILL.md +284 -0
- package/marketplace/skills/refactor/SKILL.md +65 -0
- package/marketplace/skills/rendering-models/SKILL.md +142 -0
- package/marketplace/skills/replication-patterns/SKILL.md +110 -0
- package/marketplace/skills/research-synthesis/SKILL.md +41 -0
- package/marketplace/skills/route-handler-design/SKILL.md +347 -0
- package/marketplace/skills/schema-evolution/SKILL.md +140 -0
- package/marketplace/skills/security-fundamentals/SKILL.md +139 -0
- package/marketplace/skills/semantic-center/SKILL.md +194 -0
- package/marketplace/skills/semantic-relations/SKILL.md +250 -0
- package/marketplace/skills/semantics/SKILL.md +366 -0
- package/marketplace/skills/semiotics/SKILL.md +230 -0
- package/marketplace/skills/seo-strategy/SKILL.md +260 -0
- package/marketplace/skills/server-actions-design/SKILL.md +243 -0
- package/marketplace/skills/server-components-design/SKILL.md +190 -0
- package/marketplace/skills/sharding-strategy/SKILL.md +123 -0
- package/marketplace/skills/shopify/SKILL.md +42 -0
- package/marketplace/skills/skill-infrastructure/SKILL.md +320 -0
- package/marketplace/skills/skill-router/SKILL.md +71 -0
- package/marketplace/skills/skill-scaffold/SKILL.md +105 -0
- package/marketplace/skills/snapshot-testing/SKILL.md +120 -0
- package/marketplace/skills/spec-driven-development/SKILL.md +148 -0
- package/marketplace/skills/state-machine-modeling/SKILL.md +56 -0
- package/marketplace/skills/state-management/SKILL.md +134 -0
- package/marketplace/skills/streaming-architecture/SKILL.md +194 -0
- package/marketplace/skills/summarization/SKILL.md +156 -0
- package/marketplace/skills/suspense-patterns/SKILL.md +265 -0
- package/marketplace/skills/system-interface-contracts/SKILL.md +59 -0
- package/marketplace/skills/task-analysis/SKILL.md +201 -0
- package/marketplace/skills/taxonomy-design/SKILL.md +66 -0
- package/marketplace/skills/test-coverage-strategy/SKILL.md +108 -0
- package/marketplace/skills/test-doubles-design/SKILL.md +98 -0
- package/marketplace/skills/test-driven-development/SKILL.md +96 -0
- package/marketplace/skills/testing-strategy/SKILL.md +67 -0
- package/marketplace/skills/theme-system-design/SKILL.md +43 -0
- package/marketplace/skills/tool-call-flow/SKILL.md +229 -0
- package/marketplace/skills/tool-call-strategy/SKILL.md +292 -0
- package/marketplace/skills/transaction-isolation/SKILL.md +98 -0
- package/marketplace/skills/type-safety/SKILL.md +177 -0
- package/marketplace/skills/typography-system/SKILL.md +43 -0
- package/marketplace/skills/usability-testing/SKILL.md +43 -0
- package/marketplace/skills/user-research/SKILL.md +43 -0
- package/marketplace/skills/vercel-composition-patterns/SKILL.md +157 -0
- package/marketplace/skills/version-control/SKILL.md +233 -0
- package/marketplace/skills/visual-design-foundations/SKILL.md +59 -0
- package/marketplace/skills/visual-hierarchy/SKILL.md +43 -0
- package/marketplace/skills/webhook-integration/SKILL.md +331 -0
- package/marketplace/skills/writing-humanizer/SKILL.md +380 -0
- package/package.json +67 -0
- package/schemas/manifest.schema.json +811 -0
- package/schemas/manifest.v2.schema.json +164 -0
- package/schemas/manifest.v3.schema.json +758 -0
- package/schemas/manifest.v4.schema.json +755 -0
- package/schemas/manifest.v5.schema.json +755 -0
- package/schemas/manifest.v6.schema.json +811 -0
- package/schemas/skill.context.jsonld +279 -0
- package/schemas/skill.schema.json +919 -0
- package/schemas/skill.v2.schema.json +201 -0
- package/schemas/skill.v3.schema.json +827 -0
- package/schemas/skill.v4.schema.json +822 -0
- package/schemas/skill.v5.schema.json +830 -0
- package/schemas/skill.v6.schema.json +946 -0
- package/schemas/vocabulary/keywords.json +180 -0
- package/schemas/vocabulary/workspace_tags.json +23 -0
- package/scripts/__tests__/migrate-skill-v2-to-v3.test.js +161 -0
- package/scripts/__tests__/migrate-skill-v3-to-v4.test.js +158 -0
- package/scripts/__tests__/test-export-parser-drift.js +149 -0
- package/scripts/__tests__/test-marketplace-export.js +114 -0
- package/scripts/__tests__/test-router-paths.js +82 -0
- package/scripts/__tests__/test-stability-promotion.js +244 -0
- package/scripts/__tests__/test-v3-1-alias-contract.js +109 -0
- package/scripts/__tests__/test-v3-1-skos-runtime.js +116 -0
- package/scripts/backfill-schema-version.js +198 -0
- package/scripts/build-field-reference.js +160 -0
- package/scripts/build-retrieval-baseline.js +511 -0
- package/scripts/check-markdown-links.js +211 -0
- package/scripts/check-protocol-consistency.js +979 -0
- package/scripts/export-marketplace-skills.js +610 -0
- package/scripts/export-skill.js +374 -0
- package/scripts/generate-manifest.js +787 -0
- package/scripts/lib/alias-contract.js +83 -0
- package/scripts/lib/audit-prompt-builder.js +771 -0
- package/scripts/lib/mock-grader.js +134 -0
- package/scripts/lib/parse-frontmatter.js +429 -0
- package/scripts/lib/roots.js +119 -0
- package/scripts/lint/check-archetype-sections.js +185 -0
- package/scripts/lint/check-category-enum.js +83 -0
- package/scripts/lint/check-routing-eval.js +146 -0
- package/scripts/lint/check-routing-quality.js +211 -0
- package/scripts/lint/check-stability-promotion.js +220 -0
- package/scripts/lint/format-code-frame.js +206 -0
- package/scripts/marketplace-install.js +125 -0
- package/scripts/migrate-category-to-enum.js +169 -0
- package/scripts/migrate-skill-v2-to-v3.js +424 -0
- package/scripts/migrate-skill-v3-to-v4.js +200 -0
- package/scripts/migrate-skill-v5-to-v6.js +304 -0
- package/scripts/restructure-by-category.js +85 -0
- package/scripts/seed-publication-classification.js +282 -0
- package/scripts/skill-audit.js +893 -0
- package/scripts/skill-graph-drift.js +483 -0
- package/scripts/skill-graph-route.js +766 -0
- package/scripts/skill-graph-routing-eval.js +393 -0
- package/scripts/skill-lint.js +1317 -0
- package/scripts/skill-overlap.js +213 -0
- package/scripts/verify-skill-md-export.js +201 -0
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
# 30-Minute Quickstart for Project Developers
|
|
2
|
+
|
|
3
|
+
> **Audience.** A working developer with at least one painful skill — wrong-skill activation on an ambiguous prompt, or a `SKILL.md` quoting a file that no longer exists, or skills that should be project-scoped but live in a shared folder. You have ~30 minutes and a Node 20+ environment.
|
|
4
|
+
>
|
|
5
|
+
> **What you'll do.** Adopt Skill Graph for one painful workflow — author a `markdown-post-frontmatter-review` skill grounded in real repository files, add a second skill that depends on it, watch the lint catch a broken relation, route a real query, and record a drift baseline so the skill warns you when its truth source moves.
|
|
6
|
+
>
|
|
7
|
+
> **What you won't do.** Migrate your whole library yet. Pilot on one skill first; the rest follows after you've felt the contract pay off once.
|
|
8
|
+
|
|
9
|
+
| Minute | Step | What you'll learn |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| M0–M2 | Clone the repo and install | The repo runs with zero external dependencies |
|
|
12
|
+
| M3–M7 | Copy the template into your first skill directory | The authoring flow is copy → rename → adapt → strip → verify |
|
|
13
|
+
| M8–M11 | Fill in the 13 required v4 fields for `markdown-post-frontmatter-review` | Why each field exists and what it commits you to |
|
|
14
|
+
| M12–M15 | Lint your first skill | Lint output is the primary debugging surface |
|
|
15
|
+
| M16–M19 | Create a second skill (`post-archive-rebuild`) with a `relations.depends_on` link | The graph is real — relations enforce that `depends_on` targets exist |
|
|
16
|
+
| M20–M24 | Break the relation deliberately and watch lint catch it | The contract fails loud, not silent |
|
|
17
|
+
| M25–M29 | Route a real query and read the routing trace | Why each skill was SELECTED, CO-LOADED, or EXCLUDED |
|
|
18
|
+
| M30 | Record the drift baseline | The skill now knows when its truth source moved |
|
|
19
|
+
|
|
20
|
+
This walkthrough uses a markdown static-site project as the running example — content under `content/posts/**/*.md`, a build-time validator at `lib/content/parse-frontmatter.ts`, a content schema at `lib/content/schema.ts`. Substitute paths from your own project as you go.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## M0–M2: Clone and install
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
git clone https://github.com/<your-org>/skill-graph my-skill-library
|
|
28
|
+
cd my-skill-library
|
|
29
|
+
node --version
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Expected output:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
v20.17.0
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
That's it for local clone setup. Skill Graph has zero runtime dependencies — every reference script uses only Node built-ins, so no `npm install` step is required to run the tools from a clone. `package.json` exists for the installable CLI, release packaging, and CI entry points.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## M3–M7: Copy the template into `markdown-post-frontmatter-review`
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
mkdir -p skills/markdown-post-frontmatter-review
|
|
46
|
+
cp examples/skill-metadata-template.md skills/markdown-post-frontmatter-review/SKILL.md
|
|
47
|
+
ls skills/markdown-post-frontmatter-review/
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Expected output:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
SKILL.md
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Open `skills/markdown-post-frontmatter-review/SKILL.md` in your editor. The template is a *real, valid, schema-conformant* Skill Metadata Protocol skill whose subject is skill authoring itself. You'll adapt it by:
|
|
57
|
+
|
|
58
|
+
1. Renaming the identity (`name`, `description`, `version`)
|
|
59
|
+
2. Rewriting `## Coverage`, `## Philosophy`, `## Verification`, `## Do NOT Use When` for your subject
|
|
60
|
+
3. Stripping every `# TEMPLATE NOTE:` YAML comment and `> **TEMPLATE NOTE:**` blockquote — they are authoring scaffolding, never skill content
|
|
61
|
+
|
|
62
|
+
The template lints clean as-is, so you can incrementally edit and re-lint to catch mistakes early.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## M8–M11: Fill in the 13 required v4 fields
|
|
67
|
+
|
|
68
|
+
The 13 required v4 fields are: `schema_version`, `name`, `description`, `version`, `type`, `category`, `scope`, `owner`, `freshness`, `drift_check`, `eval_artifacts`, `eval_state`, `routing_eval`. The template has all 13 — you're replacing values, not adding fields.
|
|
69
|
+
|
|
70
|
+
For `markdown-post-frontmatter-review`, the values look like:
|
|
71
|
+
|
|
72
|
+
```yaml
|
|
73
|
+
schema_version: 4
|
|
74
|
+
name: markdown-post-frontmatter-review
|
|
75
|
+
description: "Use when authoring or reviewing the YAML frontmatter of a markdown post — checking required fields (title, date, slug, tags), validating against the content schema, catching ambiguous date formats, and ensuring the slug matches the file path. Activate this skill whenever the task touches files under `content/posts/**/*.md` or the `parsePostFrontmatter()` helper — even if the user just says 'the post'. Do NOT use for general YAML schema design (use a different skill) or for chasing a specific build-time validation failure (use debugging)."
|
|
76
|
+
version: 0.1.0
|
|
77
|
+
type: capability
|
|
78
|
+
category: content
|
|
79
|
+
scope: codebase
|
|
80
|
+
owner: <your-handle-or-team>
|
|
81
|
+
freshness: "2026-05-06"
|
|
82
|
+
drift_check:
|
|
83
|
+
last_verified: "2026-05-06"
|
|
84
|
+
eval_artifacts: none
|
|
85
|
+
eval_state: unverified
|
|
86
|
+
routing_eval: absent
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
For `scope: codebase` you also need a `grounding` block — point it at the real content schema and template post in your repo:
|
|
90
|
+
|
|
91
|
+
```yaml
|
|
92
|
+
grounding:
|
|
93
|
+
domain_object: "Markdown post frontmatter — the YAML block at the top of every content file that drives the site's index, routing, and rendering"
|
|
94
|
+
grounding_mode: repo_specific
|
|
95
|
+
truth_sources:
|
|
96
|
+
- content/posts/_template.md
|
|
97
|
+
- lib/content/schema.ts
|
|
98
|
+
- lib/content/parse-frontmatter.ts
|
|
99
|
+
failure_modes:
|
|
100
|
+
- missing_required_title_field
|
|
101
|
+
- ambiguous_date_format_no_timezone
|
|
102
|
+
- tag_not_in_controlled_vocabulary
|
|
103
|
+
- slug_mismatch_with_file_path
|
|
104
|
+
evidence_priority: repo_code_first
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Adjust the `truth_sources` paths to match your actual content schema and template files. Strip every `# TEMPLATE NOTE:` and `> **TEMPLATE NOTE:**` blockquote before the next step.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## M12–M15: Lint your first skill
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
node scripts/skill-lint.js skills/markdown-post-frontmatter-review
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
If everything is correct:
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
OK [T1↔T3] schemas/ (cross-schema parity)
|
|
121
|
+
OK [T5 sample] examples/skills.manifest.sample.json
|
|
122
|
+
OK [T3↔T5] examples/skills.manifest.sample.json (generator parity)
|
|
123
|
+
OK [T5 evals] examples/evals/ (truth_source ranges)
|
|
124
|
+
OK [T5] skills/markdown-post-frontmatter-review/SKILL.md
|
|
125
|
+
|
|
126
|
+
1 file(s) checked, 0 error(s).
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
If a required field is missing, the failure looks like:
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
FAIL skills/markdown-post-frontmatter-review/SKILL.md
|
|
133
|
+
─ schema: must have required property 'category'
|
|
134
|
+
|
|
135
|
+
1 file(s) checked, 1 error(s).
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
The lint is opinionated and verbose by design — it tells you the file, the rule, the field, and the fix. It is the primary debugging surface for authoring.
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## M16–M19: Create a second skill with a `depends_on` link
|
|
143
|
+
|
|
144
|
+
Most pain in skill libraries comes from skills that *depend on* each other but don't say so. Let's add `post-archive-rebuild` (a workflow skill that re-indexes the post archive when frontmatter changes) and have it declare `depends_on: markdown-post-frontmatter-review` — the rebuild can't proceed if the frontmatter primitive isn't authored.
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
mkdir -p skills/post-archive-rebuild
|
|
148
|
+
cp examples/skill-metadata-template.md skills/post-archive-rebuild/SKILL.md
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Edit `skills/post-archive-rebuild/SKILL.md` to set:
|
|
152
|
+
|
|
153
|
+
```yaml
|
|
154
|
+
schema_version: 4
|
|
155
|
+
name: post-archive-rebuild
|
|
156
|
+
description: "Use when re-indexing the post archive after one or more frontmatter fields have changed — walking every post, re-extracting the indexed fields, and writing the updated archive page. Activate this skill whenever the task says 'rebuild the archive' or mentions a post-index regeneration after a content edit. Do NOT use for routine authoring of a single post (use markdown-post-frontmatter-review)."
|
|
157
|
+
version: 0.1.0
|
|
158
|
+
type: workflow
|
|
159
|
+
category: content
|
|
160
|
+
scope: portable
|
|
161
|
+
owner: <your-handle>
|
|
162
|
+
freshness: "2026-05-06"
|
|
163
|
+
drift_check:
|
|
164
|
+
last_verified: "2026-05-06"
|
|
165
|
+
eval_artifacts: none
|
|
166
|
+
eval_state: unverified
|
|
167
|
+
routing_eval: absent
|
|
168
|
+
relations:
|
|
169
|
+
depends_on:
|
|
170
|
+
- skill: markdown-post-frontmatter-review
|
|
171
|
+
min_version: "^0.1.0"
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Body: include the required `## Workflow` section (workflow archetype mandates it), plus `## Coverage`, `## Philosophy`, `## Verification`, `## Do NOT Use When`.
|
|
175
|
+
|
|
176
|
+
Lint:
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
node scripts/skill-lint.js skills/post-archive-rebuild
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Expected:
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
OK [T5] skills/post-archive-rebuild/SKILL.md
|
|
186
|
+
|
|
187
|
+
1 file(s) checked, 0 error(s).
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## M20–M24: Break the relation and watch lint catch it
|
|
193
|
+
|
|
194
|
+
In `skills/post-archive-rebuild/SKILL.md`, change the `depends_on` target from `markdown-post-frontmatter-review` to a name that doesn't exist:
|
|
195
|
+
|
|
196
|
+
```yaml
|
|
197
|
+
relations:
|
|
198
|
+
depends_on:
|
|
199
|
+
- skill: markdown-post-frontmatter-review-typo
|
|
200
|
+
min_version: "^0.1.0"
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Re-lint:
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
node scripts/skill-lint.js skills/post-archive-rebuild
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Expected:
|
|
210
|
+
|
|
211
|
+
```
|
|
212
|
+
FAIL skills/post-archive-rebuild/SKILL.md
|
|
213
|
+
─ relations.depends_on: "markdown-post-frontmatter-review-typo" does not match any known skill in skills/
|
|
214
|
+
|
|
215
|
+
1 file(s) checked, 1 error(s).
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
The lint walks every relation predicate (`depends_on`, `verify_with`, `boundary`, `adjacent`, `disjoint_with`) and verifies that every named target resolves to a real sibling skill in `skills/`. This is the contract that catches the most-painful failure mode in real libraries: a skill that *claims* it depends on another, but the other was renamed/deleted/never-shipped, and nothing surfaces the broken edge until an agent tries to load the relation chain at runtime.
|
|
219
|
+
|
|
220
|
+
Restore the correct name:
|
|
221
|
+
|
|
222
|
+
```yaml
|
|
223
|
+
relations:
|
|
224
|
+
depends_on:
|
|
225
|
+
- skill: markdown-post-frontmatter-review
|
|
226
|
+
min_version: "^0.1.0"
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Re-lint and confirm `0 error(s)`.
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## M25–M29: Route a real query
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
node scripts/skill-graph-route.js "review my post's frontmatter for the controlled-vocabulary tag check"
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
Expected (your output will list whatever skills exist in your library):
|
|
240
|
+
|
|
241
|
+
```
|
|
242
|
+
Query: "review my post's frontmatter for the controlled-vocabulary tag check"
|
|
243
|
+
|
|
244
|
+
SELECTED
|
|
245
|
+
Skill Score State Reason
|
|
246
|
+
──────────────────────────────────────────────────────────────────────────────
|
|
247
|
+
markdown-post-frontmatter-review 7 unverified keyword:frontmatter, keyword:controlled-vocabulary, keyword:tag
|
|
248
|
+
|
|
249
|
+
CO-LOADED
|
|
250
|
+
Skill State Reason
|
|
251
|
+
──────────────────────────────────────────────────────────────────────────────
|
|
252
|
+
post-archive-rebuild unverified depends_on: post-archive-rebuild depends on this skill
|
|
253
|
+
|
|
254
|
+
1 selected, 1 co-loaded, 0 excluded. 0 stale.
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
Read the trace as evidence:
|
|
258
|
+
|
|
259
|
+
- **SELECTED** — the router picked `markdown-post-frontmatter-review` because three keyword tokens matched. You can see exactly *which* keywords matched, so if the wrong skill activates you can fix the keyword list rather than guess.
|
|
260
|
+
- **CO-LOADED** — `post-archive-rebuild` is loaded alongside because it `depends_on: markdown-post-frontmatter-review`. The router respects the graph automatically — you don't have to ask for the dependency.
|
|
261
|
+
- **EXCLUDED** — would appear if any skill named `markdown-post-frontmatter-review` in its `relations.boundary` (anti-routing). Empty here because no boundary fires.
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## M30: Record the drift baseline
|
|
266
|
+
|
|
267
|
+
`markdown-post-frontmatter-review` is grounded in three truth sources (the template post, the schema, the parser). If any of those files change, the skill might be silently lying. Record the baseline so the drift sentinel can warn you:
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
node scripts/skill-graph-drift.js --record --apply skills/markdown-post-frontmatter-review
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
Expected:
|
|
274
|
+
|
|
275
|
+
```
|
|
276
|
+
Recorded baseline for markdown-post-frontmatter-review:
|
|
277
|
+
content/posts/_template.md: <sha256...>
|
|
278
|
+
lib/content/schema.ts: <sha256...>
|
|
279
|
+
lib/content/parse-frontmatter.ts: <sha256...>
|
|
280
|
+
|
|
281
|
+
Updated skills/markdown-post-frontmatter-review/SKILL.md frontmatter: drift_check.truth_source_hashes
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
Run the drift check:
|
|
285
|
+
|
|
286
|
+
```bash
|
|
287
|
+
node scripts/skill-graph-drift.js
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
Expected:
|
|
291
|
+
|
|
292
|
+
```
|
|
293
|
+
41 skill(s): 3 CLEAN, 38 UNGROUNDED
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
(`UNGROUNDED` = skills with no `grounding` block; that's normal for `scope: portable` and `scope: reference` skills.)
|
|
297
|
+
|
|
298
|
+
Now edit `lib/content/schema.ts` (any change — add a comment) and re-run drift:
|
|
299
|
+
|
|
300
|
+
```bash
|
|
301
|
+
node scripts/skill-graph-drift.js
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
Expected:
|
|
305
|
+
|
|
306
|
+
```
|
|
307
|
+
DRIFT markdown-post-frontmatter-review
|
|
308
|
+
DRIFT lib/content/schema.ts
|
|
309
|
+
|
|
310
|
+
41 skill(s): 1 DRIFT, 2 CLEAN, 38 UNGROUNDED
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
The skill now warns you that the truth source moved. Re-verify the skill against the changed file (does the `## Verification` checklist still pass?), then re-record the baseline once you've confirmed:
|
|
314
|
+
|
|
315
|
+
```bash
|
|
316
|
+
node scripts/skill-graph-drift.js --record --apply skills/markdown-post-frontmatter-review
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
|
|
321
|
+
## Where to go from here
|
|
322
|
+
|
|
323
|
+
You've adopted Skill Graph for one painful workflow. The contract paid off twice in 30 minutes — caught a broken relation at lint time and surfaced a stale truth source at drift-check time.
|
|
324
|
+
|
|
325
|
+
| Next step | Read |
|
|
326
|
+
|---|---|
|
|
327
|
+
| Migrate your second skill | This document, repeated for the next skill |
|
|
328
|
+
| Understand the full contract | [`docs/PRIMER.md`](PRIMER.md) and [`docs/skill-metadata-protocol.md`](skill-metadata-protocol.md) |
|
|
329
|
+
| See worked examples in a real project | [`examples/projects/markdown-static-site/README.md`](../examples/projects/markdown-static-site/README.md) |
|
|
330
|
+
| Set up CI integration | [`docs/integrations/github-actions.md`](integrations/github-actions.md) |
|
|
331
|
+
| Decide which skills to author next | [`docs/recommended-skills.md`](recommended-skills.md) |
|
|
332
|
+
|
|
333
|
+
If a step in this quickstart did not match your local output, file an issue — the lint output is the primary debugging surface and any divergence between the documented expected output and the real output is a bug in the docs or the script, never in your skill.
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# Routing Metrics
|
|
2
|
+
|
|
3
|
+
> Read this if you need to prove that Skill Metadata Protocol improves routing,
|
|
4
|
+
> or if you need to debug which skills are confused with one another.
|
|
5
|
+
|
|
6
|
+
Routing quality is an information-retrieval problem. A clean skill graph is not
|
|
7
|
+
proved by "the router felt right"; it is proved by held-out prompts, hard
|
|
8
|
+
negatives, confusion pairs, and repeatable metrics.
|
|
9
|
+
|
|
10
|
+
## What To Measure
|
|
11
|
+
|
|
12
|
+
| Metric | Meaning | Why it matters |
|
|
13
|
+
|---|---|---|
|
|
14
|
+
| Precision@1 | The expected skill is the top-1 selected skill. | Main user-visible correctness signal. |
|
|
15
|
+
| Precision@3 | The expected skill appears in the first three selections. | Useful when co-loading or human choice is acceptable. |
|
|
16
|
+
| Positive recall by skill | Each skill's positive examples route back to that skill. | Finds invisible skills with weak descriptions or keywords. |
|
|
17
|
+
| False-positive rate | Anti-examples route back to the skill they are meant to avoid. | Finds over-broad skills and missing `relations.boundary` edges. |
|
|
18
|
+
| Coverage gaps | Anti-examples avoid the wrong skill but route nowhere. | Finds missing sibling skills or weak target descriptions. |
|
|
19
|
+
| Confusion pairs | `expected -> actual` misses between nearby skills. | Shows which boundary or description needs tightening. |
|
|
20
|
+
|
|
21
|
+
## Current Harness
|
|
22
|
+
|
|
23
|
+
Run all asserted routing evals:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
node scripts/skill-graph-routing-eval.js --only-asserted
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Show the confusion matrix:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
node scripts/skill-graph-routing-eval.js --only-asserted --confusion-matrix
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
JSON output for CI or dashboards:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
node scripts/skill-graph-routing-eval.js --only-asserted --confusion-matrix --json
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The positive-case matrix is `expected skill -> actual top-1 winner`. The
|
|
42
|
+
negative-case summary counts:
|
|
43
|
+
|
|
44
|
+
| Count | Meaning |
|
|
45
|
+
|---|---|
|
|
46
|
+
| `pass_boundary_target` | Anti-example routed to a declared boundary target. |
|
|
47
|
+
| `coverage_gap` | Anti-example avoided this skill but no other skill won. |
|
|
48
|
+
| `self_hit` | Anti-example routed back to the skill under test. This is a hard false positive. |
|
|
49
|
+
| `off_boundary_hit` | Anti-example routed to some other skill not named in `relations.boundary`. |
|
|
50
|
+
|
|
51
|
+
## Routing Architecture Recommendation
|
|
52
|
+
|
|
53
|
+
Do not design production routing around `name` + `description` only. That is a
|
|
54
|
+
diagnostic ablation at most, not the best router shape.
|
|
55
|
+
|
|
56
|
+
The best-supported architecture for serious skill libraries is full-text,
|
|
57
|
+
retrieve-and-rerank routing:
|
|
58
|
+
|
|
59
|
+
1. **Candidate record:** index each skill as a structured document containing
|
|
60
|
+
`name`, `description`, full body text, examples, anti-examples, paths,
|
|
61
|
+
keywords, project tags, eval state, grounding, and relation edges.
|
|
62
|
+
2. **First-stage retrieval:** use sparse, dense, or hybrid retrieval over the
|
|
63
|
+
full skill record. Field weights may prefer `name`, `description`, examples,
|
|
64
|
+
and headings for precision, but the body must remain in the index.
|
|
65
|
+
3. **Second-stage reranking:** rerank the top candidates with a cross-encoder,
|
|
66
|
+
LLM judge, or task-trained reranker that can inspect the full skill record.
|
|
67
|
+
4. **Graph post-processing:** apply `relations.boundary` to suppress wrong
|
|
68
|
+
owners, co-load `verify_with`, respect `depends_on`, and surface coverage
|
|
69
|
+
gaps where anti-examples route nowhere.
|
|
70
|
+
5. **Evaluation:** report Precision@1, Precision@3, false-positive rate,
|
|
71
|
+
coverage gaps, and confusion pairs against held-out prompts.
|
|
72
|
+
|
|
73
|
+
For public claims, compare the full-text graph router against production
|
|
74
|
+
alternatives: current metadata router, hybrid sparse+dense retrieval, and
|
|
75
|
+
full-text reranking. A `name` + `description` run can be kept as a negative
|
|
76
|
+
control to show what information is lost, but it must not be presented as the
|
|
77
|
+
architecture this project is trying to optimize.
|
|
78
|
+
|
|
79
|
+
Recent routing and tool-retrieval papers support this direction:
|
|
80
|
+
|
|
81
|
+
- SkillRouter (arXiv:2603.22455) reports that hiding the full skill body causes
|
|
82
|
+
a 31-44 percentage-point drop in routing accuracy on an approximately 80K
|
|
83
|
+
skill benchmark, then proposes a compact full-text retrieve-and-rerank
|
|
84
|
+
pipeline. <https://arxiv.org/abs/2603.22455>
|
|
85
|
+
- SkillRet (arXiv:2605.05726) shows that skill retrieval is still far from
|
|
86
|
+
solved on realistic libraries and that task-specific retrieval training
|
|
87
|
+
improves NDCG@10 materially over off-the-shelf retrievers.
|
|
88
|
+
<https://arxiv.org/abs/2605.05726>
|
|
89
|
+
- ToolRet (arXiv:2503.01763) shows that conventional IR models perform poorly
|
|
90
|
+
for large tool retrieval, and that retrieval quality directly affects
|
|
91
|
+
tool-use task pass rate. <https://arxiv.org/abs/2503.01763>
|
|
92
|
+
- Tool-to-Agent Retrieval (arXiv:2511.01854) argues against routing only through
|
|
93
|
+
coarse agent descriptions; representing fine-grained tool capabilities and
|
|
94
|
+
metadata relationships improves Recall@5 and nDCG@5.
|
|
95
|
+
<https://arxiv.org/abs/2511.01854>
|
|
96
|
+
|
|
97
|
+
## Scaling Limits
|
|
98
|
+
|
|
99
|
+
The reference router is deliberately simple and metadata-first. That is useful
|
|
100
|
+
for deterministic local validation, but it is not the final retrieval
|
|
101
|
+
architecture for large or mixed-source skill libraries. The production path is
|
|
102
|
+
full skill text plus Skill Graph metadata and relations.
|
|
103
|
+
|
|
104
|
+
For very large skill pools, metadata-only routing should not be the primary
|
|
105
|
+
retrieval layer. Skill Graph metadata remains valuable as the contract,
|
|
106
|
+
governance, filtering, boundary, eval, and trust layer around a full-text
|
|
107
|
+
retrieval system.
|
|
108
|
+
|
|
109
|
+
Practical rule:
|
|
110
|
+
|
|
111
|
+
| Library size / shape | Suggested routing architecture |
|
|
112
|
+
|---|---|
|
|
113
|
+
| 1-10 skills | Base descriptions are usually enough. |
|
|
114
|
+
| 10-200 curated skills | Skill Graph metadata, relations, evals, and full skill bodies should all be available to routing; deterministic metadata routing is acceptable only as a local validation harness. |
|
|
115
|
+
| Hundreds to thousands of mixed-source skills | Use Skill Graph as the authoring, eval, grounding, and governance layer; pair it with full-text retrieve-and-rerank over skill bodies. |
|
|
116
|
+
| Tens of thousands of community skills | Use a learned retriever/reranker over full skill text; consume Skill Graph metadata as filters, labels, eval targets, and trust signals. |
|
|
117
|
+
|
|
118
|
+
Owning this limit makes the project more credible: Skill Graph is the contract
|
|
119
|
+
and operations layer for serious skill libraries, not a claim that frontmatter
|
|
120
|
+
alone solves web-scale retrieval.
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# SKILL.md Format Compatibility
|
|
2
|
+
|
|
3
|
+
> Read this if you need to know how Skill Graph projects richer protocol
|
|
4
|
+
> metadata back to the plain `SKILL.md` format.
|
|
5
|
+
|
|
6
|
+
Skill Metadata Protocol is not a replacement for `SKILL.md`. It is a stricter
|
|
7
|
+
authoring and operations contract that can be exported back to a plain
|
|
8
|
+
`SKILL.md` runtime artifact.
|
|
9
|
+
|
|
10
|
+
The export shape keeps a small top-level field set: `name`, `description`,
|
|
11
|
+
optional `license`, optional `compatibility`, optional `metadata`, and optional
|
|
12
|
+
`allowed-tools`.
|
|
13
|
+
|
|
14
|
+
## Compatibility Direction
|
|
15
|
+
|
|
16
|
+
| Source | Target | Automated? | Notes |
|
|
17
|
+
|---|---|---|---|
|
|
18
|
+
| Plain `SKILL.md` | Skill Metadata Protocol | No | Requires authoring the required protocol fields and deciding scope, eval health, relations, and grounding. |
|
|
19
|
+
| Skill Metadata Protocol | Plain `SKILL.md` | Yes | `scripts/export-skill.js` writes a projected `SKILL.md` artifact. |
|
|
20
|
+
| Exported `SKILL.md` | Skill Metadata Protocol | No | The export is lossy for rich types because `metadata` values are strings. Keep the source Skill Metadata Protocol file authoritative. |
|
|
21
|
+
|
|
22
|
+
## Export Shape
|
|
23
|
+
|
|
24
|
+
`scripts/export-skill.js` emits at most these top-level fields:
|
|
25
|
+
|
|
26
|
+
```yaml
|
|
27
|
+
---
|
|
28
|
+
name: documentation
|
|
29
|
+
description: "Use when writing reference docs..."
|
|
30
|
+
license: MIT
|
|
31
|
+
compatibility: "Markdown, Git"
|
|
32
|
+
allowed-tools: Read Grep
|
|
33
|
+
metadata:
|
|
34
|
+
schema_version: "4"
|
|
35
|
+
type: capability
|
|
36
|
+
drift_check: "{\"last_verified\":\"2026-04-17\"}"
|
|
37
|
+
---
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Export rules:
|
|
41
|
+
|
|
42
|
+
| Skill Metadata Protocol source | Plain `SKILL.md` output |
|
|
43
|
+
|---|---|
|
|
44
|
+
| `name` | Top-level `name`. |
|
|
45
|
+
| `description` | Top-level `description`. |
|
|
46
|
+
| `license` | Top-level `license` when present. |
|
|
47
|
+
| `compatibility` object | Top-level `compatibility` string, flattened from `runtimes`, `node`, and `notes`. |
|
|
48
|
+
| `allowed-tools` or `allowed_tools` | Top-level `allowed-tools` string. |
|
|
49
|
+
| All protocol extension fields | `metadata.<field>` string values. Objects and arrays are JSON-encoded strings. |
|
|
50
|
+
|
|
51
|
+
The JSON encoding is deliberate: the plain export uses a string-to-string
|
|
52
|
+
`metadata` map. Emitting nested YAML objects would preserve structure but would
|
|
53
|
+
stop being the simple portable export shape.
|
|
54
|
+
|
|
55
|
+
## Marketplace Surface
|
|
56
|
+
|
|
57
|
+
`scripts/export-marketplace-skills.js` builds the public marketplace surface from
|
|
58
|
+
the canonical `skills/` library:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
node scripts/export-marketplace-skills.js
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
The output goes to `marketplace/skills/<name>/SKILL.md`. Each generated file is a
|
|
65
|
+
plain `SKILL.md` export, not a Skill Metadata Protocol source file. The generator
|
|
66
|
+
adds factual provenance under `metadata`:
|
|
67
|
+
|
|
68
|
+
```yaml
|
|
69
|
+
metadata:
|
|
70
|
+
skill_graph_source_repo: "https://github.com/jacob-balslev/skill-graph"
|
|
71
|
+
skill_graph_protocol: "Skill Metadata Protocol v4"
|
|
72
|
+
skill_graph_project: "Skill Graph"
|
|
73
|
+
skill_graph_canonical_skill: "skills/<name>/SKILL.md"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
The marketplace generator also applies export-specific descriptions only for
|
|
77
|
+
skills whose canonical descriptions exceed the 1024-character Agent Skills
|
|
78
|
+
description limit. The canonical source descriptions stay unchanged.
|
|
79
|
+
|
|
80
|
+
## Verify Exports
|
|
81
|
+
|
|
82
|
+
Run:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
node scripts/verify-skill-md-export.js
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
or through npm:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npm run export:verify-skill-md
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
The verifier rebuilds every `skills/*/SKILL.md` export in memory and checks:
|
|
95
|
+
|
|
96
|
+
- only plain export fields exist at the top level
|
|
97
|
+
- required top-level fields are present as strings
|
|
98
|
+
- `allowed-tools` is a string when present
|
|
99
|
+
- `metadata` is a string-to-string object
|
|
100
|
+
|
|
101
|
+
It does not impose description, body, title, or name-length limits.
|
|
102
|
+
|
|
103
|
+
For a generated plain export surface, validate the files as written:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
node scripts/verify-skill-md-export.js --plain marketplace/skills
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Use the marketplace gate to verify shape, description limit, provenance, privacy
|
|
110
|
+
scan, and generated-surface freshness together:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
node scripts/export-marketplace-skills.js --check
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Common Failure Modes
|
|
117
|
+
|
|
118
|
+
| Failure | Fix |
|
|
119
|
+
|---|---|
|
|
120
|
+
| Required base field is missing | Fix the source identity field or the export transform. |
|
|
121
|
+
| Rich protocol metadata appears nested under `metadata` | Regenerate with `scripts/export-skill.js`; structured values must be JSON strings in the exported artifact. |
|
|
122
|
+
|
|
123
|
+
## Policy
|
|
124
|
+
|
|
125
|
+
The source `SKILL.md` remains the protocol artifact. The exported `SKILL.md`
|
|
126
|
+
file is a runtime artifact. Do not hand-edit exported files and then treat them
|
|
127
|
+
as canonical protocol sources.
|