ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

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.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/mupengi-bot/mupeng-skill-router
Or

Skill 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:

  1. Detect complex intent: "Analyze competitors and make card news" → competitor-watch + copywriting + cardnews + insta-post
  2. Context-based auto-hooks: Auto-determine subsequent skills when a skill executes
  3. 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

Stars1335
Views0
Updated2026-02-23
View Author Profile
AI Skill Finder

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 skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-mupengi-bot-mupeng-skill-router": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.