Turn a Wren project's context layer into a shareable, browser-side GenBI web app and deploy it to the user's Vercel or Cloudflare account. Orchestrates the full flow: `wren genbi build` returns a project-hydrated build instruction, the agent authors the app from scratch into apps/<name>/, then register → verify → deploy produce a shareable URL. Use this skill whenever the user wants to: build a dashboard from their Wren project, make a shareable analytics app, deploy their context layer as a web app, host a GenBI app on Vercel or Cloudflare Pages, or asks for a 'genbi app'.
72
90%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
This guide is served by the
wrenCLI (wren skills get genbi), so it always matches your installed wrenai version.
Turn a Wren context layer into a shareable GenBI app — from a natural-language request to a public URL in one conversation.
Division of labor: the CLI owns the authoritative build instruction (it
knows the live project facts and the pinned wren-core-wasm version) and all
deterministic state (index, verify, deploy). You — the agent — author the app
code by following the instruction. Never hand-write .wren/apps.yml.
wren_project.yml in cwd/ancestors, or ask
for the path and pass -p).target/mdl.json is missing, wren genbi build compiles it implicitly — no separate step needed.wren CLI ≥ the version that ships the genbi command group
(wren genbi --help works).sales-overview).snapshot (default) — data is bundled with the app as parquet/duckdb and
queried client-side. Fully serverless. Right for demos, reports, small
data, and dlt-pipeline output.live — the app calls back to the user's warehouse/API at view time.
Right for production-scale or always-fresh data. Requires a CORS-enabled
endpoint and carries strict no-credentials rules.wren genbi build <name> --prompt "<the user's request, verbatim>" --data-mode <mode>For long or multi-line prompts use --prompt-file <file> or pipe to
--prompt -. The command prints the authoritative build instruction —
wasm wiring (pinned version, CDN load), the project's model/column inventory,
data-mode guidance, acceptance criteria, and the target folder. It writes no
app files — the only thing it may touch is target/mdl.json, which it compiles
first if missing (see Precondition 2).
Follow the instruction exactly. Key conventions:
apps/<name>/ — never outside it.apps/<name>/mdl.json.wren-core-wasm from the CDN given in the instruction; never bundle
the ~68MB binary.apps/<name>/data/ as
parquet (verify requires at least one .parquet/.duckdb asset). See
Snapshot data export below for the recipe and where the data comes from.verify scans for them (best-effort) and deploy gates on verify, but
the rule is on you: a public static host exposes every shipped file.The CLI hands you the build instruction, but the snapshot bytes still have to be exported into the app folder — that step is yours.
Where the data comes from:
dlt-connector
skill — its pipelines always land in a .duckdb file): the project's DuckDB
file is your snapshot source. If the user is connecting SaaS data (HubSpot,
Stripe, Salesforce, …) and has no project yet, run the SaaS→project flow
first: wren skills get dlt-connector. Then come back here to ship it.live mode for large or always-fresh data.Recipe (DuckDB → parquet):
# from the project root; <db> is the project's DuckDB file (see wren_project.yml)
python - <<'PY'
import duckdb
con = duckdb.connect("<db>.duckdb", read_only=True)
con.execute(
"COPY (SELECT * FROM <table>) "
"TO 'apps/<name>/data/<table>.parquet' (FORMAT parquet)"
)
PYOnly export the columns/rows the dashboard uses. The compiled mdl.json you
copied in keeps the context layer intact regardless of how you bundle data.
wren genbi register <name> --data-mode <mode>
wren genbi verify <name>If verify fails: fix the reported problems and re-run verify. Do NOT proceed
to deploy on a failed verify. Offer wren genbi open <name> for a local
preview before shipping.
wren genbi deploy <name> --provider vercel # or cloudflare--prod.VERCEL_TOKEN / CLOUDFLARE_API_TOKEN from the
environment or .env files. If missing, ask the user to export it or add
it to the project .env. NEVER put a token on the command line.CLOUDFLARE_ACCOUNT_ID (env or .env), a token
scoped with Pages:Edit, and the wrangler CLI on PATH (or npx available)
— the adapter shells out to wrangler pages deploy. If it's missing, ask
the user to npm install -g wrangler.New Vercel projects ship with Vercel Authentication turned ON by default, so every deployment — preview and production — returns 401 to anyone not logged into the owning Vercel account/team. The deploy itself succeeded; the URL is just gated.
wren genbi deploy; it's a one-time toggle per
project in Vercel.verify
scans for inlined credentials, but treat it as best-effort
defense-in-depth, not a guarantee — never rely on it to catch a secret
you shouldn't have written in the first place.wren genbi register/remove — never edit
.wren/apps.yml by hand.| Step | Command |
|---|---|
| Get build instruction | wren genbi build <name> --prompt "…" [--data-mode snapshot|live] |
| Record the app | wren genbi register <name> --data-mode <mode> |
| Preflight | wren genbi verify <name> |
| Local preview | wren genbi open <name> |
| Ship | wren genbi deploy <name> --provider vercel|cloudflare [--prod] |
| Inventory | wren genbi list / wren genbi remove <name> |
7830cc7
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.