skills/agent-portfolio-router/SKILL.md
--- name: agent-portfolio-router description: Routes tasks to the right agent or tool stack — MiniMax CLI vs Codex vs Pi vs subagent vs local tools. Activates when: (1) Arif asks to do something complex that might need sub-agents; (2) a task matches multiple tool/skill profiles; (3) when Arif asks "which agent should handle this". Logs routing decision with reasoning trace so the routing logic itself is auditable. metadata: {"openclaw": {"emoji": "🧭"}} --- # Agent Portfolio Router — Choose the
npx skillsauth add ariffazil/openclaw-workspace skills/agent-portfolio-routerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
When a task arrives, route it to the right actor. This skill prevents two failure modes: over-engineering (spawning Codex for a one-liner) and under-engineering (using a weak model for a complex task).
TASK
│
├─ Simple question / factual lookup?
│ └─ YES → web_search or mmx search → direct answer
│
├─ Multimodal generation (image/video/music/speech)?
│ └─ YES → mmx CLI → mmx-quota-guard first
│
├─ Deep research with synthesis?
│ └─ YES → mmx-text-researcher skill
│
├─ Coding / building / iterating on code?
│ ├─ Simple edit / one-liner → use exec + write/edit tools
│ └─ Complex build / new feature / refactor → sessions_spawn Codex
│ (in temp dir for PR reviews, in project dir for builds)
│
├─ Parallel independent tasks?
│ └─ YES → sessions_spawn multiple subagents in parallel
│
├─ Task requires different perspective / adversarial check?
│ └─ YES → sessions_spawn Pi or second model instance
│
├─ Arif's own infrastructure (arifOS MCP, GEOX, configs)?
│ └─ YES → use exec/tools directly, delta-logger active
│
└─ task is undefined / ambiguous?
└─ → Ask Arif for clarification — do not guess
| Task Type | Primary Actor | Fallback | Notes | |---|---|---|---| | Text generation / chat | mmx text (MiniMax-M2.7) | local LLM | Use highspeed for simple | | Deep research | mmx-text-researcher (MiniMax-Text-01) | mmx search + text | Structured JSON output | | Image generation | mmx image | image_generate tool | Check quota first | | Video generation | mmx video (async) | N/A | Job orchestrator supervised | | Speech synthesis | mmx speech | tts tool | Stream option for live | | Music | mmx music | N/A | Job orchestrator | | Vision / image input | mmx vision | image tool | geo-vision-translator if geo | | Web search | mmx search | web_search | Structured output preferred | | Code: one-liner fix | exec + edit | N/A | Fastest path | | Code: new feature | Codex (sessions_spawn) | Claude Code | PTY mode + workdir | | Code: PR review | Codex in temp dir | N/A | --full-auto, never in ~/openclaw | | Multi-agent parallel | sessions_spawn × N | N/A | Independent tasks only | | Geoscience reasoning | geox-ground skill | N/A | Mandatory epistemic labels | | Constitutional governance | arifOS-sense | N/A | 888_HOLD if triggered | | Budget check | mmx-quota-guard | N/A | Always before mmx calls | | Unknown complexity | sessions_spawn Pi | Ask Arif | Err on asking |
Every routing decision is logged to memory/vault999-triage.md:
HH:MM UTC | ROUTE | [task brief] → [actor selected] | reason: [why not alternatives] | alternatives: [what else was considered]
Example:
11:24 UTC | ROUTE | "Build me a dashboard" → Codex | reason: full-stack build, multi-file, iterative | alternatives: [mmx text (cannot write files), exec (too slow for this)]"
Never spawn external agents (Codex, Pi) on Arif's own systems. Use exec + tools directly with delta-logger active.
NEVER spawn Codex or Pi in ~/.openclaw or any workspace state directory — they'll read soul docs and system files. Use only the local agent.
Always spawn as background with sessions_spawn background mode + process monitoring. Never hold the session hostage.
Route through mmx-quota-guard first. Log estimated cost before committing.
testing
OpenClaw edge agent bridge — operational triage, doctor, restart, and A2A bridge routing for the federation edge (Telegram surface). USE WHEN: "openclaw unhealthy", "gateway down", "edge bot not responding", "a2a bridge disconnected", "watchdog tripped", "openclaw doctor", "openclaw restart". NOT for token/security audit — use FORGE-telegram-audit.
tools
Generate images, videos, TTS, voice clone, and music via MiniMax MCP server. Use when user asks to "draw", "generate image", "create picture", "make a photo", "text to image", "image generation".
testing
Single load-bearing constitutional-judgment skill. Routes all F1–F13, verdict, hold, seal, scope, authority and floor-check calls through the live arif_judge surface. Replaces 7 overlapping predecessors (arifos-constitutional-judge, arifos-constitutional-judge, arifos-constitutional-judge, arifos-constitutional-judge, arifos-constitutional-judge, arifos-constitutional-judge, arifos-constitutional-judge).
development
MANDATORY LSP grounding gate BEFORE any code mutation on .ts, .py, .js, .tsx, .jsx files. Forces the agent to read real-time compiler diagnostics and structural project context before editing — eliminating blind guesses and anchoring every mutation in F2 (TRUTH). Routes through arifOS kernel (:8088) for centralized gate logic.