跳到正文
FunCoding

搜索

搜索文档、Skill 和 MCP

journey-preflight

Use before any Butterbase platform-touching action (or when journey-preflight is invoked directly) to verify the user has a Butterbase account, the MCP server is connected, BUTTERBASE_API_KEY is set, and an app_id exists for this project. Re-run automatically if docs/butterbase/03-preflight.md is older than 24h or any required value is null.

AI 与智能体534skills/journey-preflight/SKILL.md

安装

把这段话发给 Claude Code、Codex 或 Cursor。智能体会先检查安全性,你确认后才安装。

读取 https://funcoding.ai/skills/butterbase-ai/butterbase-skills/journey-preflight/install.md ,按里面的步骤帮我安装这个 Skill。

SKILL.md

Butterbase Preflight

Gate that ensures the user can actually talk to the Butterbase platform before any stage tries to. Writes results to docs/butterbase/03-preflight.md and stamps app_id + api_base into 00-state.md.

When to use

  • Automatically as the first step of any journey-* build stage when 03-preflight.md is missing, older than 24 hours, or 00-state.md's app_id is null.
  • Directly via /butterbase-skills:journey-preflight when the user wants to re-verify.

Procedure

For each check, write a one-line result to 03-preflight.md (<check> ✓/✗ <note>). Ask the user to fix any ✗ before continuing — do not auto-skip failures.

  1. Butterbase account. Call mcp__butterbase__list_regions (cheapest call). Success → ✓. Auth error → ✗ with "Sign up at https://butterbase.ai, then run npx @butterbase/cli mcp install and complete the OAuth flow in your client (e.g. /mcp in Claude Code).". If MCP tool is not visible at all, jump to step 2.

  2. MCP server connected. Check whether mcp__butterbase__* tools are listed in the agent's available tools. Absent → ✗ with "Install the Butterbase MCP server: npx @butterbase/cli mcp install. See https://butterbase.ai/docs/mcp.". Present → ✓.

  3. MCP OAuth complete. Auth for mcp__butterbase__* calls is OAuth, not an env var — step 1 already proved it works if list_regions succeeded. If step 1 failed with auth error, retry after the user runs /mcp (or claude mcp login butterbase) and completes browser consent. BUTTERBASE_API_KEY (bb_sk_…) is still relevant for runtime app code (functions, server-side @butterbase/sdk) — check separately at deploy time, not here.

  4. App provisioned. Read 00-state.md front-matter for app_id.

    • Non-null and mcp__butterbase__manage_app (action get_config) succeeds → ✓.
    • Null → ask the user: "No app yet. Create one now? (yes/no — if no, you can paste an existing app_id)". On yes, call mcp__butterbase__init_app (ask for app name and region — recommend us-east-1 as default). Capture app_id and api_base from the response. Update 00-state.md front-matter.
    • User-provided app_id → verify with manage_app get_config; on success update 00-state.md.
  5. CLI installed. Run butterbase --version. If "command not found":

    • Read the Toolchain section of 02-plan.md. If CLI usage: yes (default), prompt: "Install @butterbase/cli globally now? (yes / skip)". On yes, run npm install -g @butterbase/cli. On skip, note in 03-preflight.md that the CLI is not installed and which workflows will require dashboard fallback.
    • If CLI usage: no, skip this check.

03-preflight.md format

# Preflight — <ISO date>

- account        ✓
- mcp_connected  ✓
- api_key        ✓
- app_provisioned ✓  app_id=app_abc123 region=us-east-1

Re-run with /butterbase-skills:journey-preflight.

Outputs

  • Writes/overwrites docs/butterbase/03-preflight.md.
  • Updates 00-state.md front-matter app_id, api_base, last_updated, and ticks - [x] preflight.

Anti-patterns

  • ❌ Echoing the API key value back to the user.
  • ❌ Skipping a failed check ("I'll just try anyway"). Stop and ask the user to fix it.
  • ❌ Calling init_app without confirming with the user — apps cost money on paid plans.

相似的 Skill

brand-guidelines
anthropics/skills180k

brand-guidelines

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

AI 与智能体

internal-comms
anthropics/skills180k

internal-comms

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

AI 与智能体

template-skill
anthropics/skills180k

template-skill

Replace with description of the skill and when Claude should use it.

AI 与智能体

mcp-builder
anthropics/skills180k

mcp-builder

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

AI 与智能体

algorithmic-art
anthropics/skills180k

algorithmic-art

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.

AI 与智能体

academy-guide
anthropics/skills180k

academy-guide

Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content.

AI 与智能体