.claude/skills/migrate/SKILL.md
# Run Database Migration Applies pending Supabase migrations to the local or production database. This skill is strictly additive — it only applies new migrations and NEVER resets, truncates, or drops existing data. ## Safety rules — READ BEFORE PROCEEDING **You MUST follow every rule below. No exceptions.** 1. **NEVER** run `supabase db reset`, `supabase db reset --linked`, or any command that drops/recreates the database. 2. **NEVER** run `DROP TABLE`, `DROP SCHEMA`, `TRUNCATE`, or `DELETE
npx skillsauth add pipecat-ai/gradient-bang .claude/skills/migrateInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Applies pending Supabase migrations to the local or production database. This skill is strictly additive — it only applies new migrations and NEVER resets, truncates, or drops existing data.
You MUST follow every rule below. No exceptions.
supabase db reset, supabase db reset --linked, or any command that drops/recreates the database.DROP TABLE, DROP SCHEMA, TRUNCATE, or DELETE FROM against any table unless it is explicitly part of the migration SQL the user has already reviewed.--linked to db reset. There is no safe use of db reset in this skill.The user specifies the environment as an argument: /migrate local, /migrate dev, or /migrate prod. If not provided, ask which environment.
local → env file: .env.supabasedev → env file: .env.cloud.devprod → env file: .env.cloudset -a && source <env-file> && set +a
List which migrations have already been applied and which are pending.
For local:
npx supabase migration list --workdir deployment
For dev or prod (requires the project to be linked):
npx supabase migration list --workdir deployment --linked
Show the user the list of pending (not yet applied) migrations.
For each pending migration, read the file from deployment/supabase/migrations/ and display its contents to the user. Summarise what the migration does. Flag anything that looks destructive (drops, truncates, deletes) and ask the user to confirm.
For local — apply pending migrations to the running local Supabase instance:
npx supabase migration up --workdir deployment
For production — push pending migrations to the linked remote project:
npx supabase db push --workdir deployment
Production only: Before running db push, ask the user for explicit confirmation one more time. Show them exactly which migrations will be applied.
After applying, re-run the migration list command from step 2 and confirm all migrations now show as applied. Report the result to the user.
If the user wants to create a new migration (not just apply existing ones):
npx supabase migration new <migration_name> --workdir deployment
deployment/supabase/migrations/ and follow the naming convention YYYYMMDDhhmmss_description.sql.npx supabase start --workdir deployment/).npx supabase link --project-ref <ref> --workdir deployment).tee.reset-world or deploy skills instead.testing
# Restore Ship Restores a ship to a healthy state for testing. Clears the `destroyed_at` flag, restocks fighters/shields/warp power to max values from the ship definition, re-adds corporation ships to `corporation_ships` if missing, and recreates the pseudo-character record for corp ships so tasks can be issued. No events are emitted — this is a database-only operation. ## Parameters Ask the user for: - **ship_id**: UUID of the ship to restore (required) ## Steps ### 1. Source environment
development
# Reset World Resets the game database, generates a fresh universe, loads quest definitions, and seeds combat cron config. ## Parameters The user specifies the environment as an argument: `/reset-world local`, `/reset-world dev`, or `/reset-world prod`. If not provided, ask which environment. - `local` → env file: `.env.supabase` - `dev` → env file: `.env.cloud.dev` - `prod` → env file: `.env.cloud` Additional optional parameters (ask if not provided, or use defaults): - **Sector count**: n
devops
# NPC Runs an autonomous AI task agent as a game character. Resolves a character name to its UUID, then launches the `npc-run` script which connects to the game server and executes the given task using a Pipecat + Gemini LLM pipeline. ## Parameters - **character_name** (required): The character's display name (e.g. `JOETRADER`). Passed as the argument to `/npc`. - **task** (required): A natural language description of what the character should do (e.g. "Explore and find 5 new sectors"). If `
testing
# Load Quest Data Loads quest definitions from JSON files in `quest-data/` into Supabase. ## Parameters Ask the user for: - **Mode**: `upsert` (default) or `force` (deletes all existing quest data first) - **Dry run**: whether to validate only without writing (default: no) ## Steps ### 1. Source environment variables ```bash set -a && source .env.supabase && set +a ``` ### 2. Run the quest loader Upsert mode (default — updates existing quests, inserts new ones): ```bash uv run -m gradien