$npx -y skills add butterbase-ai/butterbase-skills --skill journey-docsUse as the docs-priming stage of the Butterbase journey, immediately after journey-preflight and before the first build stage. Reads the plan to discover which capabilities the app uses, calls butterbase_docs once per relevant topic, and caches a summary the build stages can re-r
| 1 | # Journey Docs Gate |
| 2 | |
| 3 | A short, mechanical priming step. The goal is that every downstream stage starts with the relevant docs already in the conversation, so the model doesn't invent API shapes. |
| 4 | |
| 5 | ## When to use |
| 6 | |
| 7 | Invoke automatically after `journey-preflight` returns. Also invoke standalone (`/butterbase-skills:journey-docs`) any time the user changes the plan or you realize a stage is using a capability you haven't refreshed this session. |
| 8 | |
| 9 | ## Procedure |
| 10 | |
| 11 | 1. **Read the plan.** Open `docs/butterbase/02-plan.md`. Identify every Butterbase capability in use (Tables → schema; RLS → auth; Auth → auth; Storage → storage; Functions → functions; AI → ai; RAG → rag; Realtime → realtime; Durable → functions; Frontend → frontend; Integrations → integrations; Substrate → substrate; Payments → billing). |
| 12 | |
| 13 | 2. **Call `butterbase_docs` per topic.** For each unique topic from step 1, call `butterbase_docs` with that `topic` argument. Skip duplicates. |
| 14 | |
| 15 | 3. **Write the cache file.** Create `docs/butterbase/03b-docs-cache.md` with this structure: |
| 16 | |
| 17 | ```markdown |
| 18 | --- |
| 19 | primed_at: <ISO timestamp> |
| 20 | topics: [<comma-separated list>] |
| 21 | --- |
| 22 | |
| 23 | # Docs Cache |
| 24 | |
| 25 | ## <topic-1> |
| 26 | <one-paragraph summary of what the MCP doc says — key endpoints, common patterns, gotchas> |
| 27 | URL: https://docs.butterbase.ai/<area> |
| 28 | |
| 29 | ## <topic-2> |
| 30 | ... |
| 31 | ``` |
| 32 | |
| 33 | 4. **Update `00-state.md`.** Tick the `docs` row. |
| 34 | |
| 35 | 5. **Return.** One-line summary: `"Primed docs for: schema, auth, storage, functions. Cache at docs/butterbase/03b-docs-cache.md."` |
| 36 | |
| 37 | ## Anti-patterns |
| 38 | |
| 39 | - ❌ Calling `butterbase_docs` with `topic: "all"`. Burns context. Call once per relevant topic instead. |
| 40 | - ❌ Skipping the cache file. Other stages re-read it; in-memory only doesn't survive context compression. |
| 41 | - ❌ Calling for topics not in the plan. We're priming, not exhaustive. |