sbuilder-codegen

Regenerates and validates the committed API catalog from a web_builder platform checkout.

Updated Aug 28, 2026
One-click install
npx skills add https://github.com/vuluu2k/sbuilder-mcp --skill sbuilder-codegen-vuluu2k
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: sbuilder-codegen
Source: https://github.com/vuluu2k/sbuilder-mcp/tree/main/.claude/skills/sbuilder-codegen
Command: npx skills add https://github.com/vuluu2k/sbuilder-mcp --skill sbuilder-codegen-vuluu2k

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? The committed catalog of platform operations, elements, and config vocabularies goes stale silently because npm run codegen is a manual step, and regenerating against an unpublished or mid-edit checkout bakes half-finished platform work into the catalog that agents read. ## Core Features & Use Cases - Drift Detection: codegen:check exits 1 naming every stale generated file, comparing the catalog against a published web_builder checkout. - Published-Checkout Refusals: The generator refuses checkouts with uncommitted changes or unpushed commits in the five directories it reads, with --dirty as the deliberate override. - Shape and Vocabulary Readers: scripts/shapes.ts recovers request body structs from Go handler decode sites, and vocabulary readers join config keys to their legal values from Go normalizers and element VOCAB declarations. - Use Case: After the platform ships a new element or operation, run WB_REPO=<scratch>/wb npm run codegen against a detached worktree of origin/main to regenerate src/catalog/*.generated.ts and update the pinned counts in tests and READMEs. ## Quick Start Run the codegen check against a detached published web_builder worktree and regenerate the catalog if it reports stale files.

Frequently Asked Questions about sbuilder-codegen

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I regenerate the sbuilder-mcp catalog from web_builder?▼

Create a detached worktree at origin/main with git worktree add, symlink node_modules in, then run WB_REPO=<path> npm run codegen. Run codegen:check first to see which generated files are stale without writing anything.

Why does codegen refuse my web_builder checkout?▼

The generator refuses checkouts with uncommitted changes or commits not on any remote branch in the five directories it reads, because the catalog must describe deployed platforms only. Use a detached worktree of origin/main, or pass --dirty as a deliberate override.

What does it mean when codegen:check exits 1?▼

It means the catalog is stale against the checkout and the output names every file that would change. Regenerate with npm run codegen, then update the counts pinned in test/readme-counts.test.ts and both READMEs rather than loosening assertions.

Why do undocumented route warnings not fail codegen:check?▼

Undocumented routes and inert-on-add drift warn without failing because they cannot be fixed by regenerating this catalog. The fix is upstream: annotate the routes, run swag init in web_builder/server, commit server/docs, then regenerate.

How are request body shapes recovered when swagger lacks them?▼

scripts/shapes.ts reads the handler decode site, resolves the named struct out of server/internal, and emits REQUEST_SHAPES. Structs are keyed by directory rather than package name, and nested structs are expanded one level.