A skill your agent uses when calling the app's AI gateway from agent tools — chat completions, embeddings, listing models, configuring defaults or BYOK, reading token/cost usage

MITAuto-check passedAI & LLM Engineering

Install AI

skills CLI
$ npx skills add butterbase-ai/butterbase-skills --skill ai -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install butterbase-ai/butterbase-skills ai --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/butterbase-ai/butterbase-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/ai .claude/skills/ai && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ai
GitHub stars
534
Token cost
~1.1k tokens
SKILL.md length
385 words
Files
1
Skills in repo
39
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when calling the app's AI gateway from agent tools — chat completions, embeddings, listing models, configuring defaults or BYOK, reading token/cost usage

  • Works in 8 steps: Chat → Embed → List models → …
  • Calling the apps AI gateway from agent tools — chat completions
  • SKILL.md covers 1. Chat, 2. Embed, 3. List models and 4. Configure, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

AI is an agent skill from butterbase-ai/butterbase-skills. Use when calling the app's AI gateway from agent tools — chat completions, embeddings, listing models, configuring defaults or BYOK, reading token/cost usage

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering Embeddings, LLM API integration and LLM cost and token optimization. The repository describes itself as: Plugin for Butterbase.ai. The licence is MIT.

When your agent uses it

  • Calling the apps AI gateway from agent tools — chat completions
  • Configuring defaults
  • Reading token/cost usage

Example prompts

  • “/ai”

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Chat
  2. Embed
  3. List models
  4. Configure
  5. Usage
  6. Common pitfalls
  7. What this skill does NOT cover
  8. Decisions (typed classification)

What it can do on your machine

Read from SKILL.md and the folder at commit aa8ae69. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

AI loads about 1.1k tokens when it runs. Until then it costs about 40 tokens; SKILL.md has 385 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~40
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from butterbase-ai/butterbase-skills at commit aa8ae69, republished under its MIT licence (© butterbase-ai). 385 words, ~1,112 tokens.

