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.
From fuse-astronpx claudepluginhub fusengine/agents --plugin fuse-astroThis skill uses the workspace's default tool permissions.
references/actions-integration.mdreferences/crud-operations.mdreferences/schema-definition.mdreferences/seed-data.mdreferences/templates/crud-example.mdreferences/templates/db-config.mdreferences/turso-production.mdGuides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Details PluginEval's skill quality evaluation: 3 layers (static, LLM judge), 10 dimensions, rubrics, formulas, anti-patterns, badges. Use to interpret scores, improve triggering, calibrate thresholds.
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