friday-router
暂无简介
- License 许可
- MIT
- 最近更新
- 2026-06-07
- Stars
- ★ 0
- Forks
- 1
03 SKILL.md 正文
IntentRouter
Your AI's Smart Traffic Director: Precisely Matching Your OpenClaw Tasks to the Perfect LLM.
v1.7.0 — Security-focused release. COMPLEX tier, absolute paths. Tested and working with OpenClaw TUI delegation. Removed gateway auth secret exposure and gateway management for improved security.
IntentRouter analyzes your tasks and directs them to the best LLM—MiniMax 2.5 for code, Kimi k2.5 for creative, Grok Fast for research. Eliminate guesswork; route with purpose.
Security improvements in v1.7.0: Removed gateway auth token/password from router output. Gateway management removed - use gateway-guard skill separately. FACEPALM integration removed - use FACEPALM skill separately.
Requirements: OpenRouter — All model IDs use the openrouter/... prefix. Configure OpenClaw with an OpenRouter API key so one auth profile covers every tier.
Config access: This skill reads ONLY its own config.json file (located in the skill directory) for model configuration and routing rules. It does NOT read openclaw.json, does NOT access gateway tokens/passwords, and does NOT perform any gateway management operations. Router output contains only: task, model, sessionTarget, and optional label — no secrets or credentials.
Default / orchestrator model: Gemini 2.5 Flash (openrouter/google/gemini-2.5-flash) — fast, cheap, reliable at tool-calling. The router delegates tasks to tier-specific sub-agents (Kimi for creative, MiniMax 2.5 for code, etc.).
Orchestrator flow (mandatory for task requests)
When you are the main agent (Gemini 2.5 Flash) and the user gives you a task (code, research, write, create, design, poem, story, fix, build, etc.), you must delegate it. You do not perform the task yourself; a sub-agent does.
Steps (all three required):
-
Run IntentRouter to get spawn params:
python3 workspace/skills/friday-router/scripts/router.py spawn --json "<user message>"Example output:
{"task":"write a poem about Mai","model":"openrouter/moonshotai/kimi-k2.5","sessionTarget":"isolated"} -
Immediately call
sessions_spawnwith the router's output. Use the exactmodelfrom the JSON. Example:sessions_spawn(task="write a poem about Mai", model="openrouter/moonshotai/kimi-k2.5", sessionTarget="isolated")Do not change the
modelvalue. If the router saidopenrouter/moonshotai/kimi-k2.5, pass exactly that. -
Forward the sub-agent's reply to the user. That reply IS the task output. Say "Using: Kimi k2.5" (the model that actually ran). Never say "Using: Claude Sonnet 4" or any model that didn't run. Output hygiene: If the sub-agent result contains internal text ("A subagent task … completed", "Findings:", "Stats:", "sessionKey", "Summarize this naturally"), strip that block and show only the final user-facing content to the user.
If sessions_spawn returns an error (e.g. device_token_mismatch): tell the user delegation failed and suggest checking gateway status or using the gateway-guard skill. Do not do the task yourself.
Hard-stop rule: If sessions_spawn fails or is skipped, return only the delegation error and next-step fix. Do not write the requested output directly.
No-classify execution rule: For real user tasks, do not execute via classify. classify is diagnostics only. Execution must use spawn --json -> sessions_spawn.
Label gate: Only print Using: <model> after successful spawn. If no successful spawn, do not print a Using: label.
Output hygiene: Never return internal orchestration metadata to the user (no session keys/IDs, transcript paths, runtime/token stats, or internal "summarize this" instructions). Forward only clean user-facing content.
Exception: Meta-questions ("what model are you?", "how does routing work?") you answer yourself.
Security note: This skill does NOT expose gateway auth secrets (tokens/passwords) in its output. Gateway management functionality has been removed. Use the separate gateway-guard skill if gateway auth management is needed.
Model Selection (Austin's Prefs)
| Use Case | Primary (OpenRouter) | Fallback |
|---|---|---|
| Default / orchestrator | Gemini 2.5 Flash | — |
| Fast/cheap | Gemini 2.5 Flash | Gemini 1.5 Flash, Haiku |
| Reasoning | GLM-5 | Minimax 2.5 |
| Creative/Frontend | Kimi k2.5 | — |
| Research | Grok Fast | — |
| Code/Engineering | MiniMax 2.5 | Qwen2.5-Coder |
| Quality/Complex | GLM 4.7 Flash | GLM 4.7, Sonnet 4, GPT-4o |
| Vision/Images | GPT-4o | — |
All model IDs use openrouter/ prefix (e.g. openrouter/moonshotai/kimi-k2.5).
Usage
CLI
python scripts/router.py default # Show default model
python scripts/router.py classify "fix lint errors" # Classify → tier + model
python scripts/router.py spawn --json "write a poem" # JSON for sessions_spawn (no gateway secrets)
python scripts/router.py models # List all models
Note: Gateway auth management is not included. Use gateway-guard skill separately if needed.
sessions_spawn examples
Creative task (poem):
router output: {"task":"write a poem","model":"openrouter/moonshotai/kimi-k2.5","sessionTarget":"isolated"}
→ sessions_spawn(task="write a poem", model="openrouter/moonshotai/kimi-k2.5", sessionTarget="isolated")
Code task (bug fix):
router output: {"task":"fix the login bug","model":"openrouter/minimax/minimax-m2.5","sessionTarget":"isolated"}
→ sessions_spawn(task="fix the login bug", model="openrouter/minimax/minimax-m2.5", sessionTarget="isolated")
Research task:
router output: {"task":"research best LLMs","model":"openrouter/x-ai/grok-4.1-fast","sessionTarget":"isolated"}
→ sessions_spawn(task="research best LLMs", model="openrouter/x-ai/grok-4.1-fast", sessionTarget="isolated")
Tier Detection
- FAST: check, get, list, show, status, monitor, fetch, simple
- REASONING: prove, logic, analyze, derive, math, step by step
- CREATIVE: creative, write, story, design, UI, UX, frontend, website (website/frontend/landing projects → Kimi k2.5 only; do not use CODE tier)
- RESEARCH: research, find, search, lookup, web, information
- CODE: code, function, debug, fix, implement, refactor, test, React, JWT (code/API only; not website builds)
- QUALITY: complex, architecture, design, system, comprehensive
- VISION: image, picture, photo, screenshot, visual
What Changed from Original
| Bug | Fix |
|---|---|
| Simple indicators inverted (high match = complex) | Now correctly: high simple keyword match = FAST tier |
| Agentic tasks not bumping tier | Multi-step tasks now properly bump to CODE tier |
| Vision tasks misclassified | Vision keywords now take priority over other classifications |
| Code keywords not detected | Added React, JWT, API, and other common code terms |
| Confidence always low | Now varies appropriately based on keyword match strength |
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
ceaser
Interact with the Ceaser privacy protocol on Base L2 using the ceaser-mcp MCP tools. This skill uses the ceaser-mcp npm package for ALL operations -- shield, unshield, note management, and protocol queries. All ceaser tool calls use CLI subcommands (npx -y ceaser-mcp <subcommand>). Ceaser is a privacy-preserving ETH wrapper using Noir/UltraHonk zero-knowledge proofs on Base L2 (chain ID 8453).
ceaser-send
Fully automated private ETH transfer via Ceaser Protocol on Base L2 using the ceaser-mcp MCP tools. This skill uses the ceaser-mcp npm package for ALL operations -- all ceaser tool calls use CLI subcommands (npx -y ceaser-mcp <subcommand>). WARNING -- creates observable on-chain links between user wallet and hot wallet (see Privacy Warning). Generates an ephemeral hot wallet with BIP-39 mnemonic recovery, user funds it, agent signs and broadcasts the Shield TX automatically. Exactly one manual step required (funding the hot wallet with ETH). Uses Noir/UltraHonk zero-knowledge proofs.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
moldium
Post and manage content on the Moldium blog platform. Triggered by "post to Moldium", "write a blog post", "publish an article", etc.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, submit comments, search papers, and import papers. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, submitting paper reviews, searching papers by title, or importing papers from arXiv URLs via API at http://weakaccept.top:8000/.