.claude/skills/init/SKILL.md
# Init — Full Project Setup from Scratch Sets up the entire Gradient Bang local development environment from a fresh clone. ## Prerequisites Before running this skill, the user must have: - **Docker** running - **uv** installed - **Node.js 18+** installed - **pnpm** installed Verify these are available before proceeding. If any are missing, tell the user what to install and stop. ## Steps ### 1. Install Python dependencies ```bash uv sync --all-groups ``` ### 2. Start the local Supabase
npx skillsauth add pipecat-ai/gradient-bang .claude/skills/initInstall 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.
Sets up the entire Gradient Bang local development environment from a fresh clone.
Before running this skill, the user must have:
Verify these are available before proceeding. If any are missing, tell the user what to install and stop.
uv sync --all-groups
This downloads and runs all Supabase Docker services. It can take a few minutes on first run.
npx supabase start --workdir deployment/
Redirect output to a file and monitor progress:
npx supabase start --workdir deployment/ > /tmp/supabase-start.log 2>&1
Wait for it to complete successfully. If it fails, show the user the log output.
.env.supabaseOnly create this file if it does NOT already exist. If it exists, ask the user whether to overwrite it.
Generate the file by extracting keys from the running Supabase instance:
tok=$(openssl rand -hex 32)
npx supabase status -o env --workdir deployment | awk -F= -v tok="$tok" '
$1=="API_URL" {v=$2; gsub(/"/,"",v); print "SUPABASE_URL=" v}
$1=="ANON_KEY" {v=$2; gsub(/"/,"",v); print "SUPABASE_ANON_KEY=" v}
$1=="SERVICE_ROLE_KEY" {v=$2; gsub(/"/,"",v); print "SUPABASE_SERVICE_ROLE_KEY=" v}
END {
print "POSTGRES_POOLER_URL=postgresql://postgres:postgres@db:5432/postgres"
print "EDGE_API_TOKEN=" tok
print ""
print "# Optional overrides"
print "BOT_START_URL= # used in start function to specify bot start URL. #default: \"http://host.docker.internal:7860/start\""
print "BOT_START_API_KEY= # used in start function to authenticate start request. #default: None"
print ""
print "MOVE_DELAY_SCALE=0.25"
}
' > .env.supabase
Verify the file was created and contains non-empty values for SUPABASE_URL, SUPABASE_ANON_KEY, and SUPABASE_SERVICE_ROLE_KEY. If any are empty, something went wrong — show the user and stop.
Source the env file, then run the cron setup script. This resets the database and seeds combat cron runtime config into app_runtime_config.
set -a && source .env.supabase && set +a
scripts/supabase-reset-with-cron.sh
Redirect output to a file:
scripts/supabase-reset-with-cron.sh > /tmp/supabase-reset-cron.log 2>&1
Check the log for the [reset] Done. message to confirm success.
Generate a universe (5000 sectors, seed 1234) and load it plus quest definitions:
set -a && source .env.supabase && set +a
uv run universe-bang 5000 1234
uv run -m gradientbang.scripts.load_universe_to_supabase --from-json world-data/
uv run -m gradientbang.scripts.load_quests_to_supabase --from-json quest-data/
Redirect output and check for errors. These commands can take a minute.
Open the local Supabase Studio dashboard in the browser:
open http://127.0.0.1:54323
.env.bot from exampleOnly create this file if it does NOT already exist. If it exists, ask the user whether to overwrite it.
Start by copying the example:
cp env.bot.example .env.bot
The .env.bot file needs values from two sources:
Auto-populated from .env.supabase (fill these in automatically):
SUPABASE_URL — copy from .env.supabaseSUPABASE_SERVICE_ROLE_KEY — copy from .env.supabaseEDGE_API_TOKEN — copy from .env.supabaseRequired API keys — prompt the user for these:
DEEPGRAM_API_KEY — for speech-to-text (https://console.deepgram.com)CARTESIA_API_KEY — for text-to-speech (https://play.cartesia.ai)GOOGLE_API_KEY — for Gemini LLM, used by voice and UI agent (https://aistudio.google.com/apikey)ANTHROPIC_API_KEY — for Claude LLM, used by task agent (https://console.anthropic.com)Use AskUserQuestion to collect these keys one prompt at a time. For each key, show the service name and where to get it. If the user provides a value, write it into .env.bot. If the user skips a key (empty response), leave it blank in the file and warn them which bot features won't work without it.
After filling in the keys, use sed or similar to update the values in .env.bot.
Print a summary of what was set up:
.env.supabase created.env.bot created (list which API keys were provided vs skipped)Then tell the user the next steps to start developing:
# Terminal 1: Edge functions
npx supabase functions serve --workdir deployment --no-verify-jwt --env-file .env.supabase
# Terminal 2: Bot
set -a && source .env.bot && set +a && uv run bot
# Terminal 3: Client
cd client && pnpm i && pnpm run dev
# Then open http://localhost:5173
tee..env.supabase or .env.bot already exist, always ask before overwriting.supabase-reset-with-cron.sh script runs supabase db reset, which wipes the database — this is expected for a fresh setup.GOOGLE_API_KEY (voice LLM) or ANTHROPIC_API_KEY (task LLM) to be functional. Warn if neither is provided.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 `
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