# Provision a Database

> Spin up D1, R2, KV, Vectorize, Hyperdrive, Supabase, or Neon — and wire the binding/connection string.

- **Kind**: Shell tool
- **Category**: engineering
- **Owner**: Sentinel (/sentinel)
- **Default model**: sonnet
- **Cost class**: cheap (Haiku-class model. Cents per invocation.)
- **Turn budget**: 6
- **Execution**: synchronous (result lands in the same turn)
- **Canonical URL**: https://app.51ultron.com/docs/skills/provision-database

## What it does

Wraps provision-database/SKILL.md + the provision-db tool. Picks the right database for the access pattern (D1 for SQL on CF, KV for hot key/value, Vectorize for embeddings, R2 for blobs, Hyperdrive for external Postgres pooling, Supabase for auth + Postgres + Storage, Neon for serverless Postgres). Provisions via wrangler or the provider's API and prints the binding stanza (for CF) or connection string (for external) ready to paste into wrangler.toml or .env.

## When to use this

- user wants a database for a new app
- user says 'I need a DB' / 'add auth/users' / 'store X persistently'
- user wants to add embeddings/vector search to an app

## When NOT to use this

- user already has a DB and wants to query it → use shell_exec with the right CLI
- user wants to migrate between providers → that's a separate workflow, not provisioning

## Example prompts

- `provision a D1 database called users-db`
- `I need vector search — set up Vectorize`
- `spin up Supabase for auth and Postgres`
- `give me an R2 bucket for uploads`

## Inputs

- **type**: d1 | r2 | kv | vectorize | hyperdrive | supabase | neon
- **name**: resource name

## Output

Binding stanza (wrangler.toml format) or connection string (for external DBs).

## Tools used

`shell_exec`

## Execution template

Shell tools dispatch through `shell_exec` with the following command template:

```bash
provision-db {{type}} {{name}}; follow provision-database/SKILL.md for wiring
```

## Tags

`engineering`, `database`, `infrastructure`

## Keywords

database, provision, d1, r2, kv, vectorize, hyperdrive, supabase, neon, postgres

