Skill: e2e5g/smart-router-omni (version 2.0.0)

--- name: smart-router-omni description: Universal smart routing skill that chooses the best installed skill or skill chain across mixed environments, and automatically applies OpenClaw-aware routing when an OpenClaw workspace or skill inventory is detected. Use when the user asks which skill to use, when multiple skills overlap, when the task spans several phases, or when Codex should inspect local skill metadata and environment signals before choosing a route. --- # Smart Router Omni Start broad, then specialize. Default to universal routing, and switch into OpenClaw-aware mode when the environment supports it. ## Load the right reference - Read `references/scoring-rubric.md` before scoring candidates. - Read `references/ambiguity-and-fallbacks.md` when confidence is weak or constraints are missing. - Read `references/environment-detection.md` before deciding whether to stay in universal mode or enter OpenClaw mode. - Read `references/chain-patterns.md` when the request obviously spans several phases. - Read `references/research-notes-2026-03.md` when you need the design rationale. ## Workflow 1. Normalize the request into a task card: - goal - expected artifact - domain - required actions - constraints - environment dependencies 2. Detect the environment using `references/environment-detection.md`: - universal mode - OpenClaw-aware mode 3. Scan visible skill roots conservatively: - read `SKILL.md` frontmatter first - inspect `agents/openai.yaml` only for shortlisted candidates 4. Apply hard filters before ranking: - missing tools - missing login or auth - wrong output type - platform mismatch - safety or policy mismatch 5. Score viable candidates with `references/scoring-rubric.md`. 6. If one skill can finish the task, recommend that skill. 7. If the task spans phases, recommend a short chain using `references/chain-patterns.md`. 8. If confidence is low, ask compact clarification questions instead of forcing a route. 9. Output: - recommended skill or chain - confidence - why it won - prerequisites - fallbacks - clarifying questions if needed ## Routing policy - Prefer explicit capability claims in `description` over name similarity. - Prefer specialist skills when the task, artifact, and dependencies are clear. - Prefer workflow skills when the request is end-to-end. - Prefer the smallest route that can finish the task well. - In OpenClaw-aware mode, treat browser, publishing, memory, and account-bound skills as dependency-sensitive. - Abstain and clarify when the top candidates are close. ## Standard output ```md [Routing Decision] Mode: universal | openclaw-aware Request: ... Recommended skill: ... Confidence: high | medium | low Why it fits: ... Missing checks or prerequisites: ... Fallbacks: ... Suggested chain: ... Clarifying question(s): ... ``` ## Guardrails - Do not rely on a fixed handwritten route table as the primary method. - Do not read every full `SKILL.md` before shortlisting. - Do not recommend unavailable skills. - Do not hide uncertainty when the top candidates are close. - Do not force one skill when a chain is clearly better. ## Exit condition Finish with one recommended skill or skill chain, an explicit mode, a confidence level, key reasons, fallbacks, and any blocking unknowns. --- ## Copyright & License **Copyright (c) 2026 龙虾 (Lobster)** **All Rights Reserved.** This skill is proprietary and confidential. The source code, algorithms, documentation, and any accompanying materials are protected by copyright law and international treaties. **You may NOT:** - Copy, modify, or distribute the source code or documentation - Create derivative works based on this skill - Use this skill as a template or baseline for developing competing products - Reverse engineer, decompile, or disassemble any components - Remove or alter any proprietary notices or copyright labels **You MAY:** - Install and use this skill in your OpenClaw installation - Receive updates and support as provided by the author For licensing inquiries or custom development, contact the author directly.

path: _meta.json
content: {
  "skill_id": 1711930753,
  "version": "2.0.0",
  "author": "龙虾",
  "tags": ["router", "smart-routing", "multi-skill", "automation", "openclaw"],
  "created_at": "2026-04-01",
  "license": "proprietary",
  "source_code_available": false
}


path: agents/openai.yaml
content: interface:
  display_name: "Smart Router Omni"
  short_description: "Choose the best installed skill or skill chain across general and OpenClaw-style environments."
  default_prompt: "Use $smart-router-omni to inspect the environment and installed skills, then route this request to the best skill or skill chain."

policy:
  allow_implicit_invocation: true



path: references/ambiguity-and-fallbacks.md
content: # Ambiguity And Fallbacks

Ask targeted questions instead of guessing when:

- the top two candidates are close
- the user did not specify whether they want planning, execution, or both
- platform, account, browser, or tooling constraints are missing
- several output formats would imply different skills
- the task spans multiple phases

## Preferred clarification prompts

Ask at most three focused questions:

1. Do you want a plan, execution, or both?
2. What artifact should be produced: code, document, analysis, browser action, post, automation, or memory update?
3. Are there platform, login, security, or time constraints that could change the route?

