This repository has four main content layers:
-
snippets/Source of truth for executable JavaScript snippets. Each category contains the browser-console code that users and agents run. -
pages/Human-facing MDX documentation published by the Nextra site. Most pages document one snippet or a related set of snippets. Editorial pages can be declared with frontmatter such astype: guide. -
skills/Generated Agent Skills built fromsnippets/andpages/. These files are not the authoring source. Regenerate them withnpm run generate-skills. -
dist/Generated readable artifacts for external consumption. These are also derived outputs, not source files.
The normal flow is:
snippets/ + pages/ -> scripts/generate-skills.js -> skills/ + dist/
Supporting files:
lib/snippets-registry.jspowers site-level snippet metadata and imports.pages/**/_meta.jsondefines sidebar navigation for each section.scripts/check-consistency.jsvalidates source-to-doc parity, editorial page declarations,_meta.jsonalignment, and published counts.
Treat these as editable source:
snippets/pages/pages/**/_meta.jsonlib/snippets-registry.jsREADME.mdSKILLS.md
Treat these as generated or derivative:
skills/dist/
- Edit or add a snippet in
snippets/. - Add or update its documentation in
pages/. - Update the relevant
_meta.json. - Run
npm run generate-skillswhen you intentionally want to refresh derived artifacts. - Run
npm run check:consistency. - Run
npm run lintandnpm run build.
Run npm run generate-skills whenever you change:
- Any file in
snippets/ - Any MDX page used to build skill descriptions or thresholds
package.jsonversion or metadata that should propagate to generated skills
Release packaging reads from generated skills/, so stale generated files can leak into release artifacts. Before a release, verify generation explicitly with:
npm run check:consistencynpm run generate-skills:check