.claude/skills/restore-ship/SKILL.md
# 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
npx skillsauth add pipecat-ai/gradient-bang .claude/skills/restore-shipInstall 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.
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.
Ask the user for:
set -a && source .env.supabase && set +a
Fetch the ship from ship_instances (including destroyed ships).
curl -s "${SUPABASE_URL}/rest/v1/ship_instances?ship_id=eq.<ship_id>&select=ship_id,ship_type,ship_name,current_sector,owner_type,owner_corporation_id,destroyed_at" \
-H "apikey: ${SUPABASE_SERVICE_ROLE_KEY}" \
-H "Authorization: Bearer ${SUPABASE_SERVICE_ROLE_KEY}"
If the result is empty, the ship doesn't exist. Report this and stop.
Save the ship_type, owner_type, owner_corporation_id, and current_sector for subsequent steps.
Get the max values for fighters, shields, and warp power from ship_definitions.
curl -s "${SUPABASE_URL}/rest/v1/ship_definitions?ship_type=eq.<ship_type>&select=ship_type,fighters,shields,warp_power_capacity" \
-H "apikey: ${SUPABASE_SERVICE_ROLE_KEY}" \
-H "Authorization: Bearer ${SUPABASE_SERVICE_ROLE_KEY}"
Update the ship to clear destroyed state and restock to full capacity.
curl -s -X PATCH "${SUPABASE_URL}/rest/v1/ship_instances?ship_id=eq.<ship_id>" \
-H "apikey: ${SUPABASE_SERVICE_ROLE_KEY}" \
-H "Authorization: Bearer ${SUPABASE_SERVICE_ROLE_KEY}" \
-H "Content-Type: application/json" \
-H "Prefer: return=representation" \
-d '{
"destroyed_at": null,
"current_fighters": <fighters_from_definition>,
"current_shields": <shields_from_definition>,
"current_warp_power": <warp_power_capacity_from_definition>
}'
If the ship is corporation-owned (owner_type = "corporation"), check if it's in corporation_ships and re-add if missing.
curl -s "${SUPABASE_URL}/rest/v1/corporation_ships?ship_id=eq.<ship_id>&select=ship_id" \
-H "apikey: ${SUPABASE_SERVICE_ROLE_KEY}" \
-H "Authorization: Bearer ${SUPABASE_SERVICE_ROLE_KEY}"
If the result is empty, re-insert:
curl -s -X POST "${SUPABASE_URL}/rest/v1/corporation_ships" \
-H "apikey: ${SUPABASE_SERVICE_ROLE_KEY}" \
-H "Authorization: Bearer ${SUPABASE_SERVICE_ROLE_KEY}" \
-H "Content-Type: application/json" \
-H "Prefer: return=representation" \
-d '{
"corp_id": "<owner_corporation_id>",
"ship_id": "<ship_id>"
}'
If the ship is corporation-owned (owner_type = "corporation"), check if the pseudo-character record exists. Combat finalization deletes this record when a corp ship is destroyed, and without it current_ship_id is null so no tasks can be issued.
curl -s "${SUPABASE_URL}/rest/v1/characters?character_id=eq.<ship_id>&select=character_id,current_ship_id" \
-H "apikey: ${SUPABASE_SERVICE_ROLE_KEY}" \
-H "Authorization: Bearer ${SUPABASE_SERVICE_ROLE_KEY}"
If the result is empty, recreate the pseudo-character. Use the first 6 hex chars of ship_id as the name suffix:
curl -s -X POST "${SUPABASE_URL}/rest/v1/characters" \
-H "apikey: ${SUPABASE_SERVICE_ROLE_KEY}" \
-H "Authorization: Bearer ${SUPABASE_SERVICE_ROLE_KEY}" \
-H "Content-Type: application/json" \
-H "Prefer: return=representation" \
-d '{
"character_id": "<ship_id>",
"name": "Corp Ship [<first_6_hex_of_ship_id>]",
"current_ship_id": "<ship_id>",
"credits_in_megabank": 0,
"map_knowledge": {
"total_sectors_visited": 0,
"sectors_visited": {},
"current_sector": <current_sector>,
"last_update": "<now_iso_timestamp>"
},
"player_metadata": {
"player_type": "corporation_ship",
"owner_corp_id": "<owner_corporation_id>"
},
"is_npc": true,
"first_visit": "<now_iso_timestamp>",
"last_active": "<now_iso_timestamp>",
"created_at": "<now_iso_timestamp>",
"corporation_id": "<owner_corporation_id>",
"corporation_joined_at": "<now_iso_timestamp>"
}'
If the pseudo-character exists but current_ship_id is null, update it:
curl -s -X PATCH "${SUPABASE_URL}/rest/v1/characters?character_id=eq.<ship_id>" \
-H "apikey: ${SUPABASE_SERVICE_ROLE_KEY}" \
-H "Authorization: Bearer ${SUPABASE_SERVICE_ROLE_KEY}" \
-H "Content-Type: application/json" \
-H "Prefer: return=representation" \
-d '{
"current_ship_id": "<ship_id>"
}'
Show the user:
destroyed_at was clearedcorporation_shipscurrent_ship_id was fixeddevelopment
# 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 `
data-ai
# 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
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