Download SKILL.mdSave it as .claude/skills/ai/SKILL.md (or your agent's skills folder).
name
ai
description
Use when calling the app's AI gateway from agent tools — chat completions, embeddings, listing models, configuring defaults or BYOK, reading token/cost usage

Butterbase AI Gateway

Every app has an LLM gateway with chat, embeddings, model listing, configuration, and usage reporting. One umbrella tool: manage_ai.

ActionWhat it doesReturns
chatSynchronous chat completion (no streaming)OpenAI-shaped { choices: [...] }
embedVector embeddings for string or string[]OpenAI-shaped { data: [{ embedding: [...] }] }
list_modelsAvailable models with capabilities{ models: AiModel[] }
get_configCurrent AI config (default model, BYOK key flag, etc.)AiConfig
update_configSet defaults, allowed models, max tokens, BYOKAiConfig
get_usageToken + cost aggregate over a windowusage record

1. Chat

manage_ai({
  action: "chat",
  app_id,
  messages: [
    { role: "system", content: "You are a helpful assistant." },
    { role: "user",   content: "What's RAG?" }
  ],
  model: "openai/gpt-4o-mini",     // optional — falls back to app's default
  temperature: 0.2,                // optional
  max_tokens: 500                  // optional
})

This action sets stream: false deliberately — agent tools don't stream. If you need partial-token deltas, drive the SDK's ai.chatStream(…) from inside a function or DO instead.

messages[].content can be a string or an array of content parts ({ type: "text", text }, { type: "image_url", image_url: {...} }, { type: "video_url", video_url: {...} }).


2. Embed

manage_ai({
  action: "embed",
  app_id,
  input: "hello world",            // or ["a", "b", "c"]
  model: "openai/text-embedding-3-small",   // optional
  encoding_format: "float"          // or "base64"
})

3. List models

manage_ai({ action: "list_models", app_id })
// → { models: [{ id, provider, capabilities: ["chat", "embed", ...], context_window, pricing }, ...] }

Use this to discover what the app can call — capabilities + context window matter when picking a model.


4. Configure

manage_ai({
  action: "update_config",
  app_id,
  config: {
    defaultModel: "openai/gpt-4o-mini",
    allowedModels: ["openai/gpt-4o-mini", "anthropic/claude-haiku-4-5"],
    maxTokensPerRequest: 4000,
    byokKey: "..." // optional — rotates the customer-supplied OpenRouter / Anthropic key
  }
})
  • maxTokensPerRequest is server-clamped to 1–100000.
  • allowedModels is a whitelist — empty means all models the provider exposes.
  • Setting byokKey switches the app to route through that customer key. Clear it by passing byokKey: "" (returns to platform pool).

5. Usage

manage_ai({
  action: "get_usage",
  app_id,
  startDate: "2026-05-01",
  endDate:   "2026-05-31"
})

Returns aggregate token counts + cost. Useful for billing reconciliation, spending-cap diagnostics, and showing dashboards.


Show full SKILL.md (180 more words)Show less

6. Common pitfalls

  • Trying to stream from a tool — manage_ai is synchronous. Use the SDK inside a function for streamed deltas.
  • Sending stream: true in the body — the tool ignores it; always wired to false.
  • Hardcoding model — better to omit, let the app's defaultModel win, and surface that knob via update_config.
  • Skipping list_models before suggesting one — model availability shifts; verify before recommending.

7. What this skill does NOT cover

  • Streaming chat — use the SDK (ai.chatStream) inside a function or DO.
  • Vector storage / retrieval — see butterbase-skills:rag-dev (RAG collections wrap embeddings + search together).
  • AI in deployed functions — they import @butterbase/sdk and call client.ai.* directly; no MCP needed at runtime.

8. Decisions (typed classification)

For routing, classification, moderation or scoring, where code needs a choice / yes-no / score with probabilities, use manage_ai action: "decide" (SDK ai.decide) with a decision model (default typesafe/jev-1.13) instead of asking a chat model for JSON. It is cheaper, faster and returns typed probabilities. Full reference: butterbase_docs topic ai, "Decision models".


If a docs/butterbase/00-state.md exists in the working directory, prefer invoking via /butterbase-skills:journey-ai so the journey orchestrator stays in sync.

© butterbase-ai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/ai of butterbase-ai/butterbase-skills.

Open the folder on GitHubat commit aa8ae69

Compare with similar skills

AI next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

AI compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
AI this skillbutterbase-ai/butterbase-skills534—~1.1kAutomated safety check: PassMIT
Fastllm Gatewayazrtydxb/Fastllm-proxy108—~926Automated safety check: PassApache-2.0
LLM Cost Optimizationsickn33/agentic-awesome-skills47k1 repos~2.5kAutomated safety check: PassMIT
Unified LLM APIPrism-Shadow/penguin-harness2.5k—~6.7kAutomated safety check: PassApache-2.0
Gemini Live APIgoogle/skills21k—~2.5kAutomated safety check: NotesApache-2.0
RAG Architectalirezarezvani/claude-skills28k—~1.1kAutomated safety check: PassMIT

Similar skills

  • Fastllm Gateway

    azrtydxb/Fastllm-proxy

    Send inference requests through the FastLLM OpenAI-compatible gateway — chat completions, completions, embeddings, rerank, score, responses, moderations, audio speech and transcription, image…

    108 GitHub stars~926 tokensUpdated 4 days ago
    AI & LLM EngineeringAuto-check passed
  • LLM Cost Optimization

    sickn33/agentic-awesome-skills

    Reduce LLM API and infrastructure costs through model selection, prompt caching, batching, caching, quantization, and self-hosting strategies.

    47k GitHub starsUsed in 1 repo~2.5k tokens
    AI & LLM EngineeringAuto-check passed
  • Unified LLM API

    Prism-Shadow/penguin-harness

    Call model APIs through @prismshadow/mmsp (MMSP) — streaming text generation, image generation, speech synthesis, embeddings and the supported-model registry with one client.

    2.5k GitHub stars~6.7k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • Gemini Live API

    google/skills

    Official

    Generates a Gemini LiveAPI client service class in the user's chosen programming language.

    21k GitHub stars~2.5k tokensUpdated today
    AI & LLM EngineeringAuto-check: notes
  • RAG Architect

    alirezarezvani/claude-skills

    A skill your agent uses when the user asks to design a RAG pipeline, choose a chunking strategy or embedding model, pick a vector database, or evaluate retrieval quality (precision@k, recall@k, NDCG).

    28k GitHub stars~1.1k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • Cost Aware LLM Pipeline

    aAAaqwq/AGI-Super-Team

    Cost optimization patterns for LLM API usage — model routing by task complexity, budget tracking, retry logic, and prompt caching.

    105 GitHub starsUsed in 5 repos~1.4k tokens
    AI & LLM EngineeringAuto-check passed

More from butterbase-ai/butterbase-skills

All 39 skills in this repo
  • Auth Setup

    butterbase-ai/butterbase-skills

    A skill your agent uses when configuring OAuth providers (Google/GitHub/Apple/X/etc.), setting up post-login auth hooks, tuning JWT lifetimes, or generating service API keys

    534 GitHub stars~2.2k tokensUpdated 4 days ago
    Auto-check passed
  • Build App

    butterbase-ai/butterbase-skills

    A skill your agent uses 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

    534 GitHub stars~4.9k tokensUpdated 4 days ago
    Auto-check passed
  • Contributing

    butterbase-ai/butterbase-skills

    A skill your agent uses when contributing to the Butterbase codebase, adding new MCP tools, creating API routes, writing migrations, or understanding the monorepo architecture

    534 GitHub stars~1.5k tokensUpdated 4 days ago
    Auto-check passed
  • Debug Rls

    butterbase-ai/butterbase-skills

    A skill your agent uses when users report access denied errors, see wrong data, RLS policies are not working, or when troubleshooting Row-Level Security issues in Butterbase

    534 GitHub stars~3.5k tokensUpdated 4 days ago
    Auto-check passed
  • Deploy Frontend

    butterbase-ai/butterbase-skills

    A skill your agent uses when deploying a frontend (React, Next.js, or static HTML) to a live URL on Butterbase, or when troubleshooting deployment issues like MIME type errors or blank pages

    534 GitHub stars~2.8k tokensUpdated 4 days ago
    Auto-check passed
  • Durable Objects

    butterbase-ai/butterbase-skills

    A skill your agent uses when building stateful per-key actors — chat rooms, multiplayer rooms, rate limiters, long-running agents, leaderboards — that need persistent in-memory + storage state…

    534 GitHub stars~2.8k tokensUpdated 4 days ago
    Auto-check passed

Questions about AI

What does AI do?

A skill your agent uses when calling the app's AI gateway from agent tools — chat completions, embeddings, listing models, configuring defaults or BYOK, reading token/cost usage. AI is an agent skill from butterbase-ai/butterbase-skills.

When should I use AI?

AI fits situations like: calling the apps AI gateway from agent tools — chat completions; configuring defaults; reading token/cost usage.

How do I install AI in Claude Code?

Run `npx skills add butterbase-ai/butterbase-skills --skill ai -a claude-code`. Or copy the skill folder (skills/ai in butterbase-ai/butterbase-skills) into .claude/skills/ai in your project. Claude Code loads it when a task matches its description.

How do I install AI in Codex?

Run `npx skills add butterbase-ai/butterbase-skills --skill ai -a codex`. Or copy the skill folder (skills/ai in butterbase-ai/butterbase-skills) into .agents/skills/ai in your project. Codex loads it when a task matches its description.

Can I use AI in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add butterbase-ai/butterbase-skills --skill ai -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ai, .gemini/skills/ai, .github/skills/ai and .opencode/skills/ai in your project.

What does AI need to run?

SKILL.md names no scripts, command-line tools or credentials: AI is instructions for the agent only.

Does AI access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is AI safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does AI use?

AI is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does AI use?

About 1.1k tokens (SKILL.md is roughly 4.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to AI?

Skills that share tags, products or a category with AI: Fastllm Gateway (azrtydxb/Fastllm-proxy, 108 stars), LLM Cost Optimization (sickn33/agentic-awesome-skills, 47k stars), Unified LLM API (Prism-Shadow/penguin-harness, 2.5k stars) and Gemini Live API (google/skills, 21k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains AI?

butterbase-ai (a GitHub organization) maintains it in butterbase-ai/butterbase-skills, which has 534 GitHub stars. The repository holds 39 skills in this directory. The repository was last updated on October 5, 2026.

Source: butterbase-ai/butterbase-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.