Help us improve
Share bugs, ideas, or general feedback.
From fuse-astro
Astro DB — defineDb, defineTable, column types, CRUD with db.select/insert/update/delete, db/config.ts, db/seed.ts, Turso for production, type-safety, integration with Astro Actions. Use for any database operation in an Astro project.
npx claudepluginhub fusengine/agents --plugin fuse-astroHow this skill is triggered — by the user, by Claude, or both
Slash command
/fuse-astro:astro-dbThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Type-safe SQL database built into Astro, powered by libSQL/Turso. Use for structured data without external backend services.
Complete Supabase CMS integration for Astro websites, including database schema design, RLS policies, content management workflows, and client setup.
Expert Astro Server Actions — defineAction, astro:actions, Zod validation, ActionError, HTML form actions, accept form, progressive enhancement, redirect patterns. Use when handling form submissions, mutations, or any server-side logic with type safety.
Provides Astro framework patterns for islands architecture, content collections, rendering strategies (SSG, SSR, hybrid), view transitions, partial hydration, and Cloudflare deployment.
Share bugs, ideas, or general feedback.
Type-safe SQL database built into Astro, powered by libSQL/Turso. Use for structured data without external backend services.
Before ANY implementation, use TeamCreate to spawn 3 agents:
After implementation, run fuse-ai-pilot:sniper for validation.
db/
├── config.ts # Schema definition (defineDb, defineTable)
└── seed.ts # Development data seeding
Define tables in db/config.ts using defineDb and defineTable. Export tables for use in pages and actions. Column types: column.text(), column.number(), column.boolean(), column.date(), column.json().
Import db and table from astro:db. All operations are async and type-safe based on your schema definition.
Set ASTRO_DB_REMOTE_URL and ASTRO_DB_APP_TOKEN environment variables. Run astro db push to sync schema to Turso. Use astro db execute to run seed scripts against remote DB.
Combine with astro:actions for end-to-end type safety: Zod input validation → DB operation → typed response.
| Topic | Reference | When to Consult |
|---|---|---|
| Schema Definition | schema-definition.md | Table structure, column types |
| CRUD Operations | crud-operations.md | select, insert, update, delete |
| Seed Data | seed-data.md | db/seed.ts, remote seeding |
| Turso Production | turso-production.md | Deployment, env vars, push |
| Actions Integration | actions-integration.md | Type-safe form → DB flow |
| Template | When to Use |
|---|---|
| db-config.md | Complete db/config.ts + seed.ts |
| crud-example.md | Full CRUD with Actions |
.returning() after insert - Get back inserted rowsastro db push in CI/CD