[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6D33RSKFQZ5ECMGQXHS5483":3,"skill-same:01M6D33RSKFQZ5ECMGQXHS5483":63},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":35,"linkOnly":36,"markdownContent":37,"markdownBody":38,"frontMatter":39,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":43,"repositoryHtmlUrl":44,"repositoryHomepageUrl":6,"ownerHtmlUrl":45,"ownerBlogUrl":46,"ownerDescription":47,"updatedAt":48,"install":49,"resources":62},"01M6D33RSKFQZ5ECMGQXHS5483","ai-setup",null,"Configure AI model options - budget cloud models (save 80%+) and offline mode (use Amp without internet)","hemory\u002Famp-legacy-do-not-use","hemory","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F21179881?v=4","01M6D31HFJ391DN8N0JP8AQGFE","Hemory Phifer","01M6D31HKXVTEN27AT6R4PP2ZJ",3,"MIT","https:\u002F\u002Fgithub.com\u002Fhemory\u002Famp-legacy-do-not-use\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fai-setup\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000040","财务","PROFESSION","适用职业",[24,25,26,27,28,29,30,31,32,33,34],"setup","ai setup","offline","cloud","Budget","save","configure","model","use","models","options","2026-11-10 10:12:30",false,"---\nname: ai-setup\ndescription: Configure AI model options - budget cloud models (save 80%+) and offline mode (use Amp without internet)\n---\n\n## Purpose\n\nHelp users configure alternative AI models for Amp:\n1. **Budget Cloud** - Cheaper models like Kimi, DeepSeek (80-97% savings)\n2. **Offline Mode** - Local models via Ollama (works without internet)\n3. **Smart Routing** - Automatically pick the best model per task\n\nThis skill is designed for users of ALL technical levels. Use plain language, avoid jargon, and guide step-by-step.\n\n## When to Run\n\n- User types `\u002Fai-setup`\n- Mentioned during onboarding (optional advanced setup)\n- User asks about reducing AI costs\n- User asks about working offline\n- User is traveling frequently\n\n---\n\n## Entry Point\n\nSay:\n\n```\n**Let's configure your AI options!**\n\nRight now, Amp uses Claude for everything. It's excellent, but it costs money per use and requires internet.\n\nHere are your options:\n\n---\n\n**1. ? Budget Cloud Mode** — Cheaper AI when online\n   \n   **What it is:** Use models like Kimi or DeepSeek that cost 80-97% less than Claude\n   \n   **The catch:** Requires a small upfront payment (~$5-10) to a service called OpenRouter\n   - You'll need a credit card or Apple Pay\n   - That $5-10 lasts weeks or months\n   - Example: If Claude costs you $90\u002Fmonth, this would cost ~$10-20\u002Fmonth\n   \n   **Best for:** People who use Amp heavily and want to cut costs\n\n---\n\n**2. ✈️ Offline Mode** — AI that runs on your computer\n   \n   **What it is:** Download a free AI model that works without internet\n   \n   **The catch:** Uses your computer's memory and processing power\n   - Requires ~8GB RAM minimum (you have 36GB ✅)\n   - One-time download of 8-20GB\n   - Slightly lower quality than Claude\n   \n   **Best for:** Travel (planes, trains), privacy, or if you don't want to pay anything\n   \n   **Cost: Completely free forever**\n\n---\n\n**3. ? Smart Routing** — Automatic model selection\n   \n   This automatically picks the best model for each task. It works with whatever you set up above — if you only set up offline mode, it'll use that for simple tasks.\n\n---\n\n**Which would you like to set up?**\n\n- \"Budget cloud\" — I'll walk you through the payment setup\n- \"Offline\" — Free, no payment needed, let's do it\n- \"Both\" — Get the most flexibility\n- \"Neither\" — Stick with Claude for now\n```\n\nWait for user response, then branch accordingly.\n\n### If User Chooses \"Both\"\n\n```\nGreat choice — you'll have maximum flexibility!\n\nLet's start with **offline mode** first (it's free and quick), then we'll do budget cloud.\n\n---\n```\n\nThen run Branch 2 (Offline), and when complete, transition:\n\n```\n**Offline mode is ready!** ✅\n\nNow let's set up budget cloud so you can save money when you're online.\n\nBudget cloud requires adding ~$5-10 to an OpenRouter account.\n\n**Ready to continue, or want to stop here?**\n- \"Continue\" — Let's set up budget cloud\n- \"Stop here\" — Offline is enough for now (you can add budget cloud later)\n```\n\nIf they continue, run Branch 1. If they stop, skip to smart routing offer.\n\n### Graceful Pivots\n\nIf user hesitates on budget cloud or mentions payment concerns:\n\n```\nNo problem! The offline option is completely free and works great for most daily tasks.\n\nWant to set that up instead? You can always add budget cloud later when it makes sense.\n```\n\nIf user can't do offline (old hardware, not enough RAM):\n\n```\nWith your current setup, local AI would be quite slow. \n\nYour best options are:\n1. **Stick with Claude** — Best quality, you're already set up\n2. **Budget cloud** — Much cheaper than Claude, but does need that initial payment\n\nWhat sounds better?\n```\n\n---\n\n## Branch 1: Budget Cloud Setup\n\n### Step 1.0: Confirm They're Ready to Pay\n\nBefore diving into setup, confirm:\n\n```\n**Quick check before we start:**\n\nBudget cloud requires:\n✓ Creating an account at OpenRouter.ai\n✓ Adding ~$5-10 in credits (credit card or Apple Pay)\n✓ About 5 minutes to set up\n\nThis is a one-time setup. That $5-10 will last you weeks or months.\n\n**Ready to proceed?**\n- \"Yes\" — Let's do it\n- \"Actually, let's do offline instead\" — No problem, that's free\n- \"Maybe later\" — We can come back to this anytime\n```\n\nIf they want to pivot to offline, go to Branch 2.\n\n### Step 1.1: Explain the Options (Plain Language)\n\n```\n**Budget Cloud Models — What Are Your Options?**\n\nThese are AI models from other companies that cost much less:\n\n| Model | Monthly Savings | Quality | Best For |\n|-------|-----------------|---------|----------|\n| **Kimi K2.5** | ~80% cheaper | ⭐⭐⭐⭐ Great | General tasks, thinking |\n| **DeepSeek V3** | ~95% cheaper | ⭐⭐⭐⭐ Great | Coding, analysis |\n| **Gemini Flash** | ~97% cheaper | ⭐⭐⭐ Good | Long documents |\n\n**My recommendation:** Start with **Kimi K2.5** — it's the closest to Claude in quality.\n\n**Real cost example:**\nIf you currently spend ~$90\u002Fmonth on Claude, Kimi would cost ~$18\u002Fmonth for similar tasks.\n\nWant to set up Kimi? (You can always add others later)\n```\n\n### Step 1.2: OpenRouter Setup (The Key Step)\n\n```\n**Setting Up Kimi (5-minute setup)**\n\nTo use these models, we go through a service called **OpenRouter**. \nThink of it like a phone plan that lets you call different networks.\n\n**Here's what to do:**\n\n**Step 1: Create an OpenRouter account**\n   Go to: **https:\u002F\u002Fopenrouter.ai\u002Fkeys**\n   Click \"Sign up\" (Google\u002FGitHub login works)\n\n**Step 2: Add credits**\n   - Click \"Credits\" in the top menu\n   - Add $5-10 to start (this lasts weeks\u002Fmonths)\n   - They accept cards, Apple Pay, etc.\n\n**Step 3: Create an API key**\n   - Go to: https:\u002F\u002Fopenrouter.ai\u002Fkeys\n   - Click \"Create Key\"\n   - Give it a name like \"Amp\"\n   - Copy the key (starts with `sk-or-...`)\n\n**Step 4: Paste your key here**\n\nOnce you have your key, paste it here and I'll configure everything automatically.\n\n---\n\n*Stuck? Here's what each step looks like:*\n- OpenRouter's interface is simple - big blue buttons\n- The API key is just a password for your account\n- Your credits work for ALL their models (Kimi, DeepSeek, etc.)\n```\n\n### Step 1.3: Configure the Key\n\nWhen user provides key:\n\n```python\n# Validate key format\nif not key.startswith(\"sk-or-\"):\n    respond(\"Hmm, that doesn't look like an OpenRouter key. They usually start with 'sk-or-'. Can you double-check?\")\n    return\n\n# Create or update models.json\n```\n\nGenerate `~\u002F.pi\u002Fagent\u002Fmodels.json`:\n\n```json\n{\n  \"providers\": {\n    \"openrouter\": {\n      \"baseUrl\": \"https:\u002F\u002Fopenrouter.ai\u002Fapi\u002Fv1\",\n      \"api\": \"openai-completions\",\n      \"apiKey\": \"USER_KEY_HERE\",\n      \"models\": [\n        {\n          \"id\": \"moonshotai\u002Fkimi-k2.5\",\n          \"name\": \"Kimi K2.5 (Budget)\",\n          \"input\": [\"text\"],\n          \"contextWindow\": 262144,\n          \"maxTokens\": 32768,\n          \"cost\": { \"input\": 0.6, \"output\": 3, \"cacheRead\": 0, \"cacheWrite\": 0 }\n        },\n        {\n          \"id\": \"deepseek\u002Fdeepseek-chat\",\n          \"name\": \"DeepSeek V3 (Budget)\",\n          \"input\": [\"text\"],\n          \"contextWindow\": 64000,\n          \"maxTokens\": 8192,\n          \"cost\": { \"input\": 0.14, \"output\": 0.28, \"cacheRead\": 0, \"cacheWrite\": 0 }\n        },\n        {\n          \"id\": \"google\u002Fgemini-2.0-flash-exp:free\",\n          \"name\": \"Gemini Flash (Free tier)\",\n          \"input\": [\"text\", \"image\"],\n          \"contextWindow\": 1048576,\n          \"maxTokens\": 8192,\n          \"cost\": { \"input\": 0, \"output\": 0, \"cacheRead\": 0, \"cacheWrite\": 0 }\n        }\n      ]\n    }\n  }\n}\n```\n\nSay:\n\n```\n**Done! Budget models are ready.**\n\nI've added three models you can switch to anytime:\n- **Kimi K2.5** — Best quality budget option\n- **DeepSeek V3** — Super cheap, great for coding\n- **Gemini Flash** — Google's free tier (with limits)\n\n**How to use them:**\n\n**Option A: Switch in this session**\n   Type `\u002Fmodel` and select one from the list\n\n**Option B: Ask me to switch**\n   Just say \"use the budget model\" or \"switch to Kimi\"\n\n**Option C: Set as default** (advanced)\n   I can make Kimi your default and only use Claude for complex stuff\n\n---\n\n**Quick test:** Want me to do something simple with Kimi right now so you can see it work?\n```\n\n### Step 1.4: Update User Profile\n\nAdd to `System\u002Fuser-profile.yaml`:\n\n```yaml\nai_models:\n  budget_cloud:\n    enabled: true\n    provider: openrouter\n    primary_model: moonshotai\u002Fkimi-k2.5\n    configured_date: 2026-02-04\n```\n\n---\n\n## Branch 2: Offline Mode Setup\n\n### Step 2.1: Check System Requirements\n\n```\n**Offline Mode — Let's Check Your Setup**\n\nTo run AI on your computer, I need to know what you're working with.\n\n**Quick question:** What kind of computer are you using?\n\n1. **Mac with Apple Silicon** (M1, M2, M3, M4 chip)\n2. **Mac with Intel** (older Mac)\n3. **Windows PC**\n4. **Linux**\n5. **Not sure**\n\n(Most Macs from 2020 onwards have Apple Silicon)\n```\n\nBased on response, check RAM:\n\n```\n**Great! Now let's check your memory (RAM).**\n\nOn Mac:\n1. Click the Apple menu (top-left corner)\n2. Click \"About This Mac\"\n3. Look for \"Memory\" — what number do you see?\n\nOn Windows:\n1. Right-click the Start button\n2. Click \"System\"\n3. Look for \"Installed RAM\"\n\nWhat does it say? (e.g., \"8 GB\", \"16 GB\", \"32 GB\")\n```\n\n### Step 2.2: Recommend Model Based on RAM\n\n```python\nif ram \u003C= 8:\n    model = \"qwen2.5:7b\"\n    quality = \"Good for 70% of tasks\"\n    size = \"4.4 GB download\"\nelif ram \u003C= 16:\n    model = \"qwen2.5:14b\" \n    quality = \"Good for 80% of tasks\"\n    size = \"8.5 GB download\"\nelif ram \u003C= 32:\n    model = \"qwen2.5:32b\"\n    quality = \"Near-Claude for most tasks\"\n    size = \"18 GB download\"\nelse:\n    model = \"qwen2.5:72b\"\n    quality = \"Excellent, close to Claude\"\n    size = \"40 GB download\"\n```\n\nSay:\n\n```\n**Perfect! Here's my recommendation:**\n\nWith **{{RAM}} GB** of memory, you can run **Qwen 2.5 {{size}}**.\n\n**What to expect:**\n- Quality: {{quality_description}}\n- Download size: {{size}}\n- Speed: {{speed based on chip}}\n\n**What works great offline:**\n✅ Daily planning and reviews\n✅ Meeting summaries\n✅ Task management\n✅ Note organization\n✅ Simple analysis\n\n**What's better with Claude:**\n⚠️ Complex strategic planning\n⚠️ Nuanced writing\n⚠️ Multi-step reasoning\n\nReady to set this up? It takes about 10-15 minutes (mostly download time).\n```\n\n### Step 2.3: Install Ollama\n\nCheck if Ollama is already installed:\n\n```bash\nwhich ollama || echo \"not installed\"\n```\n\nIf not installed:\n\n```\n**Step 1: Install Ollama**\n\nOllama is a free app that runs AI models on your computer.\n\n**On Mac (easiest way):**\n1. Go to: **https:\u002F\u002Follama.ai\u002Fdownload**\n2. Click \"Download for macOS\"\n3. Open the downloaded file\n4. Drag Ollama to your Applications folder\n5. Open Ollama from Applications (you'll see a llama icon in your menu bar)\n\n**On Windows:**\n1. Go to: **https:\u002F\u002Follama.ai\u002Fdownload**\n2. Click \"Download for Windows\"\n3. Run the installer\n4. Follow the prompts\n\n**Let me know when Ollama is installed and running** (you should see a llama icon in your menu bar \u002F system tray).\n```\n\n### Step 2.4: Download the Model\n\nOnce Ollama is confirmed running:\n\n```\n**Step 2: Download the AI model**\n\nNow let's download the model to your computer. This is a one-time download.\n\n**Run this command in Terminal:**\n\n```\nollama pull {{recommended_model}}\n```\n\n**How to open Terminal:**\n- Mac: Press Cmd+Space, type \"Terminal\", press Enter\n- Windows: Search for \"Command Prompt\"\n\n**Then paste the command above and press Enter.**\n\nThis will download ~{{size}}. It might take 5-15 minutes depending on your internet speed.\n\nLet me know when it says \"success\"!\n```\n\n### Step 2.5: Configure Pi for Offline\n\nOnce model is downloaded, update `~\u002F.pi\u002Fagent\u002Fmodels.json` to add Ollama:\n\n```json\n{\n  \"providers\": {\n    \"ollama\": {\n      \"baseUrl\": \"http:\u002F\u002Flocalhost:11434\u002Fv1\",\n      \"api\": \"openai-completions\", \n      \"apiKey\": \"ollama\",\n      \"models\": [\n        {\n          \"id\": \"{{recommended_model}}\",\n          \"name\": \"{{model_name}} (Offline)\",\n          \"input\": [\"text\"],\n          \"contextWindow\": 32768,\n          \"maxTokens\": 8192,\n          \"cost\": { \"input\": 0, \"output\": 0, \"cacheRead\": 0, \"cacheWrite\": 0 }\n        }\n      ]\n    }\n  }\n}\n```\n\n### Step 2.6: Test Offline Mode\n\n```\n**Step 3: Let's test it!**\n\nTry this:\n1. Turn off your WiFi (just for testing)\n2. In Pi, type `\u002Fmodel` and select \"{{model_name}} (Offline)\"\n3. Ask me something simple like \"What day is it?\"\n\nIf I respond, offline mode works! ?\n\nGo ahead and test, then turn WiFi back on and let me know how it went.\n```\n\n### Step 2.7: Confirm Success\n\n```\n**Offline mode is ready!**\n\nWhat happens now:\n- When you have internet → Amp uses Claude (best quality)\n- When you're offline → Amp can use your local model\n- You can also manually switch anytime with `\u002Fmodel`\n\n**For your next flight or train ride:**\n1. Make sure Ollama is running (llama icon in menu bar)\n2. Start Pi\u002FAmp as usual\n3. If internet isn't available, switch to your offline model\n\n**Pro tip:** Test it at home once before relying on it during travel!\n\n---\n\nWant to also set up budget cloud models to save money when online?\n```\n\nUpdate `System\u002Fuser-profile.yaml`:\n\n```yaml\nai_models:\n  offline:\n    enabled: true\n    runner: ollama\n    model: qwen2.5:14b\n    configured_date: 2026-02-04\n```\n\n---\n\n## Branch 3: Smart Routing\n\n### Step 3.1: Check What's Already Configured\n\nFirst, check what's set up:\n- Read `System\u002Fuser-profile.yaml` for `ai_models` section\n- Run `bash \"$CLAUDE_PROJECT_DIR\u002FSystem\u002Fscripts\u002Ftest-ai-connections.sh\"` silently\n\nThen adapt the explanation:\n\n**If both budget cloud and offline are configured:**\n\n```\n**Smart Routing — I'll Pick the Best Model Automatically**\n\nYou've got all three tiers set up — nice! Here's how I'll use them:\n\n| Task Type | Model | Why |\n|-----------|-------|-----|\n| Complex planning, coaching | Claude | Needs deep reasoning |\n| Daily tasks, summaries | Kimi (budget) | Good enough, saves money |\n| Quick questions | Kimi (budget) | Fast and cheap |\n| When you're offline | Qwen (local) | Only option! |\n\n**Want to enable smart routing?**\n- \"Yes\" — I'll pick automatically (you can always override)\n- \"No\" — I'll always ask before switching\n```\n\n**If only offline is configured:**\n\n```\n**Smart Routing — I'll Pick Based on What You Have**\n\nSince you set up offline mode, here's how routing works:\n\n| Task Type | Model | Why |\n|-----------|-------|-----|\n| Complex tasks | Claude | When you need the best |\n| Simple tasks | Claude | (budget not configured) |\n| When you're offline | Qwen (local) | Your backup! |\n\n**Tip:** If you add budget cloud later, I can start using cheaper models for simple tasks automatically.\n\n**Want to enable smart routing?**\n- \"Yes\" — Claude when online, local when offline\n- \"No\" — I'll always ask\n```\n\n**If only budget cloud is configured:**\n\n```\n**Smart Routing — I'll Pick Based on What You Have**\n\nSince you set up budget cloud, here's how routing works:\n\n| Task Type | Model | Why |\n|-----------|-------|-----|\n| Complex tasks | Claude | When you need the best |\n| Simple tasks | Kimi (budget) | Saves money! |\n| Offline | ❌ Not available | (not configured) |\n\n**Tip:** If you add offline mode later, you'll have a backup for travel.\n\n**Want to enable smart routing?**\n- \"Yes\" — Claude for complex, Kimi for simple\n- \"No\" — I'll always ask\n```\n\n**If neither is configured:**\n\n```\n**Smart Routing — Nothing to Route Yet!**\n\nSmart routing works best when you have alternatives set up. Right now you only have Claude.\n\nWould you like to set up:\n- \"Offline mode\" — Free, works without internet\n- \"Budget cloud\" — Cheaper models, needs ~$5-10 upfront\n- \"Neither for now\" — Stick with Claude\n```\n\n### Step 3.2: Configure Smart Routing\n\nBased on what's configured, update `System\u002Fuser-profile.yaml`:\n\n```yaml\nai_models:\n  smart_routing:\n    enabled: true\n    # Only include models that are actually configured\n    rules:\n      complex_tasks:\n        model: claude-sonnet  # Always available\n      routine_tasks:\n        model: {{budget_model_if_configured OR \"claude-sonnet\"}}\n      offline:\n        model: {{offline_model_if_configured OR null}}\n```\n\n**Confirmation message (adapts to setup):**\n\nIf budget + offline:\n```\n**Smart routing is enabled!**\n\nHere's what I'll do:\n- Complex tasks (planning, coaching) → Claude\n- Simple tasks (summaries, quick questions) → Kimi (saves money)\n- When offline → Your local model\n\nYou can always override by saying \"use Claude for this\" or \"switch to budget\".\n```\n\nIf only offline:\n```\n**Smart routing is enabled!**\n\nHere's what I'll do:\n- When online → Claude (best quality)\n- When offline → Your local model (automatic fallback)\n\nIf you add budget cloud later, I can start saving you money on simple tasks.\n```\n\nIf only budget:\n```\n**Smart routing is enabled!**\n\nHere's what I'll do:\n- Complex tasks → Claude (best quality)\n- Simple tasks → Kimi (saves money)\n\nIf you add offline mode later, you'll have a backup for travel.\n```\n\n---\n\n## Troubleshooting Section\n\n### Ollama Not Starting\n\n```\n**Ollama won't start?**\n\nTry these fixes:\n\n**Mac:**\n1. Open Applications folder\n2. Right-click Ollama → Open\n3. If blocked: System Preferences → Security → Allow Ollama\n\n**If still stuck:**\n1. Open Terminal\n2. Run: `ollama serve`\n3. Keep that window open\n\nLet me know if you see any error messages.\n```\n\n### OpenRouter Key Not Working\n\n```\n**OpenRouter key not working?**\n\nLet's debug:\n\n1. **Check key format** — Should start with `sk-or-`\n2. **Check credits** — Go to openrouter.ai\u002Fcredits, make sure you have balance\n3. **Test the key:**\n   ```\n   curl https:\u002F\u002Fopenrouter.ai\u002Fapi\u002Fv1\u002Fmodels \\\n     -H \"Authorization: Bearer YOUR_KEY_HERE\"\n   ```\n   \n   You should see a list of models, not an error.\n\n4. **Regenerate key** — Go to openrouter.ai\u002Fkeys, delete old key, make new one\n\nWhat do you see when you try the test?\n```\n\n### Model Too Slow\n\n```\n**Local model running slow?**\n\nThis usually means the model is too big for your RAM.\n\n**Fix options:**\n1. **Try a smaller model:**\n   ```\n   ollama pull qwen2.5:7b\n   ```\n   (smaller = faster, but slightly less capable)\n\n2. **Close other apps** — Free up memory\n\n3. **Check Activity Monitor** (Mac) or Task Manager (Windows)\n   - If RAM is maxed out, you need a smaller model\n\nWant me to help you switch to a smaller model?\n```\n\n---\n\n## Edge Cases\n\n### User Has No Credit Card\n\n```\n**No credit card for OpenRouter?**\n\nSome alternatives:\n\n1. **Gemini Flash Free Tier** — Google offers free usage (with limits)\n   I can set that up instead\n\n2. **Offline Only** — Skip budget cloud, just use local models\n   Free forever, works without internet\n\n3. **Anthropic Direct** — If you have Claude credits already, we can optimize usage\n\nWhich works for you?\n```\n\n### User on Very Old Hardware\n\n```\n**Older computer detected**\n\nWith {{RAM}} GB RAM, local AI will be very slow.\n\n**Better options for you:**\n1. **Budget cloud only** — Uses internet, but works on any computer\n2. **Stick with Claude** — Best quality, works everywhere\n\nOffline mode really needs 8GB+ RAM to be useful.\n\nWant to set up budget cloud instead?\n```\n\n---\n\n## Success Metrics\n\nAfter setup, track in `System\u002Fusage_log.md`:\n- [ ] Configured budget cloud models\n- [ ] Configured offline mode  \n- [ ] Enabled smart routing\n- [ ] Used budget model for a task\n- [ ] Used offline model\n\n---\n\n## Post-Setup Summary\n\nAfter any setup completes, show an adaptive summary and offer smart routing:\n\n### If only offline was set up:\n\n```\n**Setup Complete!** ✅\n\n| Mode | Status |\n|------|--------|\n| Premium (Claude) | ✅ Always available |\n| Budget Cloud | ❌ Not configured |\n| Offline Mode | ✅ Ready (Qwen 2.5) |\n\n**How to use offline mode:**\n- When you're online: Amp uses Claude (best quality)\n- When you're offline: Switch with `\u002Fmodel` or say \"use offline model\"\n- Or I can switch automatically when I detect you're offline\n\n**Want to enable smart routing?** (I'll automatically use your local model when offline)\n- \"Yes\" — Enable automatic switching\n- \"No\" — I'll ask before switching\n\nYou can add budget cloud later with `\u002Fai-setup` if you want to save money.\n```\n\n### If only budget cloud was set up:\n\n```\n**Setup Complete!** ✅\n\n| Mode | Status |\n|------|--------|\n| Premium (Claude) | ✅ Always available |\n| Budget Cloud | ✅ Ready (Kimi K2.5) |\n| Offline Mode | ❌ Not configured |\n\n**How to use budget models:**\n- Say \"use budget model\" or \"use Kimi\"\n- Or use `\u002Fmodel` to switch manually\n- Or I can pick automatically based on task complexity\n\n**Want to enable smart routing?** (I'll use Kimi for simple tasks, Claude for complex ones)\n- \"Yes\" — Enable automatic switching\n- \"No\" — I'll ask before switching\n\nYou can add offline mode later with `\u002Fai-setup` for travel.\n```\n\n### If both were set up:\n\n```\n**Setup Complete!** ✅\n\n| Mode | Status | Model |\n|------|--------|-------|\n| Premium | ✅ | Claude Sonnet |\n| Budget | ✅ | Kimi K2.5 |\n| Offline | ✅ | Qwen 2.5 |\n\n**You have maximum flexibility!**\n\n**Want to enable smart routing?** \nI'll automatically:\n- Use Claude for complex tasks (planning, coaching)\n- Use Kimi for simple tasks (summaries, quick questions) — saves money\n- Use your local model when offline — automatic fallback\n\n- \"Yes\" — Enable smart routing\n- \"No\" — I'll ask each time\n\n**Quick reference:**\n- \"Use Kimi\" → Switch to budget\n- \"Use Claude\" → Switch to premium\n- `\u002Fmodel` → Manual picker\n- `\u002Fai-status` → Check configuration\n```\n\n## Track Usage (Silent)\n\nUpdate `System\u002Fusage_log.md` to mark AI setup as used.\n\n**Analytics (Silent):**\n\nCall `track_event` with event_name `ai_setup_completed` and properties:\n- `mode` (budget_cloud\u002Foffline\u002Fsmart_routing)\n\nThis only fires if the user has opted into analytics. No action needed if it returns \"analytics_disabled\".\n\n---\n\n## Follow-up Skill: \u002Fai-status\n\nUsers can check their AI setup anytime:\n\n```\n\u002Fai-status\n\n**Your AI Configuration**\n\n| Mode | Status | Model |\n|------|--------|-------|\n| Premium | ✅ | Claude Sonnet |\n| Budget | {{✅ \u002F ❌}} | {{Kimi K2.5 \u002F Not configured}} |\n| Offline | {{✅ \u002F ❌}} | {{Qwen 2.5 \u002F Not configured}} |\n| Smart Routing | {{✅ Enabled \u002F ❌ Disabled}} | |\n\n**This session:** Using {{current_model}}\n{{If OpenRouter configured:}} **OpenRouter credits:** ${{balance}} remaining\n{{If Ollama configured:}} **Ollama status:** {{Running ✅ \u002F Not running ⚠️}}\n\n**Quick actions:**\n- `\u002Fmodel` — Switch models\n- `\u002Fai-setup` — Configure more options\n- \"Use budget model\" — Quick switch\n```\n","## Purpose\n\nHelp users configure alternative AI models for Amp:\n1. **Budget Cloud** - Cheaper models like Kimi, DeepSeek (80-97% savings)\n2. **Offline Mode** - Local models via Ollama (works without internet)\n3. **Smart Routing** - Automatically pick the best model per task\n\nThis skill is designed for users of ALL technical levels. Use plain language, avoid jargon, and guide step-by-step.\n\n## When to Run\n\n- User types `\u002Fai-setup`\n- Mentioned during onboarding (optional advanced setup)\n- User asks about reducing AI costs\n- User asks about working offline\n- User is traveling frequently\n\n---\n\n## Entry Point\n\nSay:\n\n```\n**Let's configure your AI options!**\n\nRight now, Amp uses Claude for everything. It's excellent, but it costs money per use and requires internet.\n\nHere are your options:\n\n---\n\n**1. ? Budget Cloud Mode** — Cheaper AI when online\n   \n   **What it is:** Use models like Kimi or DeepSeek that cost 80-97% less than Claude\n   \n   **The catch:** Requires a small upfront payment (~$5-10) to a service called OpenRouter\n   - You'll need a credit card or Apple Pay\n   - That $5-10 lasts weeks or months\n   - Example: If Claude costs you $90\u002Fmonth, this would cost ~$10-20\u002Fmonth\n   \n   **Best for:** People who use Amp heavily and want to cut costs\n\n---\n\n**2. ✈️ Offline Mode** — AI that runs on your computer\n   \n   **What it is:** Download a free AI model that works without internet\n   \n   **The catch:** Uses your computer's memory and processing power\n   - Requires ~8GB RAM minimum (you have 36GB ✅)\n   - One-time download of 8-20GB\n   - Slightly lower quality than Claude\n   \n   **Best for:** Travel (planes, trains), privacy, or if you don't want to pay anything\n   \n   **Cost: Completely free forever**\n\n---\n\n**3. ? Smart Routing** — Automatic model selection\n   \n   This automatically picks the best model for each task. It works with whatever you set up above — if you only set up offline mode, it'll use that for simple tasks.\n\n---\n\n**Which would you like to set up?**\n\n- \"Budget cloud\" — I'll walk you through the payment setup\n- \"Offline\" — Free, no payment needed, let's do it\n- \"Both\" — Get the most flexibility\n- \"Neither\" — Stick with Claude for now\n```\n\nWait for user response, then branch accordingly.\n\n### If User Chooses \"Both\"\n\n```\nGreat choice — you'll have maximum flexibility!\n\nLet's start with **offline mode** first (it's free and quick), then we'll do budget cloud.\n\n---\n```\n\nThen run Branch 2 (Offline), and when complete, transition:\n\n```\n**Offline mode is ready!** ✅\n\nNow let's set up budget cloud so you can save money when you're online.\n\nBudget cloud requires adding ~$5-10 to an OpenRouter account.\n\n**Ready to continue, or want to stop here?**\n- \"Continue\" — Let's set up budget cloud\n- \"Stop here\" — Offline is enough for now (you can add budget cloud later)\n```\n\nIf they continue, run Branch 1. If they stop, skip to smart routing offer.\n\n### Graceful Pivots\n\nIf user hesitates on budget cloud or mentions payment concerns:\n\n```\nNo problem! The offline option is completely free and works great for most daily tasks.\n\nWant to set that up instead? You can always add budget cloud later when it makes sense.\n```\n\nIf user can't do offline (old hardware, not enough RAM):\n\n```\nWith your current setup, local AI would be quite slow. \n\nYour best options are:\n1. **Stick with Claude** — Best quality, you're already set up\n2. **Budget cloud** — Much cheaper than Claude, but does need that initial payment\n\nWhat sounds better?\n```\n\n---\n\n## Branch 1: Budget Cloud Setup\n\n### Step 1.0: Confirm They're Ready to Pay\n\nBefore diving into setup, confirm:\n\n```\n**Quick check before we start:**\n\nBudget cloud requires:\n✓ Creating an account at OpenRouter.ai\n✓ Adding ~$5-10 in credits (credit card or Apple Pay)\n✓ About 5 minutes to set up\n\nThis is a one-time setup. That $5-10 will last you weeks or months.\n\n**Ready to proceed?**\n- \"Yes\" — Let's do it\n- \"Actually, let's do offline instead\" — No problem, that's free\n- \"Maybe later\" — We can come back to this anytime\n```\n\nIf they want to pivot to offline, go to Branch 2.\n\n### Step 1.1: Explain the Options (Plain Language)\n\n```\n**Budget Cloud Models — What Are Your Options?**\n\nThese are AI models from other companies that cost much less:\n\n| Model | Monthly Savings | Quality | Best For |\n|-------|-----------------|---------|----------|\n| **Kimi K2.5** | ~80% cheaper | ⭐⭐⭐⭐ Great | General tasks, thinking |\n| **DeepSeek V3** | ~95% cheaper | ⭐⭐⭐⭐ Great | Coding, analysis |\n| **Gemini Flash** | ~97% cheaper | ⭐⭐⭐ Good | Long documents |\n\n**My recommendation:** Start with **Kimi K2.5** — it's the closest to Claude in quality.\n\n**Real cost example:**\nIf you currently spend ~$90\u002Fmonth on Claude, Kimi would cost ~$18\u002Fmonth for similar tasks.\n\nWant to set up Kimi? (You can always add others later)\n```\n\n### Step 1.2: OpenRouter Setup (The Key Step)\n\n```\n**Setting Up Kimi (5-minute setup)**\n\nTo use these models, we go through a service called **OpenRouter**. \nThink of it like a phone plan that lets you call different networks.\n\n**Here's what to do:**\n\n**Step 1: Create an OpenRouter account**\n   Go to: **https:\u002F\u002Fopenrouter.ai\u002Fkeys**\n   Click \"Sign up\" (Google\u002FGitHub login works)\n\n**Step 2: Add credits**\n   - Click \"Credits\" in the top menu\n   - Add $5-10 to start (this lasts weeks\u002Fmonths)\n   - They accept cards, Apple Pay, etc.\n\n**Step 3: Create an API key**\n   - Go to: https:\u002F\u002Fopenrouter.ai\u002Fkeys\n   - Click \"Create Key\"\n   - Give it a name like \"Amp\"\n   - Copy the key (starts with `sk-or-...`)\n\n**Step 4: Paste your key here**\n\nOnce you have your key, paste it here and I'll configure everything automatically.\n\n---\n\n*Stuck? Here's what each step looks like:*\n- OpenRouter's interface is simple - big blue buttons\n- The API key is just a password for your account\n- Your credits work for ALL their models (Kimi, DeepSeek, etc.)\n```\n\n### Step 1.3: Configure the Key\n\nWhen user provides key:\n\n```python\n# Validate key format\nif not key.startswith(\"sk-or-\"):\n    respond(\"Hmm, that doesn't look like an OpenRouter key. They usually start with 'sk-or-'. Can you double-check?\")\n    return\n\n# Create or update models.json\n```\n\nGenerate `~\u002F.pi\u002Fagent\u002Fmodels.json`:\n\n```json\n{\n  \"providers\": {\n    \"openrouter\": {\n      \"baseUrl\": \"https:\u002F\u002Fopenrouter.ai\u002Fapi\u002Fv1\",\n      \"api\": \"openai-completions\",\n      \"apiKey\": \"USER_KEY_HERE\",\n      \"models\": [\n        {\n          \"id\": \"moonshotai\u002Fkimi-k2.5\",\n          \"name\": \"Kimi K2.5 (Budget)\",\n          \"input\": [\"text\"],\n          \"contextWindow\": 262144,\n          \"maxTokens\": 32768,\n          \"cost\": { \"input\": 0.6, \"output\": 3, \"cacheRead\": 0, \"cacheWrite\": 0 }\n        },\n        {\n          \"id\": \"deepseek\u002Fdeepseek-chat\",\n          \"name\": \"DeepSeek V3 (Budget)\",\n          \"input\": [\"text\"],\n          \"contextWindow\": 64000,\n          \"maxTokens\": 8192,\n          \"cost\": { \"input\": 0.14, \"output\": 0.28, \"cacheRead\": 0, \"cacheWrite\": 0 }\n        },\n        {\n          \"id\": \"google\u002Fgemini-2.0-flash-exp:free\",\n          \"name\": \"Gemini Flash (Free tier)\",\n          \"input\": [\"text\", \"image\"],\n          \"contextWindow\": 1048576,\n          \"maxTokens\": 8192,\n          \"cost\": { \"input\": 0, \"output\": 0, \"cacheRead\": 0, \"cacheWrite\": 0 }\n        }\n      ]\n    }\n  }\n}\n```\n\nSay:\n\n```\n**Done! Budget models are ready.**\n\nI've added three models you can switch to anytime:\n- **Kimi K2.5** — Best quality budget option\n- **DeepSeek V3** — Super cheap, great for coding\n- **Gemini Flash** — Google's free tier (with limits)\n\n**How to use them:**\n\n**Option A: Switch in this session**\n   Type `\u002Fmodel` and select one from the list\n\n**Option B: Ask me to switch**\n   Just say \"use the budget model\" or \"switch to Kimi\"\n\n**Option C: Set as default** (advanced)\n   I can make Kimi your default and only use Claude for complex stuff\n\n---\n\n**Quick test:** Want me to do something simple with Kimi right now so you can see it work?\n```\n\n### Step 1.4: Update User Profile\n\nAdd to `System\u002Fuser-profile.yaml`:\n\n```yaml\nai_models:\n  budget_cloud:\n    enabled: true\n    provider: openrouter\n    primary_model: moonshotai\u002Fkimi-k2.5\n    configured_date: 2026-02-04\n```\n\n---\n\n## Branch 2: Offline Mode Setup\n\n### Step 2.1: Check System Requirements\n\n```\n**Offline Mode — Let's Check Your Setup**\n\nTo run AI on your computer, I need to know what you're working with.\n\n**Quick question:** What kind of computer are you using?\n\n1. **Mac with Apple Silicon** (M1, M2, M3, M4 chip)\n2. **Mac with Intel** (older Mac)\n3. **Windows PC**\n4. **Linux**\n5. **Not sure**\n\n(Most Macs from 2020 onwards have Apple Silicon)\n```\n\nBased on response, check RAM:\n\n```\n**Great! Now let's check your memory (RAM).**\n\nOn Mac:\n1. Click the Apple menu (top-left corner)\n2. Click \"About This Mac\"\n3. Look for \"Memory\" — what number do you see?\n\nOn Windows:\n1. Right-click the Start button\n2. Click \"System\"\n3. Look for \"Installed RAM\"\n\nWhat does it say? (e.g., \"8 GB\", \"16 GB\", \"32 GB\")\n```\n\n### Step 2.2: Recommend Model Based on RAM\n\n```python\nif ram \u003C= 8:\n    model = \"qwen2.5:7b\"\n    quality = \"Good for 70% of tasks\"\n    size = \"4.4 GB download\"\nelif ram \u003C= 16:\n    model = \"qwen2.5:14b\" \n    quality = \"Good for 80% of tasks\"\n    size = \"8.5 GB download\"\nelif ram \u003C= 32:\n    model = \"qwen2.5:32b\"\n    quality = \"Near-Claude for most tasks\"\n    size = \"18 GB download\"\nelse:\n    model = \"qwen2.5:72b\"\n    quality = \"Excellent, close to Claude\"\n    size = \"40 GB download\"\n```\n\nSay:\n\n```\n**Perfect! Here's my recommendation:**\n\nWith **{{RAM}} GB** of memory, you can run **Qwen 2.5 {{size}}**.\n\n**What to expect:**\n- Quality: {{quality_description}}\n- Download size: {{size}}\n- Speed: {{speed based on chip}}\n\n**What works great offline:**\n✅ Daily planning and reviews\n✅ Meeting summaries\n✅ Task management\n✅ Note organization\n✅ Simple analysis\n\n**What's better with Claude:**\n⚠️ Complex strategic planning\n⚠️ Nuanced writing\n⚠️ Multi-step reasoning\n\nReady to set this up? It takes about 10-15 minutes (mostly download time).\n```\n\n### Step 2.3: Install Ollama\n\nCheck if Ollama is already installed:\n\n```bash\nwhich ollama || echo \"not installed\"\n```\n\nIf not installed:\n\n```\n**Step 1: Install Ollama**\n\nOllama is a free app that runs AI models on your computer.\n\n**On Mac (easiest way):**\n1. Go to: **https:\u002F\u002Follama.ai\u002Fdownload**\n2. Click \"Download for macOS\"\n3. Open the downloaded file\n4. Drag Ollama to your Applications folder\n5. Open Ollama from Applications (you'll see a llama icon in your menu bar)\n\n**On Windows:**\n1. Go to: **https:\u002F\u002Follama.ai\u002Fdownload**\n2. Click \"Download for Windows\"\n3. Run the installer\n4. Follow the prompts\n\n**Let me know when Ollama is installed and running** (you should see a llama icon in your menu bar \u002F system tray).\n```\n\n### Step 2.4: Download the Model\n\nOnce Ollama is confirmed running:\n\n```\n**Step 2: Download the AI model**\n\nNow let's download the model to your computer. This is a one-time download.\n\n**Run this command in Terminal:**\n\n```\nollama pull {{recommended_model}}\n```\n\n**How to open Terminal:**\n- Mac: Press Cmd+Space, type \"Terminal\", press Enter\n- Windows: Search for \"Command Prompt\"\n\n**Then paste the command above and press Enter.**\n\nThis will download ~{{size}}. It might take 5-15 minutes depending on your internet speed.\n\nLet me know when it says \"success\"!\n```\n\n### Step 2.5: Configure Pi for Offline\n\nOnce model is downloaded, update `~\u002F.pi\u002Fagent\u002Fmodels.json` to add Ollama:\n\n```json\n{\n  \"providers\": {\n    \"ollama\": {\n      \"baseUrl\": \"http:\u002F\u002Flocalhost:11434\u002Fv1\",\n      \"api\": \"openai-completions\", \n      \"apiKey\": \"ollama\",\n      \"models\": [\n        {\n          \"id\": \"{{recommended_model}}\",\n          \"name\": \"{{model_name}} (Offline)\",\n          \"input\": [\"text\"],\n          \"contextWindow\": 32768,\n          \"maxTokens\": 8192,\n          \"cost\": { \"input\": 0, \"output\": 0, \"cacheRead\": 0, \"cacheWrite\": 0 }\n        }\n      ]\n    }\n  }\n}\n```\n\n### Step 2.6: Test Offline Mode\n\n```\n**Step 3: Let's test it!**\n\nTry this:\n1. Turn off your WiFi (just for testing)\n2. In Pi, type `\u002Fmodel` and select \"{{model_name}} (Offline)\"\n3. Ask me something simple like \"What day is it?\"\n\nIf I respond, offline mode works! ?\n\nGo ahead and test, then turn WiFi back on and let me know how it went.\n```\n\n### Step 2.7: Confirm Success\n\n```\n**Offline mode is ready!**\n\nWhat happens now:\n- When you have internet → Amp uses Claude (best quality)\n- When you're offline → Amp can use your local model\n- You can also manually switch anytime with `\u002Fmodel`\n\n**For your next flight or train ride:**\n1. Make sure Ollama is running (llama icon in menu bar)\n2. Start Pi\u002FAmp as usual\n3. If internet isn't available, switch to your offline model\n\n**Pro tip:** Test it at home once before relying on it during travel!\n\n---\n\nWant to also set up budget cloud models to save money when online?\n```\n\nUpdate `System\u002Fuser-profile.yaml`:\n\n```yaml\nai_models:\n  offline:\n    enabled: true\n    runner: ollama\n    model: qwen2.5:14b\n    configured_date: 2026-02-04\n```\n\n---\n\n## Branch 3: Smart Routing\n\n### Step 3.1: Check What's Already Configured\n\nFirst, check what's set up:\n- Read `System\u002Fuser-profile.yaml` for `ai_models` section\n- Run `bash \"$CLAUDE_PROJECT_DIR\u002FSystem\u002Fscripts\u002Ftest-ai-connections.sh\"` silently\n\nThen adapt the explanation:\n\n**If both budget cloud and offline are configured:**\n\n```\n**Smart Routing — I'll Pick the Best Model Automatically**\n\nYou've got all three tiers set up — nice! Here's how I'll use them:\n\n| Task Type | Model | Why |\n|-----------|-------|-----|\n| Complex planning, coaching | Claude | Needs deep reasoning |\n| Daily tasks, summaries | Kimi (budget) | Good enough, saves money |\n| Quick questions | Kimi (budget) | Fast and cheap |\n| When you're offline | Qwen (local) | Only option! |\n\n**Want to enable smart routing?**\n- \"Yes\" — I'll pick automatically (you can always override)\n- \"No\" — I'll always ask before switching\n```\n\n**If only offline is configured:**\n\n```\n**Smart Routing — I'll Pick Based on What You Have**\n\nSince you set up offline mode, here's how routing works:\n\n| Task Type | Model | Why |\n|-----------|-------|-----|\n| Complex tasks | Claude | When you need the best |\n| Simple tasks | Claude | (budget not configured) |\n| When you're offline | Qwen (local) | Your backup! |\n\n**Tip:** If you add budget cloud later, I can start using cheaper models for simple tasks automatically.\n\n**Want to enable smart routing?**\n- \"Yes\" — Claude when online, local when offline\n- \"No\" — I'll always ask\n```\n\n**If only budget cloud is configured:**\n\n```\n**Smart Routing — I'll Pick Based on What You Have**\n\nSince you set up budget cloud, here's how routing works:\n\n| Task Type | Model | Why |\n|-----------|-------|-----|\n| Complex tasks | Claude | When you need the best |\n| Simple tasks | Kimi (budget) | Saves money! |\n| Offline | ❌ Not available | (not configured) |\n\n**Tip:** If you add offline mode later, you'll have a backup for travel.\n\n**Want to enable smart routing?**\n- \"Yes\" — Claude for complex, Kimi for simple\n- \"No\" — I'll always ask\n```\n\n**If neither is configured:**\n\n```\n**Smart Routing — Nothing to Route Yet!**\n\nSmart routing works best when you have alternatives set up. Right now you only have Claude.\n\nWould you like to set up:\n- \"Offline mode\" — Free, works without internet\n- \"Budget cloud\" — Cheaper models, needs ~$5-10 upfront\n- \"Neither for now\" — Stick with Claude\n```\n\n### Step 3.2: Configure Smart Routing\n\nBased on what's configured, update `System\u002Fuser-profile.yaml`:\n\n```yaml\nai_models:\n  smart_routing:\n    enabled: true\n    # Only include models that are actually configured\n    rules:\n      complex_tasks:\n        model: claude-sonnet  # Always available\n      routine_tasks:\n        model: {{budget_model_if_configured OR \"claude-sonnet\"}}\n      offline:\n        model: {{offline_model_if_configured OR null}}\n```\n\n**Confirmation message (adapts to setup):**\n\nIf budget + offline:\n```\n**Smart routing is enabled!**\n\nHere's what I'll do:\n- Complex tasks (planning, coaching) → Claude\n- Simple tasks (summaries, quick questions) → Kimi (saves money)\n- When offline → Your local model\n\nYou can always override by saying \"use Claude for this\" or \"switch to budget\".\n```\n\nIf only offline:\n```\n**Smart routing is enabled!**\n\nHere's what I'll do:\n- When online → Claude (best quality)\n- When offline → Your local model (automatic fallback)\n\nIf you add budget cloud later, I can start saving you money on simple tasks.\n```\n\nIf only budget:\n```\n**Smart routing is enabled!**\n\nHere's what I'll do:\n- Complex tasks → Claude (best quality)\n- Simple tasks → Kimi (saves money)\n\nIf you add offline mode later, you'll have a backup for travel.\n```\n\n---\n\n## Troubleshooting Section\n\n### Ollama Not Starting\n\n```\n**Ollama won't start?**\n\nTry these fixes:\n\n**Mac:**\n1. Open Applications folder\n2. Right-click Ollama → Open\n3. If blocked: System Preferences → Security → Allow Ollama\n\n**If still stuck:**\n1. Open Terminal\n2. Run: `ollama serve`\n3. Keep that window open\n\nLet me know if you see any error messages.\n```\n\n### OpenRouter Key Not Working\n\n```\n**OpenRouter key not working?**\n\nLet's debug:\n\n1. **Check key format** — Should start with `sk-or-`\n2. **Check credits** — Go to openrouter.ai\u002Fcredits, make sure you have balance\n3. **Test the key:**\n   ```\n   curl https:\u002F\u002Fopenrouter.ai\u002Fapi\u002Fv1\u002Fmodels \\\n     -H \"Authorization: Bearer YOUR_KEY_HERE\"\n   ```\n   \n   You should see a list of models, not an error.\n\n4. **Regenerate key** — Go to openrouter.ai\u002Fkeys, delete old key, make new one\n\nWhat do you see when you try the test?\n```\n\n### Model Too Slow\n\n```\n**Local model running slow?**\n\nThis usually means the model is too big for your RAM.\n\n**Fix options:**\n1. **Try a smaller model:**\n   ```\n   ollama pull qwen2.5:7b\n   ```\n   (smaller = faster, but slightly less capable)\n\n2. **Close other apps** — Free up memory\n\n3. **Check Activity Monitor** (Mac) or Task Manager (Windows)\n   - If RAM is maxed out, you need a smaller model\n\nWant me to help you switch to a smaller model?\n```\n\n---\n\n## Edge Cases\n\n### User Has No Credit Card\n\n```\n**No credit card for OpenRouter?**\n\nSome alternatives:\n\n1. **Gemini Flash Free Tier** — Google offers free usage (with limits)\n   I can set that up instead\n\n2. **Offline Only** — Skip budget cloud, just use local models\n   Free forever, works without internet\n\n3. **Anthropic Direct** — If you have Claude credits already, we can optimize usage\n\nWhich works for you?\n```\n\n### User on Very Old Hardware\n\n```\n**Older computer detected**\n\nWith {{RAM}} GB RAM, local AI will be very slow.\n\n**Better options for you:**\n1. **Budget cloud only** — Uses internet, but works on any computer\n2. **Stick with Claude** — Best quality, works everywhere\n\nOffline mode really needs 8GB+ RAM to be useful.\n\nWant to set up budget cloud instead?\n```\n\n---\n\n## Success Metrics\n\nAfter setup, track in `System\u002Fusage_log.md`:\n- [ ] Configured budget cloud models\n- [ ] Configured offline mode  \n- [ ] Enabled smart routing\n- [ ] Used budget model for a task\n- [ ] Used offline model\n\n---\n\n## Post-Setup Summary\n\nAfter any setup completes, show an adaptive summary and offer smart routing:\n\n### If only offline was set up:\n\n```\n**Setup Complete!** ✅\n\n| Mode | Status |\n|------|--------|\n| Premium (Claude) | ✅ Always available |\n| Budget Cloud | ❌ Not configured |\n| Offline Mode | ✅ Ready (Qwen 2.5) |\n\n**How to use offline mode:**\n- When you're online: Amp uses Claude (best quality)\n- When you're offline: Switch with `\u002Fmodel` or say \"use offline model\"\n- Or I can switch automatically when I detect you're offline\n\n**Want to enable smart routing?** (I'll automatically use your local model when offline)\n- \"Yes\" — Enable automatic switching\n- \"No\" — I'll ask before switching\n\nYou can add budget cloud later with `\u002Fai-setup` if you want to save money.\n```\n\n### If only budget cloud was set up:\n\n```\n**Setup Complete!** ✅\n\n| Mode | Status |\n|------|--------|\n| Premium (Claude) | ✅ Always available |\n| Budget Cloud | ✅ Ready (Kimi K2.5) |\n| Offline Mode | ❌ Not configured |\n\n**How to use budget models:**\n- Say \"use budget model\" or \"use Kimi\"\n- Or use `\u002Fmodel` to switch manually\n- Or I can pick automatically based on task complexity\n\n**Want to enable smart routing?** (I'll use Kimi for simple tasks, Claude for complex ones)\n- \"Yes\" — Enable automatic switching\n- \"No\" — I'll ask before switching\n\nYou can add offline mode later with `\u002Fai-setup` for travel.\n```\n\n### If both were set up:\n\n```\n**Setup Complete!** ✅\n\n| Mode | Status | Model |\n|------|--------|-------|\n| Premium | ✅ | Claude Sonnet |\n| Budget | ✅ | Kimi K2.5 |\n| Offline | ✅ | Qwen 2.5 |\n\n**You have maximum flexibility!**\n\n**Want to enable smart routing?** \nI'll automatically:\n- Use Claude for complex tasks (planning, coaching)\n- Use Kimi for simple tasks (summaries, quick questions) — saves money\n- Use your local model when offline — automatic fallback\n\n- \"Yes\" — Enable smart routing\n- \"No\" — I'll ask each time\n\n**Quick reference:**\n- \"Use Kimi\" → Switch to budget\n- \"Use Claude\" → Switch to premium\n- `\u002Fmodel` → Manual picker\n- `\u002Fai-status` → Check configuration\n```\n\n## Track Usage (Silent)\n\nUpdate `System\u002Fusage_log.md` to mark AI setup as used.\n\n**Analytics (Silent):**\n\nCall `track_event` with event_name `ai_setup_completed` and properties:\n- `mode` (budget_cloud\u002Foffline\u002Fsmart_routing)\n\nThis only fires if the user has opted into analytics. No action needed if it returns \"analytics_disabled\".\n\n---\n\n## Follow-up Skill: \u002Fai-status\n\nUsers can check their AI setup anytime:\n\n```\n\u002Fai-status\n\n**Your AI Configuration**\n\n| Mode | Status | Model |\n|------|--------|-------|\n| Premium | ✅ | Claude Sonnet |\n| Budget | {{✅ \u002F ❌}} | {{Kimi K2.5 \u002F Not configured}} |\n| Offline | {{✅ \u002F ❌}} | {{Qwen 2.5 \u002F Not configured}} |\n| Smart Routing | {{✅ Enabled \u002F ❌ Disabled}} | |\n\n**This session:** Using {{current_model}}\n{{If OpenRouter configured:}} **OpenRouter credits:** ${{balance}} remaining\n{{If Ollama configured:}} **Ollama status:** {{Running ✅ \u002F Not running ⚠️}}\n\n**Quick actions:**\n- `\u002Fmodel` — Switch models\n- `\u002Fai-setup` — Configure more options\n- \"Use budget model\" — Quick switch\n```\n",{"name":5,"description":7},"main","5417cad9215b767627c7c947dcb3a0bbe3ebe52d",".claude\u002Fskills\u002Fai-setup",0,"https:\u002F\u002Fgithub.com\u002Fhemory\u002Famp-legacy-do-not-use","https:\u002F\u002Fgithub.com\u002Fhemory","https:\u002F\u002Fwww.heminthehat.com\u002F","The People Developer | L&D Program Manager | Software Engineer","2026-06-04 23:46:30",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add hemory\u002Famp-legacy-do-not-use --skill ai-setup",{"tool":55,"command":56},"bunx","bunx skills add hemory\u002Famp-legacy-do-not-use --skill ai-setup",{"tool":58,"command":59},"pnpm","pnpm dlx skills add hemory\u002Famp-legacy-do-not-use --skill ai-setup","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhemory\u002Famp-legacy-do-not-use\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fai-setup\u002FSKILL.md",true,[],[64,98,107,121,136,148],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":78,"publishedAt":35},"01M6D3DVEAHJTTK4W21B15ZZKK","zoom-setup","Connect Zoom to Amp for meeting recordings, scheduling, and transcript context","https:\u002F\u002Fgithub.com\u002Fhemory\u002Famp-legacy-do-not-use\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fzoom-setup\u002FSKILL.md",[70,75],{"categoryNo":71,"categoryName":72,"taxonomyType":73,"taxonomyTypeDesc":74},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",{"categoryNo":76,"categoryName":77,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000034","行政与办公人员",[79,24,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],"zoom setup","schedule","MCP","review","connect","transcript","search","stats","oauth2","confirmation","context","meetings","process","recordings","surfaces","scheduling","granola","time","distribution",{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":35},"01M6D3DRAK8VWESYDZDF8JJDSH","xray","Understand what just happened under the hood - learn AI by seeing it in action","https:\u002F\u002Fgithub.com\u002Fhemory\u002Famp-legacy-do-not-use\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fxray\u002FSKILL.md",[],[100,105,106],"learn","just",{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":114,"publishedAt":35},"01M6D3DN7BZQDY6143A2QSDP9A","week-review","Review week's progress with concrete accomplishments (not fake percentages), pattern detection, and goal tracking.","https:\u002F\u002Fgithub.com\u002Fhemory\u002Famp-legacy-do-not-use\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fweek-review\u002FSKILL.md",[113],{"categoryNo":71,"categoryName":72,"taxonomyType":73,"taxonomyTypeDesc":74},[115,82,116,117,118,119,120],"week review","pattern detection","detection","tracking","goal","pattern",{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":127,"publishedAt":35},"01M6D3DJ7F1TCFXBBSTQW82WE7","week-plan","Set weekly priorities and plan the week ahead with intelligent suggestions based on goals, calendar shape, and task effort.","https:\u002F\u002Fgithub.com\u002Fhemory\u002Famp-legacy-do-not-use\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fweek-plan\u002FSKILL.md",[],[128,129,130,131,132,133,134,135],"week plan","plan","calendar","SET","shape","goals","task","priorities",{"skillNo":137,"name":138,"nameZh":6,"description":139,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":140,"categories":141,"keywords":142,"publishedAt":35},"01M6D3DF90D7RC8ZJE4AW2P9VC","triage","Strategically route orphaned files and extract scattered tasks","https:\u002F\u002Fgithub.com\u002Fhemory\u002Famp-legacy-do-not-use\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ftriage\u002FSKILL.md",[],[138,143,144,145,146,147],"tasks","fast","extract","files","route",{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":158,"publishedAt":35},"01M6D3DC9BBHK5TASE34SQYXSQ","trello-setup","Connect Trello to Amp for visual Kanban task sync","https:\u002F\u002Fgithub.com\u002Fhemory\u002Famp-legacy-do-not-use\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ftrello-setup\u002FSKILL.md",[154,157],{"categoryNo":155,"categoryName":156,"taxonomyType":73,"taxonomyTypeDesc":74},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":71,"categoryName":72,"taxonomyType":73,"taxonomyTypeDesc":74},[159,160,24,161,83,81,162,134,163,164,165,166,167],"trello","trello setup","sync","token","kanban","bun","visual","api","server"]