better_auth schema model — drop REVOKE
Templates moved BA's tables to a dedicated `better_auth` schema
(insforge-templates#28). The doc was still teaching the old
public+REVOKE model; sync it.
Removed:
- Entire "Lock down PostgREST exposure (REQUIRED)" section (15 lines).
- "DATABASE_URL must keep superuser-grade privileges" callout — no
more REVOKE means no risk of a tightened DATABASE_URL silently
breaking sign-up.
- Organization plugin REVOKE block (5-line SQL + verify curl text).
- Plugin REVOKE template table — every plugin's tables inherit
`search_path=better_auth` automatically.
- Two Common Mistakes rows: "Skipping the REVOKE block" and
"Connecting BA as anon/authenticated after REVOKE" — both no
longer applicable.
Replaced with:
- Three-line schema-layout intro at the top of the guide showing
auth.* / better_auth.* / public.* ownership.
- "Schema setup + first migrate" subsection with `CREATE SCHEMA`
one-liner + a callout explaining why this is sufficient (PostgREST
exposes only `public` by default; dashboard reaches `better_auth`
through the admin route's postgres superuser pool).
- New `lib/auth.ts` example with `pool.on('connect')` setting
`search_path TO better_auth, public` — the canonical pg method
per BA's own docs since pg.Pool doesn't take a schema option.
- New Common Mistakes rows: forgetting `CREATE SCHEMA` before
migrate; FK'ing without schema qualification.
Updated:
- Manual-integration numbered workflow: drop the REVOKE step,
insert the CREATE SCHEMA step.
- FK example in the database-setup section: `REFERENCES public."user"(id)`
→ `REFERENCES better_auth."user"(id)`.
- "FK to BA users" section: prescribed FK is now `better_auth.user(id)`
(not `public.user(id)`).
- Plugin section's "rule of thumb": `\dt better_auth.*` (not `public.*`).
- All REVOKE-template SQL in plugin sections — gone.
Net change: 96 lines edited (48 insertions, 48 deletions). Word count
4260 → 4482 (+5%) because the explanatory schema-layout + new Common
Mistakes rows are slightly longer than the dropped sections; acceptable
for the clarity gain.
Verified end-to-end against current insforge main (v2.1.0) via
insforge-templates#28's branch — see that PR for the test matrix.
InsForge Agent Skills
Agent Skills to help developers using AI agents build applications with InsForge Backend-as-a-Service.
Installation
Using the skills registry
npx skills add insforge/insforge-skills
Claude Code
/install-skills insforge/insforge-skills
Available Skills
insforge - InsForge Backend-as-a-Service Development
Build full-stack applications with InsForge. This skill provides comprehensive guidance for:
- Database: CRUD operations, schema design, RLS policies, triggers
- Authentication: Sign up/in flows, OAuth, sessions, email verification
- Storage: File uploads, downloads, bucket management
- Functions: Serverless function deployment and invocation
- AI: Chat completions, image generation, embeddings
- Real-time: WebSocket connections, subscriptions, event publishing
- Payments: Stripe Checkout Sessions, subscriptions, and Billing Portal redirects
- Deployments: Frontend app deployment to InsForge hosting
Key distinction: Backend infrastructure uses the CLI skill. Client integration uses the @insforge/sdk in application code.
insforge-cli - InsForge CLI Project Management
Create and manage InsForge projects from the command line. This skill provides comprehensive guidance for:
- Authentication: Login (OAuth/password), logout, session verification
- Project Management: Create, link, and inspect projects
- Database: Raw SQL execution, schema inspection, RLS, import/export
- Edge Functions: Deploy, invoke, and view function source
- Storage: Bucket and object management (upload, download, list)
- Deployments: Frontend app deployment and status tracking
- Payments: Stripe key setup, catalog sync, products/prices, webhooks
- Secrets: Create, update, and manage project secrets
- CI/CD: Non-interactive workflows using environment variables
Key distinction: Use this skill for infrastructure management via @insforge/cli. For writing application code with the InsForge SDK, use the insforge skill instead.
insforge-debug - InsForge Debugging & Diagnostics
Diagnose errors, bugs, and performance issues in InsForge projects. This skill guides diagnostic command execution for:
- SDK Errors: Frontend SDK error objects and unexpected behavior
- HTTP Errors: 4xx/5xx responses from InsForge backend
- Edge Functions: Failures, timeouts, and deploy errors
- Database: Slow queries and performance degradation
- Auth: Authentication and authorization failures
- Real-time: Channel connection and subscription issues
- Deployments: Frontend (Vercel) and edge function deploy failures
Key distinction: This skill guides diagnostic command execution to locate problems — it does not provide fix suggestions.
insforge-integrations - Third-Party Auth Provider Integrations
Integrate third-party authentication providers with InsForge for Row Level Security (RLS). Each integration covers JWT configuration, token signing, and InsForge client setup:
- Auth0: Post Login Action, Auth0 v4 SDK, custom claim embedding
- Clerk: JWT Template config, client-side
getToken()flow - Kinde: Server-side JWT signing (no custom signing key support)
- Stytch: Magic link flow, server-side session validation
- WorkOS: AuthKit middleware, server-side JWT signing
Key distinction: Use these guides when connecting an external auth provider to InsForge. For InsForge's built-in authentication, use the insforge skill instead.
Usage
Once installed, AI agents can access InsForge-specific guidance when:
- Setting up backend infrastructure (tables, buckets, functions, auth, AI)
- Integrating
@insforge/sdkinto frontend applications - Implementing database CRUD operations with proper RLS
- Building authentication flows with OAuth and email verification
- Deploying serverless functions and frontend apps
Skill Structure
Each skill follows the Agent Skills Open Standard:
skills/
├── insforge/
│ ├── SKILL.md # Main skill manifest and overview
│ ├── database/
│ │ ├── sdk-integration.md
│ │ └── backend-configuration.md
│ ├── auth/
│ │ ├── sdk-integration.md
│ │ └── backend-configuration.md
│ ├── storage/
│ │ ├── sdk-integration.md
│ │ └── backend-configuration.md
│ ├── functions/
│ │ ├── sdk-integration.md
│ │ └── backend-configuration.md
│ ├── ai/
│ │ ├── sdk-integration.md
│ │ └── backend-configuration.md
│ ├── realtime/
│ │ ├── sdk-integration.md
│ │ └── backend-configuration.md
│ ├── payments/
│ │ ├── sdk-integration.md
│ │ └── backend-configuration.md
│ └── deployments/
│ └── workflow.md
├── insforge-cli/
│ ├── SKILL.md # CLI skill manifest and command reference
│ └── references/
│ ├── login.md
│ ├── create.md
│ ├── db-query.md
│ ├── db-export.md
│ ├── db-import.md
│ ├── functions-deploy.md
│ ├── payments.md
│ └── deployments-deploy.md
├── insforge-debug/
│ └── SKILL.md # Debug & diagnostics skill
└── insforge-integrations/
├── auth0/
│ └── SKILL.md # Auth0 integration guide
├── clerk/
│ └── SKILL.md # Clerk integration guide
├── kinde/
│ └── SKILL.md # Kinde integration guide
├── stytch/
│ └── SKILL.md # Stytch integration guide
└── workos/
└── SKILL.md # WorkOS integration guide
Documentation Pattern
sdk-integration.md: How to use@insforge/sdkin frontend application codebackend-configuration.md: How to configure InsForge backend via HTTP API
Contributing
To create or improve skills, first install the skill-creator tool:
npx skills add anthropics/skills -s skill-creator
See CONTRIBUTING.md for guidelines on adding or improving skills.
License
MIT License - see LICENSE for details.