/journey-frontend
Use as the frontend build stage of the Butterbase journey. Implements the Frontend section of 02-plan.md by delegating to deploy-frontend. Scaffolds (if needed) and deploys via create_frontend_deployment + manage_frontend (start_deployment). Sets VITE_API_URL and VITE_APP_ID
$ npx -y skills add butterbase-ai/butterbase-skills --skill journey-frontend --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/journey-frontend
Context preview
The summary Claude sees to decide when to auto-load this skill.
Use as the frontend build stage of the Butterbase journey. Implements the Frontend section of 02-plan.md by delegating to deploy-frontend. Scaffolds (if needed) and deploys via create_frontend_deployment + manage_frontend (start_deployment). Sets VITE_API_URL and VITE_APP_ID
SKILL.md
journey-frontend.SKILL.mdname: journey-frontend
description: Use as the frontend build stage of the Butterbase journey. Implements the Frontend section of 02-plan.md by delegating to deploy-frontend. Scaffolds (if needed) and deploys via create_frontend_deployment + manage_frontend (start_deployment). Sets VITE_API_URL and VITE_APP_ID env. Skipped if the plan is API-only.
Journey: Frontend
Stage 3j of the guided journey. Build (or adopt) and deploy the frontend.
When to use
- Dispatched by `journey` when `current_stage: frontend`.
- Directly via `/butterbase-skills:journey-frontend`.
- Skipped (annotated `(n/a)`) if `frontend_stack: none` in `00-state.md`.
Preflight
If `docs/butterbase/03-preflight.md` is missing, older than 24 hours, or `00-state.md` has `app_id: null`, invoke `butterbase-skills:journey-preflight` first. Wait for it to return successfully before proceeding.
Inputs
- `docs/butterbase/02-plan.md` — the Frontend section.
- `docs/butterbase/00-state.md` — for `app_id`, `api_base`, `frontend_stack`.
Procedure
0. **Refresh docs.** Call `butterbase_docs` with `topic: "frontend"`. For framework-specific deploy patterns, also WebFetch `https://docs.butterbase.ai/frontend`. Skip if cache is fresh.
Use `@butterbase/sdk`
Any frontend that talks to the deployed Butterbase app should use `@butterbase/sdk`:
- Install: `npm install @butterbase/sdk` inside the frontend project.
- Initialize: `import { createClient } from '@butterbase/sdk'; const bb = createClient({ apiUrl: import.meta.env.VITE_API_URL, appId: import.meta.env.VITE_APP_ID });`
- Auth: `bb.auth.signInWithOAuth({ provider: 'google' })`, `bb.auth.signOut()`, `bb.auth.getSession()`.
- Data: `bb.db.from('posts').select('*').eq('user_id', userId)`.
- Storage: `bb.storage.upload(file)`, persist the returned `object_id`, resolve download URLs via the SDK at render time.
- Realtime: `bb.realtime.from('posts').on('insert', cb).subscribe()`.
Do NOT hand-roll `fetch()` against the REST API in a Butterbase frontend — the SDK handles auth headers, presigned URL refresh, realtime reconnection, and type-narrowing. The MCP tools are not for runtime code.
For framework-specific patterns (Next.js Server Components, SvelteKit load functions, etc.), call `butterbase_docs` with `topic: "sdk"`.
Build and deploy
1. Read the Frontend section and `frontend_stack` from `00-state.md`. Print: `"About to deploy a <stack> frontend for app_id <id>. Proceed?"`. Wait for `yes`. 2. Invoke `butterbase-skills:deploy-frontend` via the Skill tool with the frontend spec, `app_id`, and `api_base`. The wrapped skill scaffolds (if no `package.json` exists in `./web` or chosen path), sets `VITE_API_URL` and `VITE_APP_ID`, builds, calls `create_frontend_deployment`, then `manage_frontend action: start_deployment`. 3. Capture the live URL from the response. Show it to the user. 4. Append one line to `docs/butterbase/04-build-log.md`: `<ISO timestamp> frontend manage_frontend <live-url> ok` 5. Also write the live URL into a new `deployed_url:` field in `00-state.md` front-matter. 6. Tick `- [x] frontend` in `00-state.md`, set `current_stage: deploy`. 7. Return to `journey` orchestrator (or ask `"Continue to deploy verification? (yes/no)"`).
Outputs
- Live deployed frontend URL.
- `deployed_url:` in `00-state.md`.
- One line in `04-build-log.md`.
Anti-patterns
- ❌ Forgetting to set `VITE_API_URL` and `VITE_APP_ID` — frontend will load blank.
- ❌ Wrong MIME types — let `deploy-frontend` handle the bundling; do not hand-roll.
Read more
name: journey-frontend description: Use as the frontend build stage of the Butterbase journey. Implements the Frontend section of 02-plan.md by delegating to deploy-frontend. Scaffolds (if needed) and deploys via create_frontend_deployment + manage_frontend (start_deployment). Sets VITE_API_URL and VITE_APP_ID env. Skipped if the plan is API-only.
Journey: Frontend
Stage 3j of the guided journey. Build (or adopt) and deploy the frontend.
When to use
- Dispatched by `journey` when `current_stage: frontend`.
- Directly via `/butterbase-skills:journey-frontend`.
- Skipped (annotated `(n/a)`) if `frontend_stack: none` in `00-state.md`.
Preflight
If `docs/butterbase/03-preflight.md` is missing, older than 24 hours, or `00-state.md` has `app_id: null`, invoke `butterbase-skills:journey-preflight` first. Wait for it to return successfully before proceeding.
Inputs
- `docs/butterbase/02-plan.md` — the Frontend section.
- `docs/butterbase/00-state.md` — for `app_id`, `api_base`, `frontend_stack`.
Procedure
0. **Refresh docs.** Call `butterbase_docs` with `topic: "frontend"`. For framework-specific deploy patterns, also WebFetch `https://docs.butterbase.ai/frontend`. Skip if cache is fresh.
Use `@butterbase/sdk`
Any frontend that talks to the deployed Butterbase app should use `@butterbase/sdk`:
- Install: `npm install @butterbase/sdk` inside the frontend project.
- Initialize: `import { createClient } from '@butterbase/sdk'; const bb = createClient({ apiUrl: import.meta.env.VITE_API_URL, appId: import.meta.env.VITE_APP_ID });`
- Auth: `bb.auth.signInWithOAuth({ provider: 'google' })`, `bb.auth.signOut()`, `bb.auth.getSession()`.
- Data: `bb.db.from('posts').select('*').eq('user_id', userId)`.
- Storage: `bb.storage.upload(file)`, persist the returned `object_id`, resolve download URLs via the SDK at render time.
- Realtime: `bb.realtime.from('posts').on('insert', cb).subscribe()`.
Do NOT hand-roll `fetch()` against the REST API in a Butterbase frontend — the SDK handles auth headers, presigned URL refresh, realtime reconnection, and type-narrowing. The MCP tools are not for runtime code.
For framework-specific patterns (Next.js Server Components, SvelteKit load functions, etc.), call `butterbase_docs` with `topic: "sdk"`.
Build and deploy
1. Read the Frontend section and `frontend_stack` from `00-state.md`. Print: `"About to deploy a <stack> frontend for app_id <id>. Proceed?"`. Wait for `yes`. 2. Invoke `butterbase-skills:deploy-frontend` via the Skill tool with the frontend spec, `app_id`, and `api_base`. The wrapped skill scaffolds (if no `package.json` exists in `./web` or chosen path), sets `VITE_API_URL` and `VITE_APP_ID`, builds, calls `create_frontend_deployment`, then `manage_frontend action: start_deployment`. 3. Capture the live URL from the response. Show it to the user. 4. Append one line to `docs/butterbase/04-build-log.md`: `<ISO timestamp> frontend manage_frontend <live-url> ok` 5. Also write the live URL into a new `deployed_url:` field in `00-state.md` front-matter. 6. Tick `- [x] frontend` in `00-state.md`, set `current_stage: deploy`. 7. Return to `journey` orchestrator (or ask `"Continue to deploy verification? (yes/no)"`).
Outputs
- Live deployed frontend URL.
- `deployed_url:` in `00-state.md`.
- One line in `04-build-log.md`.
Anti-patterns
- ❌ Forgetting to set `VITE_API_URL` and `VITE_APP_ID` — frontend will load blank.
- ❌ Wrong MIME types — let `deploy-frontend` handle the bundling; do not hand-roll.
Claude Code plugin for Butterbase — the AI-Native Backend-as-a-Service. This plugin gives Claude deep knowledge of Butterbase's 42+ MCP tools, guides you through common workflows, and auto-configures the MCP server connection.
Repo: butterbase-ai/butterbase-skills
Other skills on butterbase-skills.
- /agents
Use when designing, deploying, or debugging a Butterbase Agent (declarative LLM/tool graph), registering an MCP server for tool use, or wiring access controls and rate limits. Agents are first-class app resources defined by a `graph_spec` and invoked over
Open skill - /ai
Use when calling the app's AI gateway from agent tools — chat completions, embeddings, listing models, configuring defaults or BYOK, reading token/cost usage
Open skill - /auth-setup
Use when configuring OAuth providers (Google/GitHub/Apple/X/etc.), setting up post-login auth hooks, tuning JWT lifetimes, or generating service API keys
Open skill - /build-app
Use when building a new Butterbase app from scratch, creating a full-stack application, or when the user asks to set up a complete backend with database, auth, and deployment
Open skill - /contributing
Use when contributing to the Butterbase codebase, adding new MCP tools, creating API routes, writing migrations, or understanding the monorepo architecture
Open skill - /debug-rls
Use when users report access denied errors, see wrong data, RLS policies are not working, or when troubleshooting Row-Level Security issues in Butterbase
Open skill

