astro-db

A database tool for Astro websites, using a SQL database that can run locally or through Turso, a hosted database service. It supports structured data and typed form-to-database flows through Astro Actions.

In plain words
What is it for?
Use it in existing Astro projects to define tables, read and change database records, and connect forms to database operations with type checking.
Why use it?
It gives an Astro project a way to store organized data without building a separate backend service. However, Astro DB is deprecated, so new projects should generally use alternatives such as Drizzle, Kysely, or a direct libSQL client.

Skill for Claude CodeCodex

Part of the fuse-astro plugin — 14 skills, 1 agent shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/fusengine/agents/astro-db
Any agent
npx skills add fusengine/agents --skill astro-db
Clone the repo
git clone --depth 1 https://github.com/fusengine/agents

Made for: Claude Code, Codex.

Or install fuse-astro, the plugin that ships this one along with the rest of its 14 skills, 1 agent.

Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,151 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00029 $0.01151
Opus 5 $0.00015 $0.00575
Sonnet 5 $0.00006 $0.00230
Haiku 4.5 $0.00003 $0.00115

Measured 3d ago against content hash 3cd51558d32c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

astro-db scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/astro-expert/skills/astro-db/SKILL.md · 104 lines

How it starts

The opening of the file, as written. The whole thing — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Also covers integration with Astro Actions for end-to-end type-safe form-to-database flows. @astrojs/db is deprecated and no longer actively maintained (still published, v0.21.3, not removed from Astro 7) — for new projects this skill recommends Drizzle, Kysely, or a direct libSQL client instead; existing projects can keep using it but should plan a migration.

Astro DB

Type-safe SQL database built into Astro, powered by libSQL/Turso. Use for structured data without external backend services.

⚠️ Deprecation notice: @astrojs/db is deprecated and no longer actively maintained (still published on npm, currently v0.21.3 — it has not been removed from Astro 7). For new projects, prefer Drizzle, Kysely, or a direct libSQL client instead. Existing projects can keep using it, but should plan a migration.

Agent Workflow (MANDATORY)

Before ANY implementation, use TeamCreate to spawn 3 agents:

  1. fuse-ai-pilot:explore-codebase - Check existing db/config.ts, tables, and Actions
  2. fuse-ai-pilot:research-expert - Verify Astro DB API via Context7/Exa
  3. mcp__context7__query-docs - Check Astro 6 DB docs for column types and CRUD

After implementation, run fuse-ai-pilot:sniper for validation.


Overview

When to Use

  • Storing structured data (comments, users, posts, forms)
  • Building full-stack Astro apps without external DB setup
  • Combining with Astro Actions for type-safe form handling
  • Deploying to production with Turso (libSQL cloud)
  • Seeding development data for local testing

Architecture

db/
├── config.ts   # Schema definition (defineDb, defineTable)
└── seed.ts     # Development data seeding

Read the full file on GitHub · 104 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 104 lines · 29 tokens per session scan A 3cd51558d32c

Subscribe to this mod's changes

astro-db is a skill published in the GitHub repository fusengine/agents (25 stars, last pushed 1mo ago), licensed MIT. It adds 29 tokens to every session and 1,151 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

055-design-parallel-change

Use when a database schema or data-meaning change needs Parallel Change, including expand, migrate, and contract sequencing for column renames, type or data reinterpretation, large-table backfills, relationship-table changes, enum/status transitions, timezone/default changes, and index or uniqueness changes. This…

jabrena/plinth · 94 tokens

convex

Expert guidance for Convex backend development including queries, mutations, actions, schemas, authentication, scheduling, file storage, search, and Next.js integration. Use when working with Convex functions, database operations, convex/ directory code, or Next.js App Router with Convex. Triggers: convex functions…

PolarCoding85/convex-agent-skillz · 203 tokens

convex-components

Universal patterns for Convex components including installation, configuration, and usage. Use when working with Rate Limiter, Aggregate, Workpool, Workflow, or any Convex component from the ecosystem.

PolarCoding85/convex-agent-skillz · 42 tokens

cortex-code

Routes Snowflake-related operations to Cortex Code CLI for specialized Snowflake expertise. Use when the user asks about Snowflake databases, warehouses, schemas, tables, SQL on Snowflake, Cortex AI features, Snowpark, dynamic tables, streams, tasks, governance, or Snowflake security. Do not use for general…

Snowflake-Labs/subagent-cortex-code · 88 tokens

cortex-code

Routes Snowflake-related operations to Cortex Code agent for specialized Snowflake expertise. Use when querying databases, checking data quality, or asking about Snowflake features.

Snowflake-Labs/subagent-cortex-code · 35 tokens

cortex-code

Routes Snowflake-related operations to Cortex Code CLI for specialized Snowflake expertise. Use when user asks about Snowflake databases, data warehouses, SQL queries on Snowflake, Cortex AI features, Snowpark, dynamic tables, data governance in Snowflake, Snowflake security, or mentions "Cortex" explicitly. Do NOT…

Snowflake-Labs/subagent-cortex-code · 93 tokens