prefecthq/prefab · Archived

prefab-dev-build

How to build and preview renderer/playground changes locally. Use this skill when modifying the renderer (themes, components, styles), the playground (theme picker, examples), or any Python source that needs to appear in the playground. Covers the build pipeline, common pitfalls, and how to iterate.

First seen Apr 30, 2026

Installation

$ npx skills add prefecthq/prefab --skill prefab-dev-build

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from prefecthq/prefab.

npx skills add prefecthq/prefab

Browse all from prefecthq/prefab

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 499
License LICENSE
Default branch main
Open issues 47
Status Archived

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,334 B
  • docs SUMMARY.md 324 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Building and Previewing Renderer/Playground Changes

The One Command

After changing renderer source, Python source, or playground code:

uv run prefab dev build-docs

This is the only command you should use. It orchestrates the full pipeline with smart caching (only rebuilds what changed). Never run raw npm build commands (npm run build:playground, npm run build:renderer) directly — they skip critical steps.

What the Pipeline Does

  1. Renderer build (if TS source changed) — npm run build:renderer builds the

code-split ESM bundle for CDN delivery (the primary renderer artifact)

  1. Python bundle generation — serializes all src/prefab_ui/**/*.py into

renderer/src/playground/bundle.json for Pyodide

  1. Playground build (if playground source changed) — runs Vite with

VITELOCALPLAYGROUND=1 so the Python bundle is inlined

  1. Copy to docs/ — puts built files where prefab playground and

mintlify dev expect them

Note: build-docs builds the CDN renderer. The bundled single-file renderer (airgapped fallback) is built separately via prefab dev build-renderers.

Previewing

# Start the playground (serves from docs/)
uv run prefab playground

# Or start the full docs site
mintlify dev --dir docs

The playground runs on port 5174 by default.

Common Mistakes

"attempted to install wheel before downloading it" — the playground was built without VITELOCALPLAYGROUND=1. This happens when you run npm run build:playground directly instead of prefab dev build-docs. Fix: run the full pipeline.

Playground shows stale Python code — bundle.json is stale. The full pipeline regenerates it; raw npm commands don't.

Renderer changes not visible in deploy previews — deploy previews load chunks from the CDN (@latest), not from the branch. Test renderer changes locally.

Reference

Full build and release details: dev-docs/build-pipeline.md