skill-router
Context-based skill auto-routing + federated skill composition. Analyzes user input to auto-select single or multiple skills and execute in order. First gateway for all requests. Use on every request to determine optimal skill combination.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/mupengi-bot/mupeng-skill-routerSkill Router
Meta system that analyzes natural language input to auto-select appropriate skill(s), determine order, and chain execution.
🚀 v2 Architecture: Low-level Call Protocol
Execution Flow
1. Scan only skills/*/SKILL.md frontmatter (trigger matching)
- Quick match with description + trigger fields
- No full body reading → 83% token savings
2. Check run field of matched skill for script path
- run: "./run.sh" → skills/{name}/run.sh
- run: "./run.js" → skills/{name}/run.js
3. Direct script execution with exec
WORKSPACE=$HOME/.openclaw/workspace \
EVENTS_DIR=$WORKSPACE/events \
MEMORY_DIR=$WORKSPACE/memory \
bash $WORKSPACE/skills/{name}/run.sh [args]
4. Agent processes stdout result
- Parse if JSON
- Pass through if text
- Check stderr on error
5. Generate events based on events_out
- Create events/{type}-{date}.json file
- Subsequent skills consume via events_in
6. Check hooks → trigger subsequent skills
- post: ["skill-a", "skill-b"] → auto-execute
- on_error: ["notification-hub"] → notify on error
Skill Metadata Scan
# Extract only frontmatter from all skills
for skill in skills/*/SKILL.md; do
yq eval '.name, .description, .trigger, .run' "$skill"
done
Execution Example
# User: "daily report"
# → trigger match: daily-report
# → Execute:
cd $HOME/.openclaw/workspace
WORKSPACE=$PWD \
EVENTS_DIR=$PWD/events \
MEMORY_DIR=$PWD/memory \
bash skills/daily-report/run.sh today
# Agent formats stdout result and delivers to user
Token Savings Effect
- Before: SKILL.md 3000 chars × 40 = 120KB (~30K tokens)
- v2: SKILL.md 500 chars × 40 = 20KB (~5K tokens)
- Savings: 83% token reduction
Core Concept
OpenClaw already selects 1 skill via description matching, but this skill:
- Detect complex intent: "Analyze competitors and make card news" → competitor-watch + copywriting + cardnews + insta-post
- Context-based auto-hooks: Auto-determine subsequent skills when a skill executes
- Skill chain templates: Pre-define frequently used combinations
Intent Classification Matrix
Single Skill Mapping (1:1)
- "commit/push/git" → git-auto
- "DM/instagram message" → auto-reply
- "cost/tokens/how much" → tokenmeter
- "translate/to English" → translate
- "invoice/quote" → invoice-gen
- "code review/PR" → code-review
- "system status/health" → health-monitor
- "trends" → trend-radar
- "performance/reactions/likes" → performance-tracker
- "daily report" → daily-report
- "SEO audit" → seo-audit
- "brand tone" → brand-voice
Complex Skill Chains (1:N) — Core Pipelines
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-mupengi-bot-mupeng-skill-router": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
prompt-engineer
Expert prompt engineer specializing in advanced prompting techniques, LLM optimization, and AI system design. Masters chain-of-thought, constitutional AI, and production prompt strategies. Use when building AI features, improving agent performance, or crafting system prompts.
appointment-scheduler
Automated appointment management for beauty salons, clinics, studios, and photo booths. Handles booking requests, calendar sync, conflict detection, reminders, no-show tracking, and waitlist management.
Mupeng Social Postcjo
Skill by mupengi-bot
data-scraper
Web page data collection and structured text extraction
auto-reply
Instagram DM auto-reply system. DM monitoring, reading, replying, security check (injection rejection). Use when checking Instagram DMs, reading unread messages, replying to DMs, setting up DM monitoring cron jobs, or handling DM auto-reply workflows. Triggers on: Instagram DM, DM check, DM reply, DM auto-reply, dm-alert.