construct-views-build

Builds the CONSTRUCT views SPA with Vite production builds.

Updated Apr 21, 2026
One-click install
npx skills add https://github.com/mabstruct/construct --skill construct-views-build-mabstruct
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: construct-views-build
Source: https://github.com/mabstruct/construct/tree/main/CONSTRUCT-CLAUDE-impl/claude/skills/construct-views-build
Command: npx skills add https://github.com/mabstruct/construct --skill construct-views-build-mabstruct

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires vite.

What problem does it solve? Manually compiling the CONSTRUCT views single-page application risks misconfiguration, stale artifacts, and accidental deletion of generated data files. This Skill runs the Vite production build with strict precondition checks so the SPA is rebuilt safely without wiping views/build/data/ or version.json. ## Core Features & Use Cases - Precondition Validation: Verifies the views/src/ scaffold exists, confirms vite.config.js declares emptyOutDir: false, and warns on template version mismatches before building. - Dependency Management: Detects missing node_modules and runs npm install automatically, including package-lock drift detection. - Invariant Protection: Verifies after the build that views/build/data/ and version.json survived, failing loudly if the two-writer architecture invariant is broken. - Use Case: After editing the SPA source or running views-scaffold, invoke this Skill to produce views/build/index.html and hashed assets while preserving generated data files. ## Quick Start Rebuild the views SPA for my CONSTRUCT installation and confirm the build output and data files are intact.

Frequently Asked Questions about construct-views-build

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

FAQPage Schema
How do I build the CONSTRUCT views SPA?▼

Invoke the views build skill after scaffolding with views-scaffold or after changing SPA source files. It runs npm install if needed, then npm run build in views/src/, producing views/build/index.html and hashed assets.

Why does the Vite build require emptyOutDir false?▼

Without emptyOutDir: false, Vite would wipe views/build/data/ and version.json on every build, breaking the two-writer architecture where views-generate-data owns those files. The build fails fast if this setting is missing.

Does the views build regenerate the data files?▼

No, this build never touches views/build/data/ or version.json. Data regeneration is handled separately by the views-generate-data skill or by workflow capabilities like research.run, curation.run, and daily.run.

What happens if npm install or the Vite build fails?▼

The skill fails fast with no auto-retry. An npm install failure surfaces the npm error, and a failed Vite build reports the last 30 lines of output for diagnosis.

Does the views build work on Windows or Linux?▼

The build is tested on macOS and compatible with Linux. Windows is untested in v0.2, so behavior there is not guaranteed.