# DB Reset Local

> Reset and seed the local database for Drasil.

- Skill: `majiayu000/db-reset-local` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds add majiayu000/db-reset-local`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/db-reset-local/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/db-reset-local

---


Use this when you need a clean local database state.

## Canonical command

- `npm run db:reset:local`

## What it does

- Resets the local Supabase database (`npx supabase db reset --local`).
- Ensures the local `prisma` DB user exists (`node scripts/create-prisma-user.js`).
- Resets Prisma migrations (`prisma migrate reset`).
- Seeds data (`npm run db:seed`).

## Prereqs

- Supabase running locally: `npx supabase start`.
- `.env` includes:
  - `DATABASE_URL` (Prisma connection string)
  - `PRISMA_DB_PASSWORD` (used by `scripts/create-prisma-user.js`)

## Notes

- Integration tests may also require `POSTGRES_DB_URL` so the test harness can create extensions.

