跳到正文
cccskills
免费在 GitHub 公开

genbi

Build an analytics web app from a Wren project's data definitions and business context. Create charts and tables, validate the app, and deploy to Vercel or Cloudflare with a checked URL for sharing.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

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'.

集成工具VercelCloudflare
查看安装方法

适用场景

  • Building a sales dashboard from a Wren project
  • Sharing a report with bundled data
  • Creating an analytics app that fetches current data
  • Deploying an analytics app to Vercel or Cloudflare

包含的文件(1)

  • SKILL.md8.0 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Wren GenBI App — Agent Workflow Guide

This guide is served by the wren CLI (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.

Preconditions

  1. A Wren project is discoverable (wren_project.yml in cwd/ancestors, or ask for the path and pass -p).
  2. The context layer exists. If target/mdl.json is missing, wren genbi build compiles it implicitly — no separate step needed.
  3. wren CLI ≥ the version that ships the genbi command group (wren genbi --help works).

Workflow

1. Resolve the app name and data mode

  • App name: short kebab-case derived from the request (e.g. sales-overview).
  • Data mode:
    • 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.
  • Ask the user ONLY if the choice is genuinely ambiguous.

2. Get the build instruction

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).

3. Author the app

Follow the instruction exactly. Key conventions:

  • Write everything under apps/<name>/ — never outside it.
  • Copy the compiled MDL into the app as apps/<name>/mdl.json.
  • Load wren-core-wasm from the CDN given in the instruction; never bundle the ~68MB binary.
  • snapshot: export the data the dashboard needs into 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.
  • live: write an endpoint-only connection config. NEVER inline credentials — 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.
  • Design the dashboard to actually answer the user's request: pick the right charts/tables for the question, not a generic template.

Snapshot data export

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:

  • DuckDB-backed project (incl. anything loaded by the 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.
  • Warehouse-backed project (Postgres, BigQuery, Snowflake, …): run the query/queries the dashboard needs through the MDL layer and write the result to parquet. Keep snapshots small — snapshot mode is for demos/reports, not full warehouse extracts; use 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)"
)
PY

Only 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.

4. Register and verify

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.

5. Deploy (only if the user asked for it)

wren genbi deploy <name> --provider vercel      # or cloudflare
  • Preview deployment by default. Confirm with the user before --prod.
  • Tokens: the CLI discovers 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 also needs 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.
  • Report the returned URL to the user. Re-deploying the same app updates the same provider target.
  • Verify the URL actually loads. After deploying, fetch the URL — a successful deploy can still return HTTP 401/403 to outsiders because of the provider's access protection (see below). Don't report a link as "shareable" until you've confirmed it serves.

Vercel Deployment Protection (the 401 trap)

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.

  • To make the app publicly shareable, the user disables it in the Vercel dashboard: Project → Settings → Deployment Protection → Vercel Authentication → Disabled (or scope it to production only). This setting is not controllable from wren genbi deploy; it's a one-time toggle per project in Vercel.
  • If the user only needs a private link (viewable while logged into their Vercel account), leaving protection on is fine — just tell them the link won't work for logged-out visitors.

Safety boundaries

  • Never inline secrets/credentials into app files — the deploy target is a public static host; anyone with the URL can read every file. 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.
  • Never pass tokens as CLI flags; they leak into shell history.
  • Confirm before production deploys.
  • All index state goes through wren genbi register/remove — never edit .wren/apps.yml by hand.

Quick reference

StepCommand
Get build instructionwren genbi build <name> --prompt "…" [--data-mode snapshot|live]
Record the appwren genbi register <name> --data-mode <mode>
Preflightwren genbi verify <name>
Local previewwren genbi open <name>
Shipwren genbi deploy <name> --provider vercel|cloudflare [--prod]
Inventorywren genbi list / wren genbi remove <name>

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Import SaaS data into DuckDB using dlt, a data loading tool, then generate a Wren project with table definitions and relationships. Verify the setup with real SQL queries, or start from an existing DuckDB file.

中文简介正在准备中。当前显示英语简介。

  • Importing HubSpot or Stripe data for SQL analysis
  • Creating a Wren project from an existing dlt DuckDB file
  • Generating table definitions and parent-child relationships
Canner/WrenAI1.8万2026年10月16日 更新

Add business knowledge missing from a Wren project's database definitions. Compare source documents with existing context, then add explanations, rules, SQL examples, and proposed metrics through guided questions or an automatic mode with an audit report.

中文简介正在准备中。当前显示英语简介。

  • Documenting status codes, units, and NULL meanings
  • Adding business knowledge from handbooks and glossaries
  • Defining aggregation metrics such as ARR or DAU
Canner/WrenAI1.8万2026年10月16日 更新

Create a Wren MDL project, a model layer for database queries, from an existing database. Discover tables and relationships, normalize column types, generate YAML files, and validate and build the project before indexing its schema.

中文简介正在准备中。当前显示英语简介。

  • Create a Wren project from an existing database
  • Add selected schemas and tables as a new data source
  • Define model relationships from database constraints
Canner/WrenAI1.8万2026年10月16日 更新

Set up Wren Engine through guided steps covering environment checks, installation, database connection, and project creation. Prepare data definitions and validate the setup, then suggest initial questions to help the user begin exploring their data.

中文简介正在准备中。当前显示英语简介。

  • Installing Wren Engine for the first time
  • Connecting a new database to Wren
  • Creating a project and preparing data definitions
Canner/WrenAI1.8万2026年10月16日 更新

usage

免费

Answer business data questions with Wren CLI by checking model definitions, reusing past queries, and executing SQL or predefined aggregations. The workflow also covers query verification, error diagnosis, and saving successful queries for future use.

中文简介正在准备中。当前显示英语简介。

  • Analyze monthly revenue trends
  • Rank customers by purchase value
  • Compare metrics across plans or regions
Canner/WrenAI1.8万2026年10月16日 更新

wren

免费

Find the Wren CLI workflow for answering data questions, connecting databases or SaaS sources, generating model definitions, adding business metrics, or building a shareable analytics app. Guides are retrieved from the installed CLI version.

中文简介正在准备中。当前显示英语简介。

  • Set up Wren and connect a database
  • Load HubSpot or Stripe data through dlt
  • Generate model definitions and add business metrics
Canner/WrenAI1.8万2026年10月16日 更新

查看 Canner 的全部技能

报告此技能的问题