ai-infrastructure-hugg…
Hugging Face Inference SDK patterns for TypeScript/Node.js — InferenceClient setup, chat completion, text generation, streaming, embeddings, image generation,…
Supabase backend-as-a-service — Auth, Database, Realtime, Storage, Edge Functions, RLS policies, typed client
$ npx -y skills add agents-inc/skills --skill api-baas-supabase --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/api-baas-supabaseContext preview
The summary Claude sees to decide when to auto-load this skill.
Supabase backend-as-a-service — Auth, Database, Realtime, Storage, Edge Functions, RLS policies, typed client
name: api-baas-supabase description: Supabase backend-as-a-service — Auth, Database, Realtime, Storage, Edge Functions, RLS policies, typed client
> **Quick Guide:** Use Supabase as your backend-as-a-service for Postgres database, authentication, realtime subscriptions, file storage, and edge functions. Always use the typed client with `Database` generic, enable RLS on every table, and use the secret key only on the server.
---
<critical_requirements>
> **All code must follow project conventions in CLAUDE.md** (kebab-case, named exports, import ordering, `import type`, named constants)
**(You MUST enable Row Level Security (RLS) on EVERY table in an exposed schema — no exceptions)**
**(You MUST use the `Database` generic type with `createClient<Database>()` for type-safe queries)**
**(You MUST NEVER expose the secret key in client-side code — use the publishable key in browsers, the secret key only on the server)**
**(You MUST use `(select auth.uid())` wrapped in a subquery inside RLS policies for performance)**
**(You MUST handle all Supabase responses with `{ data, error }` destructuring — never assume success)**
</critical_requirements>
---
**Auto-detection:** Supabase, createClient, @supabase/supabase-js, @supabase/ssr, supabase-js, auth.uid(), RLS, row level security, realtime, postgres_changes, supabase.auth, supabase.from, supabase.storage, supabase.functions, supabase.channel, edge function, Deno.serve
**When to use:**
**Key patterns covered:**
**When NOT to use:**
**Detailed Resources:**
**Client & Queries:**
**Authentication:**
**Database:**
**Storage:**
**Edge Functions:**
---
<philosophy>
Supabase is an open-source Firebase alternative built on Postgres. It provides a complete backend through a combination of Postgres extensions, auto-generated REST/GraphQL APIs, authentication, realtime subscriptions, file storage, and edge functions.
**Core principles:**
1. **Postgres at the core** — Every feature is built on Postgres. RLS policies, auth, and realtime all leverage Postgres primitives. Understanding Postgres is understanding Supabase. 2. **Type safety end-to-end** — Generate TypeScript types from your database schema with `supabase gen types`. Pass the `Database` generic to `createClient` for fully typed queries. 3. **Security by default** — RLS must be enabled on every table. The publishable key is safe for browsers (RLS enforces access). The secret key bypasses RLS and must never leave the server. 4. **Error as values** — Every Supabase method returns `{ data, error }`. Never assume success. Always check `error` before using `data`. 5. **Realtime built in** — Postgres changes stream over WebSockets via channels. No separate pub/sub infrastructure needed. 6. **Edge-first functions** — Edge Functions run Deno at the edge, close to users. Design for short-lived, idempotent operations.
**When to use Supabase:**
**When NOT to use:**
</philosophy>
---
<patterns>
Always pass the `Database` generic to `createClient` for full autocomplete on table names, column names, and return types. Use environment variables for URL and keys.
export const supabase = createClient<Database>( SUPABASE_URL, SUPABASE_PUBLISHABLE_KEY, );
Without the generic, typos in table/column names are not caught at compile time. See [examples/core.md](examples/core.md) for browser, server, and admin client setup patterns.
---
The official skills marketplace for Agents Inc. 150+ skills covering everything from React and Prisma to Redis, ElevenLabs, and infrastructure tooling. Pick the skills that match your stack and install them via Claude Code. Need more control?
Repo: agents-inc/skills
Hugging Face Inference SDK patterns for TypeScript/Node.js — InferenceClient setup, chat completion, text generation, streaming, embeddings, image generation,…
LiteLLM proxy server setup, TypeScript client patterns via OpenAI SDK, model routing, fallbacks, load balancing, spend tracking, virtual keys, and production…
Serverless GPU compute platform for AI model deployment — web endpoints, GPU functions, model serving, and TypeScript client patterns
Local LLM inference with the Ollama JavaScript client -- chat, streaming, tool calling, vision, embeddings, structured output, model management, and…
Replicate SDK patterns for TypeScript/Node.js -- client setup, predictions, streaming, webhooks, file handling, model versioning, deployments, and training
Together AI SDK patterns for TypeScript — client setup, chat completions, streaming, structured output, function calling, embeddings, image generation,…