Ships in Powabase. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Powabase is a multi-tenant AI Backend-as-a-Service. One REST API gives every project an isolated stack — Postgres + pgvector, an API gateway, auth, storage, realtime, and an AI worker — exposing three composable modules on top of a Supabase-style backend:
| Module | What it is | Entry reference |
|---|---|---|
| Context Engineering (RAG) | Sources → extraction → Knowledge Bases → indexing → retrieval → reranking | rag-context-engineering.md |
| Agent Orchestration | ReAct agents with tools, sessions, streaming; multi-agent coordinators | agents-and-tools.md · orchestrations.md |
| Workflow Automation | DAG of blocks; webhook / scheduled triggers; NL Copilot | workflows-and-copilot.md |
| BaaS layer | PostgREST + RLS, GoTrue auth, Storage, Realtime, direct Postgres | baas-database-rls.md · baas-auth-storage-realtime.md |
Use only the modules you need. A KB can attach to an agent; an agent can be a block in a workflow; a workflow can call a KB search — they compose.
/api/* surface is still evolving — verify against live docs. Don't
trust this snapshot for exact request/response shapes. The docs at
https://docs.powabase.ai are the contract; fetch the relevant page (Mintlify
— you can append .md to a page path) before relying on a field you're unsure
about. This skill flags known ambiguities inline.GET /api/agents, a KB
search, a one-message run) and read the response. A fix without a confirming
call is incomplete./api/*, /rest/v1/*, /auth/v1/*,
/storage/v1/* request needs both apikey and Authorization: Bearer.
Sending one is the #1 cause of 401s. A valid user token on a non-conversation
/api/* route is a 403, not a 401: switch to the Service Role key.⚠️ Security must-knows (read before exposing anything to end users)
- Service Role key for admin routes; user JWTs only for conversations. Since powabase-ai 0.12.0 an end-user JWT may call only the 16 conversation routes (own agent/orchestration sessions, runs, approvals). Every other
/api/*route returns403unless it carries the Service Role key. Don't forward a user token to KB, source, workflow or management routes; call them from your backend. Table: connection-and-auth.md §2a.- End-user runs are constrained. They can continue only the user's own existing session and cannot send
knowledge_bases,runtime_knowledge_bases,context_handler_idor by-referencecontext_items; configure KBs on the agent. Agentdatabase_*/storage_*tools run as the caller (user's grants + RLS on end-user runs). See agents-and-tools.md.ai.*RLS is project-wide, not per-user. Any signed-in (authenticated) user can read every agent/KB/workflow in the project via PostgREST; only session tables filter byuser_id. See baas-database-rls.md.- Never ship the Service Role key, JWT Secret, or Database URL client-side. The Anon (Publishable) key is the only credential safe in a browser/mobile app.
Base URL is the Project URL: https://{ref}.p.powabase.ai. Most platform docs
(and this skill) assume the Service Role (Secret) Key for server-side /api/*
calls; end-user JWTs are accepted only on the conversation routes
(connection-and-auth.md §2a).
import requests
BASE_URL = "{BASE_URL}" # Connect modal → Project URL
API_KEY = "{API_KEY}" # Connect modal → Service Role (Secret) Key
headers = {"apikey": API_KEY, "Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"}
requests.get(f"{BASE_URL}/api/agents", headers=headers).json() # verify: 200 + {agents, total, ...}
Which key for which surface:
| Key | Use for | Client-safe? |
|---|---|---|
| Project URL | BASE_URL for every call | Yes |
| Anon (Publishable) | Browser calls to PostgREST/Storage that respect RLS | Yes |
| Service Role (Secret) | Server-side /api/* (required except the user-JWT conversation routes) and RLS-bypassing PostgREST | No — server only |
| JWT Secret | Verifying user JWTs on your backend | No |
| Database URL | Direct Postgres (migrations, ORMs, psql) | No |
→ The credentials come from the Studio's Connect modal (project header →
Connect, or append ?showConnect=true to a project URL). If you don't have
them, ask the user to open it and paste the Project URL + Service Role Key.
Full detail: connection-and-auth.md. Shared
conventions (errors, pagination, PUT vs PATCH, headers): api-conventions.md.
Powabase is a full Supabase-style backend first, AI modules second. Every
project ships an isolated Postgres + PostgREST + GoTrue + Storage + Realtime —
so for ordinary app data (users' profiles, todos, orders, app state) you create
your own public tables and use them directly; don't model app data as agents/KBs.
This should be your default reach for anything that isn't RAG/agents/workflows.
public schema is yours to migrate./rest/v1/{table} — GET ?col=eq.val&select=...&order=,
POST, PATCH ?id=eq.{id}, DELETE ?id=eq.{id} (filters required on
write), embeds (select=*,relation(*)), upsert (Prefer: resolution=merge-duplicates),
RPC (/rest/v1/rpc/{fn}). Two-header auth applies.public tables have RLS OFF by default, so a fresh table is
world-readable/writable to anyone with the Anon key until you ENABLE ROW LEVEL SECURITY and add policies. Turn RLS on as step one for any user-facing table.database_query/database_write
tools — but those run as DB superuser (RLS bypassed); see the security box.Full surface — schemas, RLS posture, PostgREST patterns, direct Postgres/pooler, extensions: baas-database-rls.md.
The reference end-to-end pattern. Each step links to depth.
POST /api/sources/upload (multipart file) → poll
GET /api/sources/{id} until extraction_status is terminal. Extraction is a
barrier: the next step needs extracted specifically. Re-uploading identical
bytes returns 409 duplicate_source (project-wide dedup) — reuse it, don't
treat it as an error. See rag-context-engineering.md §1.POST /api/knowledge-bases {name} → add source
POST /api/knowledge-bases/{kb_id}/sources {source_id} (triggers indexing).
This 400s unless the source is extracted (attention_required is rejected —
re-extract with OCR). Re-adding the same source is an idempotent re-index. Poll
until the indexed source is indexed.POST /api/agents {name, model, system_prompt, settings} →
link KB POST /api/agents/{id}/knowledge-bases {knowledge_base_id} (the
agent auto-gets a knowledge_search tool). KB needed for one query only?
Skip the link — pass runtime_knowledge_bases on /run/stream instead
(request-scoped, agent-driven search; see agents-and-tools.md §2).POST /api/agents/{id}/run/stream {message} — consume
SSE; capture session_id from the start event for multi-turn.Extraction artifacts are reusable beyond RAG. Every Source also exposes derivatives — per-page images (rendered PNGs), per-page text, and whole-doc markdown/text — that you can render directly in your own UI (e.g. a document viewer). Reach for these before reinventing PDF rendering. See rag-context-engineering.md §1.
Details: rag-context-engineering.md, agents-and-tools.md, and the SSE parser in streaming-sse.md.
Which indexing strategy + retrieval method? (set on the KB; full table in rag-context-engineering.md)
| Your documents / queries | Indexing strategy | Retrieval method |
|---|---|---|
| General docs, mixed queries (default) | chunk_embed | hybrid |
| Exact tokens — IDs, error codes, product names | chunk_embed | full_text |
| Whole short docs as a unit (cases, memos, papers) | full_document | hybrid (top_k=3) |
| Long structured PDFs, structural queries | page_index | tree_search |
| Cross-referenced corpora (regs, standards, code) | graph_index | hybrid |
| Structured field extraction (invoices, forms) | doc2json | vector_search |
tree_searchworks only withpage_indexKBs.build-bm25andfull_text/hybridneed a KB whose retrieval method includes BM25.
Tune retrieval quality with three
retrieval_configknobs (stored on the KB, query-time, no reindex; settable at create or viaPATCH):reranker(precision),query_enrichment(LLM query rewrite for conversational/multi-turn),context_mode: "image"(multimodal retrieval — all strategies exceptdoc2json). See rag-context-engineering.md §6.
Agent vs Orchestration vs Workflow?
Specify any agent/orchestration exhaustively (MECE). Cover all four pillars — data (link the right KBs), prompt (detailed, explicit, Markdown bulleted instructions), tools (builtin / custom / MCP, only what's needed), and model +
reasoning_effort(choose deliberately — defaults often underperform). No gaps, no overlap. Full checklists: agents-and-tools.md §0 · orchestrations.md.
Typed /api/* vs PostgREST vs direct Postgres? Use /api/* for anything
the platform manages (runs, indexing, workflow execution — it coordinates async
work and ownership). Use PostgREST (/rest/v1/*) for your own public tables
and read-only ai.* queries (mind RLS + Accept-Profile: ai). Use the Database
URL for migrations/ORMs/extensions. → baas-database-rls.md
The footguns most likely to bite. Each is expanded in a reference.
temperature must nest in settings. Top-level temperature (and other
tuning fields) on agent create/update is silently dropped. → agents-and-tools.md/api/agents/{id}/run has no tools and no ReAct loop. For any tool use (incl.
KB search) use /run/stream. → agents-and-tools.mdai.* via PostgREST needs Accept-Profile: ai (writes:
Content-Profile: ai) — without it you get public and a 404/empty. → baas-database-rls.mdinput/output/llm are not real
(use starter / response). → workflows-and-copilot.mdAuthorization: Bearer <secret> with a trailing space and no
token returns 401 and won't fall back to ?token=. Guard against
Bearer ${secret ?? ""}. → workflows-and-copilot.mdtransport defaults to http (streamable HTTP). sse is
accepted but not honored by the current client. → agents-and-tools.md402 insufficient_credits → do NOT retry (surface renews_at);
503 billing service unreachable → retry with backoff. → billing-limits-and-debugging.md/execute is rate-limited at 20/min per user → 429. Back off with
jitter. → billing-limits-and-debugging.mdpostgres_changes deliver nothing until you create the
supabase_realtime publication. → baas-auth-storage-realtime.mdGET /api/agents/runs/{run_id} (error, events,
retrieved_context) is the highest-signal start. → billing-limits-and-debugging.mdSome setup can't be done over the API. When you hit one, pause and tell the user exactly where to go (full table in studio-setup-and-human-handoff.md):
| Need | Ask the user to go to |
|---|---|
| Project URL / API keys / Database URL | Connect modal (project header → Connect) |
| BYOK model provider keys (or "AI-on-us" status) | Settings → LLM Provider Keys |
web_search / web_scrape / URL import say "currently unavailable" | Powabase support. The Exa and Firecrawl keys are platform-provided on managed cloud; there is no project setting for them |
| Database restore / point-in-time recovery | Email support (no self-service) |
Out of credits after a 402 | Top up / upgrade (account-level) |
Hosted at https://mcp.powabase.ai/mcp (streamable HTTP, OAuth sign-in with the
user's Powabase account). Claude Code:
claude mcp add --transport http powabase https://mcp.powabase.ai/mcp.
Append ?read_only=true to expose only read-only tools. ~60 tools, most taking a
project_ref: list / inspect / pause / resume projects (no create or delete),
SQL + schema inspection, auth users, storage, knowledge bases + sources, agents,
orchestrations, workflows, and docs search. Details in
studio-setup-and-human-handoff.md §5.
Separately, an agent can connect to external MCP servers as runtime tools — a real Powabase feature (agents-and-tools.md), unrelated to a Powabase MCP server for your assistant.
ai.* schema, RLS posture, PostgREST, direct Postgres, extensions.CHANGELOG.md (opens in a new tab)agents/openai.yaml (opens in a new tab)references/agents-and-tools.md (opens in a new tab)references/api-conventions.md (opens in a new tab)references/baas-auth-storage-realtime.md (opens in a new tab)references/baas-database-rls.md (opens in a new tab)references/billing-limits-and-debugging.md (opens in a new tab)references/connection-and-auth.md (opens in a new tab)references/orchestrations.md (opens in a new tab)references/rag-context-engineering.md (opens in a new tab)references/streaming-sse.md (opens in a new tab)references/studio-setup-and-human-handoff.md (opens in a new tab)references/workflows-and-copilot.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
ai-backend, rag, agent-orchestration, workflow-automation, baas, multi-tenant
Other plugins' skills for the same job
Generated from the plugin's indexed repository (powabase-ai/agent-skills) — no native marketplace selected
npx claudepluginhub p/powabase-ai-powabase