[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M72T56885B7BKXHKHRWR2FWD":3,"skill-same:01M72T56885B7BKXHKHRWR2FWD":50},{"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":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":14,"repositoryHtmlUrl":32,"repositoryHomepageUrl":32,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":34,"updatedAt":35,"install":36,"resources":49},"01M72T56885B7BKXHKHRWR2FWD","llm-orchestration",null,"SWAL Unified LLM Orchestration - Combines resource monitoring, multi-key Gemini management, and OpenRouter routing. Intelligent provider selection for code, fast, deep, and reasoning tasks. Version 1.0 | Updated 2026-04-23","iberi22\u002Fskills","iberi22","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F10615454?v=4","01M72SQ2NXAA3GW0FSH053A5ES","Brahyan Belalcazar","01M72SQ2PYCH0SSA1K61NGEHDV",0,"MIT","https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgeneral\u002Fllm-orchestration\u002FSKILL.md",[],[],"2026-11-10 22:39:42",false,"---\nname: llm-orchestration\ndescription: \"SWAL Unified LLM Orchestration - Combines resource monitoring, multi-key Gemini management, and OpenRouter routing. Intelligent provider selection for code, fast, deep, and reasoning tasks. Version 1.0 | Updated 2026-04-23\"\nmetadata:\n  author: swal\n  updated: \"2026-04-23\"\n  openclaw:\n    autoLoad: false\n  version: \"1.0.0\"\n  unified: \"2026-04-23\"\n---\n\n# LLM Orchestration — Unified SWAL LLM Provider System\n\n> **⚡ Intelligent Routing Across All LLM Providers**\n\nCombines `llm-resource-monitor` + `gemini-key-pool` + `openrouter` into a single unified orchestration system.\n\n---\n\n## 🎯 PURPOSE\n\nUnified monitoring and intelligent orchestration of all LLM providers:\n\n1. **Scans** provider capabilities (context, limits, cost)\n2. **Tracks** usage in real-time (RPM, daily, tokens)\n3. **Manages** multi-key failover (Gemini-specific)\n4. **Routes** tasks to optimal provider based on requirements\n5. **Orchestrates** intelligent fallback on rate limits\n\n---\n\n## 📊 UNIFIED PROVIDER STATUS\n\n| Provider | Context | Daily Limit | RPM | Cost | Best For |\n|----------|---------|-------------|-----|------|----------|\n| 🟢 **Groq** | 128K | 14,400 | 30 | Free | Fast tasks, speed |\n| 🔵 **Gemini #1-4** | 1M | 1,500\u002Fkey | 15 | Free | Deep reasoning |\n| 🟡 **DeepSeek** | 163K | 10,000 | 60 | $0.81 | Reasoning, cheap |\n| 🟠 **OpenRouter** | 262K | 200 | 20 | $0.35 | Model variety |\n| 🟣 **MiniMax** | ∞ | ∞ | ∞ | Unlimited | Coding, fallback |\n| 🔵 **Codex (GPT-5.4)** | 258K→1M | 30-150\u002F5h | varies | Plus | Heavy coding |\n\n---\n\n## 🚀 USAGE\n\n### Dashboard (Full Status)\n```bash\nnode scripts\u002Fllm-resource-monitor.js status\n```\n\n### Best Provider for Task\n```bash\nnode scripts\u002Fllm-resource-monitor.js best code\nnode scripts\u002Fllm-resource-monitor.js best fast\nnode scripts\u002Fllm-resource-monitor.js best deep\nnode scripts\u002Fllm-resource-monitor.js best cheap\n```\n\n### Intelligent Orchestration\n```bash\nnode scripts\u002Fllm-resource-monitor.js orchestrate code 50000\n```\n\n### Record Usage\n```bash\nnode scripts\u002Fllm-resource-monitor.js record groq 500\n```\n\n---\n\n## 🔑 GEMINI KEY POOL (Multi-Key Management)\n\n**⚠️ CRITICAL:** Each key must be from a DIFFERENT Google AI Studio project.\n\n### Environment Variables\n```bash\nexport GOOGLE_API_KEY=\"key-from-project-1\"\nexport GOOGLE_API_KEY_2=\"key-from-project-2\"\nexport GOOGLE_API_KEY_3=\"key-from-project-3\"\nexport GOOGLE_API_KEY_4=\"key-from-project-4\"\n```\n\n### Check Status\n```bash\nnode scripts\u002Fgemini-key-pool.js status\n```\n\n### Make a Request\n```bash\nnode scripts\u002Fgemini-key-pool.js call --prompt \"...\" --model gemini-3.1-pro\n```\n\n### Deep Research\n```bash\nnode scripts\u002Fgemini-key-pool.js research \"complex query\"\n```\n\n### Key Status Display\n\n| Status | Meaning | Action |\n|--------|---------|--------|\n| 🟢 OK | \u003C50% used | Normal use |\n| 🟡 MEDIUM | 50-80% | Consider switching |\n| 🔴 HIGH | 80-100% | Switch provider |\n| ⏸️ EXHAUSTED | Rate limited | Wait 1 hour |\n\n### Capacity Calculation\n\n| Keys | Requests\u002FDay | Use Case |\n|------|--------------|----------|\n| 1 | 1,500 | Light usage |\n| 2 | 3,000 | Moderate usage |\n| 4 | 6,000 | Heavy usage (recommended) |\n\n---\n\n## 🌐 OPENROUTER (Free Models)\n\n### Free Models Available\n\n| Model | Context | Best For |\n|-------|---------|----------|\n| **DeepSeek R1** | 128K | Reasoning, debugging |\n| **Qwen3.5-9B** | 32K | Light tasks, quick fixes |\n| **Elephant Alpha** | 256K | General intelligence |\n| **Qwen3.6 Plus Preview** | 1M | Complex analysis |\n\n### Setup\n```bash\n# Set API key\nexport OPENROUTER_API_KEY=\"sk-or-v1-your-key\"\n\n# Configure in OpenCode\nopencode run --model deepseek\u002Fdeepseek-r1 \"task\"\n```\n\n---\n\n## 🎯 TASK TYPE ROUTING\n\n| Task | Primary | Secondary | Notes |\n|------|---------|-----------|-------|\n| `code` | MiniMax | Groq | OpenCode for coding |\n| `fast` | Groq | MiniMax | Groq for speed |\n| `deep` \u002F `research` | Gemini #1-4 | DeepSeek | 1M context |\n| `reasoning` | DeepSeek | Groq | Reasoning tasks |\n| `cheap` | DeepSeek | OpenRouter | Budget-friendly |\n| `heavy` | Codex (GPT-5.4) | MiniMax | Plus account |\n\n---\n\n## 🔍 SCANNING LOGIC\n\nThe scanner evaluates:\n\n1. **Context Match** — Can handle tokens needed?\n2. **Daily Limit** — Enough remaining quota?\n3. **RPM** — Under rate limit currently?\n4. **Cost** — Within budget?\n5. **Strengths** — Task-specific optimizations?\n\nOutput: Ranked list of providers with scores.\n\n---\n\n## ⚠️ ALERT LEVELS\n\n| Level | Meaning | Action |\n|-------|---------|--------|\n| 🟢 OK | \u003C60% | Normal operation |\n| 🟡 WARNING | 60-80% | Monitor closely |\n| 🔴 CRITICAL | 80-100% | Consider fallback |\n| ⚫ EXHAUSTED | 100% | Use fallback immediately |\n| ⏸️ COOLDOWN | Rate limited | Wait for cooldown |\n\n---\n\n## 🔄 INTEGRATION POINTS\n\n### From LLM Router\n```javascript\nconst { ResourceMonitor } = require('.\u002Fllm-resource-monitor.js');\nconst monitor = new ResourceMonitor();\nconst best = monitor.getBestProvider('code', 50000);\n```\n\n### From Gemini Key Pool\n```javascript\n\u002F\u002F After 429 error, mark cooldown\nmonitor.setCooldown('gemini-1', new Date(Date.now() + 60000));\n```\n\n### Record After API Call\n```javascript\nmonitor.record('groq', 2500);\n```\n\n---\n\n## 📁 DATA FILES\n\n| File | Purpose |\n|------|---------|\n| `config\u002Fllm-resource-state.json` | Current usage state |\n| `config\u002Fllm-providers.json` | Provider configurations |\n| `config\u002Fllm-capability-scan.json` | Last capability scan |\n\n---\n\n## 💡 BEST PRACTICES\n\n### For Maximum Capacity\n1. **Create 4+ Google projects** for Gemini — Each = 1,500 req\u002Fday\n2. **Use MiniMax for coding** — Unlimited, fast\n3. **Use Groq for quick tasks** — Fast, free\n4. **Reserve Gemini for deep research** — 1M context when needed\n\n### Model Selection Quick Guide\n```\nHeavy coding → Codex (GPT-5.4) or MiniMax\nFast tasks → Groq\nDeep research → Gemini 3.1 Pro (1M context)\nReasoning\u002Fdebugging → DeepSeek R1\nBudget tasks → DeepSeek or OpenRouter\n```\n\n---\n\n## Related Skills\n\n- `free-llm-providers` — Provider details and API setup\n- `subagent-launcher` — Subagent orchestration\n- `xavier-memory` — Xavier memory integration\n\n**Version:** 1.0.0\n**Unified:** 2026-04-23\n**Status:** ✅ OPERATIONAL\n","# LLM Orchestration — Unified SWAL LLM Provider System\n\n> **⚡ Intelligent Routing Across All LLM Providers**\n\nCombines `llm-resource-monitor` + `gemini-key-pool` + `openrouter` into a single unified orchestration system.\n\n---\n\n## 🎯 PURPOSE\n\nUnified monitoring and intelligent orchestration of all LLM providers:\n\n1. **Scans** provider capabilities (context, limits, cost)\n2. **Tracks** usage in real-time (RPM, daily, tokens)\n3. **Manages** multi-key failover (Gemini-specific)\n4. **Routes** tasks to optimal provider based on requirements\n5. **Orchestrates** intelligent fallback on rate limits\n\n---\n\n## 📊 UNIFIED PROVIDER STATUS\n\n| Provider | Context | Daily Limit | RPM | Cost | Best For |\n|----------|---------|-------------|-----|------|----------|\n| 🟢 **Groq** | 128K | 14,400 | 30 | Free | Fast tasks, speed |\n| 🔵 **Gemini #1-4** | 1M | 1,500\u002Fkey | 15 | Free | Deep reasoning |\n| 🟡 **DeepSeek** | 163K | 10,000 | 60 | $0.81 | Reasoning, cheap |\n| 🟠 **OpenRouter** | 262K | 200 | 20 | $0.35 | Model variety |\n| 🟣 **MiniMax** | ∞ | ∞ | ∞ | Unlimited | Coding, fallback |\n| 🔵 **Codex (GPT-5.4)** | 258K→1M | 30-150\u002F5h | varies | Plus | Heavy coding |\n\n---\n\n## 🚀 USAGE\n\n### Dashboard (Full Status)\n```bash\nnode scripts\u002Fllm-resource-monitor.js status\n```\n\n### Best Provider for Task\n```bash\nnode scripts\u002Fllm-resource-monitor.js best code\nnode scripts\u002Fllm-resource-monitor.js best fast\nnode scripts\u002Fllm-resource-monitor.js best deep\nnode scripts\u002Fllm-resource-monitor.js best cheap\n```\n\n### Intelligent Orchestration\n```bash\nnode scripts\u002Fllm-resource-monitor.js orchestrate code 50000\n```\n\n### Record Usage\n```bash\nnode scripts\u002Fllm-resource-monitor.js record groq 500\n```\n\n---\n\n## 🔑 GEMINI KEY POOL (Multi-Key Management)\n\n**⚠️ CRITICAL:** Each key must be from a DIFFERENT Google AI Studio project.\n\n### Environment Variables\n```bash\nexport GOOGLE_API_KEY=\"key-from-project-1\"\nexport GOOGLE_API_KEY_2=\"key-from-project-2\"\nexport GOOGLE_API_KEY_3=\"key-from-project-3\"\nexport GOOGLE_API_KEY_4=\"key-from-project-4\"\n```\n\n### Check Status\n```bash\nnode scripts\u002Fgemini-key-pool.js status\n```\n\n### Make a Request\n```bash\nnode scripts\u002Fgemini-key-pool.js call --prompt \"...\" --model gemini-3.1-pro\n```\n\n### Deep Research\n```bash\nnode scripts\u002Fgemini-key-pool.js research \"complex query\"\n```\n\n### Key Status Display\n\n| Status | Meaning | Action |\n|--------|---------|--------|\n| 🟢 OK | \u003C50% used | Normal use |\n| 🟡 MEDIUM | 50-80% | Consider switching |\n| 🔴 HIGH | 80-100% | Switch provider |\n| ⏸️ EXHAUSTED | Rate limited | Wait 1 hour |\n\n### Capacity Calculation\n\n| Keys | Requests\u002FDay | Use Case |\n|------|--------------|----------|\n| 1 | 1,500 | Light usage |\n| 2 | 3,000 | Moderate usage |\n| 4 | 6,000 | Heavy usage (recommended) |\n\n---\n\n## 🌐 OPENROUTER (Free Models)\n\n### Free Models Available\n\n| Model | Context | Best For |\n|-------|---------|----------|\n| **DeepSeek R1** | 128K | Reasoning, debugging |\n| **Qwen3.5-9B** | 32K | Light tasks, quick fixes |\n| **Elephant Alpha** | 256K | General intelligence |\n| **Qwen3.6 Plus Preview** | 1M | Complex analysis |\n\n### Setup\n```bash\n# Set API key\nexport OPENROUTER_API_KEY=\"sk-or-v1-your-key\"\n\n# Configure in OpenCode\nopencode run --model deepseek\u002Fdeepseek-r1 \"task\"\n```\n\n---\n\n## 🎯 TASK TYPE ROUTING\n\n| Task | Primary | Secondary | Notes |\n|------|---------|-----------|-------|\n| `code` | MiniMax | Groq | OpenCode for coding |\n| `fast` | Groq | MiniMax | Groq for speed |\n| `deep` \u002F `research` | Gemini #1-4 | DeepSeek | 1M context |\n| `reasoning` | DeepSeek | Groq | Reasoning tasks |\n| `cheap` | DeepSeek | OpenRouter | Budget-friendly |\n| `heavy` | Codex (GPT-5.4) | MiniMax | Plus account |\n\n---\n\n## 🔍 SCANNING LOGIC\n\nThe scanner evaluates:\n\n1. **Context Match** — Can handle tokens needed?\n2. **Daily Limit** — Enough remaining quota?\n3. **RPM** — Under rate limit currently?\n4. **Cost** — Within budget?\n5. **Strengths** — Task-specific optimizations?\n\nOutput: Ranked list of providers with scores.\n\n---\n\n## ⚠️ ALERT LEVELS\n\n| Level | Meaning | Action |\n|-------|---------|--------|\n| 🟢 OK | \u003C60% | Normal operation |\n| 🟡 WARNING | 60-80% | Monitor closely |\n| 🔴 CRITICAL | 80-100% | Consider fallback |\n| ⚫ EXHAUSTED | 100% | Use fallback immediately |\n| ⏸️ COOLDOWN | Rate limited | Wait for cooldown |\n\n---\n\n## 🔄 INTEGRATION POINTS\n\n### From LLM Router\n```javascript\nconst { ResourceMonitor } = require('.\u002Fllm-resource-monitor.js');\nconst monitor = new ResourceMonitor();\nconst best = monitor.getBestProvider('code', 50000);\n```\n\n### From Gemini Key Pool\n```javascript\n\u002F\u002F After 429 error, mark cooldown\nmonitor.setCooldown('gemini-1', new Date(Date.now() + 60000));\n```\n\n### Record After API Call\n```javascript\nmonitor.record('groq', 2500);\n```\n\n---\n\n## 📁 DATA FILES\n\n| File | Purpose |\n|------|---------|\n| `config\u002Fllm-resource-state.json` | Current usage state |\n| `config\u002Fllm-providers.json` | Provider configurations |\n| `config\u002Fllm-capability-scan.json` | Last capability scan |\n\n---\n\n## 💡 BEST PRACTICES\n\n### For Maximum Capacity\n1. **Create 4+ Google projects** for Gemini — Each = 1,500 req\u002Fday\n2. **Use MiniMax for coding** — Unlimited, fast\n3. **Use Groq for quick tasks** — Fast, free\n4. **Reserve Gemini for deep research** — 1M context when needed\n\n### Model Selection Quick Guide\n```\nHeavy coding → Codex (GPT-5.4) or MiniMax\nFast tasks → Groq\nDeep research → Gemini 3.1 Pro (1M context)\nReasoning\u002Fdebugging → DeepSeek R1\nBudget tasks → DeepSeek or OpenRouter\n```\n\n---\n\n## Related Skills\n\n- `free-llm-providers` — Provider details and API setup\n- `subagent-launcher` — Subagent orchestration\n- `xavier-memory` — Xavier memory integration\n\n**Version:** 1.0.0\n**Unified:** 2026-04-23\n**Status:** ✅ OPERATIONAL\n",{"name":5,"metadata":24,"description":7},{"author":25,"unified":26,"updated":26,"version":27,"openclaw":28},"swal","2026-04-23","1.0.0",{"autoLoad":20},"main","688810f2886d212632acf81e532b24e483dd8b98","skills\u002Fgeneral\u002Fllm-orchestration","https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills","https:\u002F\u002Fgithub.com\u002Fiberi22","Senior WEB Full-Stack","2026-10-12 02:46:21",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add iberi22\u002Fskills --skill llm-orchestration",{"tool":42,"command":43},"bunx","bunx skills add iberi22\u002Fskills --skill llm-orchestration",{"tool":45,"command":46},"pnpm","pnpm dlx skills add iberi22\u002Fskills --skill llm-orchestration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgeneral\u002Fllm-orchestration\u002FSKILL.md",true,[],[51,57,64,70,76,82],{"skillNo":52,"name":53,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M72TWQEQD46ZC9TRBAABF78P","web-design-guidelines","https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fweb\u002Fweb-design-guidelines\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M72TWMQFTYD08DGXVAXRPPEB","blocked-page-recovery","Use when a fetch fails: 403\u002F429, paywall, WAF, bot wall. Recovers the page via archives and provenance-checked fallbacks.","https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fweb\u002Fblocked-page-recovery\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M72TVQMS3HCTX18C8T97WTQQ","studio-coach","https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftools\u002Fstudio-coach\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M72TVNA2PR9RZW0ZAXYP1G6J","src-generator","https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftools\u002Fsrc-generator\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M72TVEJHHB6SAT3R3TY9MJKS","sqlite-pro","https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftools\u002Fsqlite-pro\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M72TVC2EVBHQHCX96VTTYKB8","rigor-evaluator","Use when you need a quick heuristic rigor score (10 criteria, 0-2 each) for the features in a .gitcore\u002Ffeatures.json file, to decide which features are ready to ship.","https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftools\u002Frigor-evaluator\u002FSKILL.md",[],[]]