From supatype
Guides setup, configuration, schema editing, CLI commands, client integration, and self-hosting for Supatype projects. Activate when the user mentions Supatype or works on a Supatype stack.
How this skill is triggered — by the user, by Claude, or both
Slash command
/supatype:supatypeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Guide for working with Supatype projects. **Verify against `packages/cli/src/commands/*.ts` when repo facts are uncertain**: public docs may lag the CLI.
Guide for working with Supatype projects. Verify against packages/cli/src/commands/*.ts when repo facts are uncertain: public docs may lag the CLI.
| Topic | Reference |
|---|---|
Config and .env | references/config.md |
| Schema and access rules | references/schema.md |
| CLI commands | references/cli.md |
| Frontend + client | references/frontend.md |
| Self-host production | references/self-host.md |
Node.js 18+, Docker (default provider), npm/pnpm/yarn.
npx @supatype/cli init <project-name> # --mode dev (default) | standalone
cd <project-name>
npm install
supatype keys # → ANON_KEY + SERVICE_ROLE_KEY in .env
supatype dev # Docker Compose; Kong :18473
supatype push # migrate + generate types
schema/index.ts (source of truth: type-first, not DB introspection)supatype diff: preview changessupatype push: apply migration + regenerate types@supatype/client in app code"docker" in scaffolded supatype.config.tsprovider: "native": host Postgres :5432, supatype-server :54321@supatype/types Model<> types, not @supatype/schemasupatype.config.ts + defineConfig; TOML unsupportedhttp://localhost:18473 (or SUPATYPE_KONG_PORT in .env)output: { types: "path/to/file.ts" } in configsupatype.local.config.ts (gitignored)import { createClient } from "@supatype/client"
import type { Database } from "./src/lib/database"
const supatype = createClient<Database>({
url: process.env.PUBLIC_SUPATYPE_URL ?? "http://localhost:18473",
anonKey: process.env.ANON_KEY!,
})
const { data } = await supatype.from("posts").select("*")
Add @supatype/client when wiring a frontend. Run supatype push after schema changes.
| Error | Fix |
|---|---|
| Docker not running | Start Docker before supatype dev |
| Port in use | Check SUPATYPE_KONG_PORT; stop other Supatype projects |
| Missing JWT keys | supatype keys → update .env |
| No supatype.config.ts | supatype init |
| Types out of sync | supatype push or supatype generate |
| Destructive migration blocked | Review supatype diff; use supatype push --yes if intended |
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub supatype/supatype --plugin supatype