## Fallback policy

- If there is no clear winner, present the Top 3 with one-sentence reasons.
- If the best skill is missing, name the missing capability and offer the closest installed substitute.
- If the task is multi-stage, recommend a chain and label each stage.
- If the task is high-risk or policy-sensitive, narrow the scope or refuse instead of routing aggressively.


path: references/chain-patterns.md
content: # Chain Patterns

Recommend a chain when one skill cannot cleanly finish the job.

## Common chains

- research -> analyze -> write
- research -> write -> publish
- diagnose -> implement -> verify
- capture -> organize -> retrieve
- scope -> build -> automate -> monitor
- browse -> extract -> summarize

## Selection rules

- Keep the chain as short as possible.
- Label each step by role, not just skill name.
- Do not include a skill unless it owns a real phase transition.
- If one workflow skill can cover the full route with good confidence, prefer it over a longer chain.


path: references/environment-detection.md
content: # Environment Detection

Use these signals to choose the routing mode.

## Stay in universal mode when

- the workspace only exposes general skill folders
- no OpenClaw-specific files, conventions, or memory layout are visible
- the task is generic and does not depend on OpenClaw runtime assumptions

## Switch to OpenClaw-aware mode when one or more of these are true

- visible OpenClaw-style skill inventory is present
- the user explicitly asks about OpenClaw
- the workspace contains OpenClaw memory or configuration structures such as:
  - `MEMORY.md`
  - `memory/`
  - `.openclaw/`
  - `bank/`
  - OpenClaw-oriented skill bundles
- the task involves browser, publish, memory, automation, or account-bound OpenClaw workflows

## OpenClaw-aware adjustments

- treat browser skills as dependency-sensitive
- treat publishing skills as platform-side execution skills
- treat memory skills as memory-only specialists, not generic fallbacks
- prefer installed specialists over broad generalists when the artifact is concrete
- prefer short chains for end-to-end OpenClaw tasks


path: references/research-notes-2026-03.md
content: # Research Notes 2026-03

These notes translate recent model-routing research into cross-environment skill-routing guidance. This is an inference layer, not a claim that skill routing and model routing are identical problems.

## Practical takeaways

- Use hierarchical routing:
  - shortlist first, then rerank
  - avoid reading every candidate deeply up front
- Optimize for more than one objective:
  - quality
  - latency
  - cost or effort
  - dependency availability
- Support abstention:
  - low-confidence routing should trigger clarification instead of forced choice
- Evaluate and log:
  - routing quality drifts as skill inventories and user behavior change

## Primary sources that informed this skill

- FrugalGPT
- RouteLLM
- MixLLM
- BEST-Route
- RouterBench
- RouterEval
- Azure AI Foundry model router documentation

## Design implications

- Prefer metadata-first routing:
  - use `name`, `description`, and optional `openai.yaml` as the fast pass
- Use scoring and thresholds:
  - do not make a hard decision from one token match
- Separate eligibility from ranking:
  - first remove impossible choices, then compare the rest
- Route to a chain when the task spans phases:
  - this mirrors cascades and staged routing from the literature


path: references/scoring-rubric.md
content: # Scoring Rubric

Score each viable candidate from 0 to 5 on every dimension, then apply the weights below.

## Weighted dimensions

- Capability fit: 35%
  - Does the skill description explicitly cover the requested job?
- Output fit: 20%
  - Does the skill naturally produce the artifact the user wants?
- Constraint and prerequisite fit: 15%
  - Can it work with the available tools, auth, platform, safety limits, and time constraints?
- Domain and context fit: 15%
  - Does it match the domain, content type, or technical surface?
- Workflow-stage fit: 10%
  - Is it the right skill for this phase, or only one step in a larger chain?
- User or workspace preference fit: 5%
  - Has the user named a preferred platform, tool family, or prior skill?

## Confidence bands

- High:
  - top weighted score >= 4.0 / 5
  - lead over second place >= 0.7
- Medium:
  - top weighted score >= 3.4 / 5
  - lead over second place >= 0.3
- Low:
  - anything weaker than the above
  - or any missing constraint that could materially change the route

## Hard filters

Reject a candidate before scoring if any of these are true:

- the skill is unavailable
- the skill requires tooling or access that is clearly absent
- the skill produces the wrong output type
- the request falls outside the skill's claimed scope
- the route would violate safety or policy

## Tie-breakers

- Prefer the more specific skill when both are equally compatible.
- Prefer the simpler chain when both paths can finish the task.
- Prefer the candidate with clearer metadata in `description` and `agents/openai.yaml`.
- Prefer the skill that operates directly on the current workspace over one that needs extra setup.


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)