#!/usr/bin/env sh # genie.locker — install the purchase procedure into your agent's workspace. # # curl -sL https://genie.locker/skill.sh | sh # # Writes .claude/skills/genie-locker/SKILL.md and, if an AGENTS.md is present, # adds one line pointing at it. Nothing else is touched, nothing is executed, # and no credential is created or requested — the wallet is generated by you, # locally, when you follow the skill. # # Read this script before piping it to a shell. It is short on purpose. set -eu DIR=".claude/skills/genie-locker" SRC="https://genie.locker/agent.md" printf 'genie.locker: installing into %s\n' "$DIR" mkdir -p "$DIR" # Fetch first, write second: a half-downloaded skill is worse than none. BODY=$(curl -fsSL "$SRC") || { echo "genie.locker: could not fetch $SRC" >&2; exit 1; } { echo '---' echo 'name: genie-locker' echo 'description: >-' echo ' Buy GPU memory by the minute from genie.locker, unattended. Use when' echo ' the task needs more VRAM than is available locally, or needs a model' echo ' that does not fit. Covers generating a wallet, having a human fund it' echo ' once with USDC on Base, pricing a memory envelope, paying the x402' echo ' challenge, and using the endpoint until it expires.' echo '---' echo printf '%s\n' "$BODY" } > "$DIR/SKILL.md" if [ -f AGENTS.md ] && ! grep -q 'genie.locker' AGENTS.md 2>/dev/null; then printf '\n- Need GPU memory? See `%s/SKILL.md` (buy per-minute, x402).\n' "$DIR" >> AGENTS.md echo "genie.locker: noted in AGENTS.md" fi echo "genie.locker: done — $DIR/SKILL.md" echo "genie.locker: nothing was purchased and no wallet exists yet; the skill" echo " walks you through creating one and asking a human to fund it."