#!/bin/sh set -e BOLD="\033[1m" CYAN="\033[36m" RESET="\033[0m" echo "" echo "${BOLD}${CYAN}Prescience YC Benefits Survey${RESET}" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "" # ── 1. Detect available AI CLI (claude or codex) ────────────────────────────── AI_CMD="" AI_NAME="" if command -v claude >/dev/null 2>&1; then AI_CMD="claude" AI_NAME="Claude Code" elif command -v codex >/dev/null 2>&1; then AI_CMD="codex" AI_NAME="OpenAI Codex" else echo "❌ No supported AI CLI found." echo "" echo " Please install one of:" echo " • Claude Code → https://claude.ai/download" echo " • OpenAI Codex → https://github.com/openai/codex" echo "" echo " Then re-run this command." exit 1 fi echo "✓ Using ${AI_NAME}" echo "" # ── 2. Check curl is available ──────────────────────────────────────────────── if ! command -v curl >/dev/null 2>&1; then echo "❌ curl not found. Please install curl and try again." exit 1 fi # ── 3. Fetch survey instructions ────────────────────────────────────────────── # The shell fetches the skill document; the AI CLI receives it as its opening # prompt. This avoids any prompt-injection concern — the agent never fetches # the URL itself, it just receives the content as a plain string argument. echo "📋 Loading survey..." if [ "$AI_CMD" = "claude" ]; then SKILL=$(curl -sL "https://getprescience.com/skill?source=claude_code") else SKILL=$(curl -sL "https://getprescience.com/skill?source=codex") fi if [ -z "$SKILL" ]; then echo "❌ Could not fetch survey instructions. Check your internet connection." exit 1 fi # ── 4. Launch the survey ────────────────────────────────────────────────────── echo "🚀 Starting the Prescience YC Benefits Survey in ${AI_NAME}..." echo " (This will open an interactive session)" echo "" if [ "$AI_CMD" = "claude" ]; then claude --model claude-sonnet-4-6 "$SKILL" else $AI_CMD "$SKILL" fi