← 返回 Skills 市场
ordo-tech

Auto Invoke Router

作者 Ordo-tech · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
56
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install auto-invoke-router
功能描述
Scans installed skills and AGENTS.md to generate a routing config that maps conversation intents to skills. Use when you want to reduce manual skill invocati...
使用说明 (SKILL.md)

What this skill does

Reads every installed skill's SKILL.md frontmatter (the description field) and any local AGENTS.md to produce a skill_routing config block. This config maps intent keywords and phrases to skill names, giving OpenClaw a structured reference for selecting the right skill based on conversation context.

The output is written into AGENTS.md as a ## Skill Routing section, or saved as a standalone router.yml. Native auto-invoke behaviour depends on your OpenClaw version — check your release notes or docs to confirm whether skill_routing in AGENTS.md is read automatically. In all versions, the config serves as a clear, human-readable routing reference that can be wired up manually or extended with custom rules.

When to use it

  • More than ~5 skills are installed and manual invocation is getting unwieldy
  • Users are triggering the wrong skill or missing relevant ones
  • Setting up a new OpenClaw instance and want smart defaults from the start
  • After installing a batch of skills and wanting to refresh the routing map
  • Whenever the available_skills block in context feels cluttered or mismatched

Usage

Step 1 — Locate installed skills

Derive the OpenClaw system skill directory from the binary location:

OPENCLAW_BIN=$(which openclaw 2>/dev/null || which claw 2>/dev/null)
OPENCLAW_SYSTEM_SKILLS=$(dirname "$OPENCLAW_BIN")/../lib/node_modules/openclaw/skills
find ~/.openclaw/skills "$OPENCLAW_SYSTEM_SKILLS" -name "SKILL.md" 2>/dev/null

If which openclaw returns nothing, also try common install locations:

find ~/.openclaw/skills \
  /opt/homebrew/lib/node_modules/openclaw/skills \
  /usr/local/lib/node_modules/openclaw/skills \
  -name "SKILL.md" 2>/dev/null

Collect the full list of SKILL.md paths. If clawhub list is available, also run:

clawhub list

to confirm installed skill names.

Step 2 — Extract descriptions

For each SKILL.md found, read the YAML frontmatter block (lines between the opening and closing ---). Extract:

  • name — the skill identifier
  • description — the full triggering description

Do not read the body of each SKILL.md; frontmatter only.

If a skill is missing a name or description field, skip it and note it in the final report as: skill-x: skipped — missing description. Do not fabricate a description.

Step 3 — Read AGENTS.md

Read AGENTS.md in the current workspace. Look for it at ./AGENTS.md relative to the workspace root, or at ~/.openclaw/workspace/AGENTS.md if no workspace context is set. Identify any existing ## Skill Routing section. If it exists, it will be fully replaced in Step 6.

Step 4 — Generate intent keywords

For each skill, derive 3–8 intent keywords or short phrases from the description. Rules:

  • Use lowercase
  • Prefer noun phrases and verb phrases that a user would naturally say (e.g. "search for skill", "install skill", "weather forecast", "github PR", "security audit")
  • Omit generic words: "use", "when", "skill", "tool", "this"
  • Include negatives if the description calls them out explicitly (e.g. "NOT for historical data")

After generating all triggers, check for conflicts: if the same keyword appears under two or more different skills, flag it in the report as ambiguous. Do not remove the keyword — leave it in both entries and let the user resolve it.

Step 5 — Produce the routing config

Output a YAML block in this format:

# auto-invoke-router — generated by auto-invoke-router skill
# Regenerate by invoking: auto-invoke-router
# WARNING: this section is fully regenerated on each run. Manual edits will be
# overwritten. To preserve custom triggers, add them above this block in AGENTS.md
# with a comment like: # custom-routing-preserve
skill_routing:
  version: "1.0"
  rules:
    - skill: clawhub
      triggers:
        - search clawhub
        - install skill
        - update skill
        - publish skill
        - clawhub list
    - skill: weather
      triggers:
        - weather
        - temperature
        - forecast
        - rain
    - skill: gh-issues
      triggers:
        - github issue
        - fix bug
        - open PR
        - pull request
        - review comments
    # ... one entry per installed skill
  fallback: null  # set to any installed skill name to invoke when no rule matches,
                  # or leave as null to take no default action

Use the actual installed skill names and generated triggers — the above is illustrative only.

Step 6 — Write output

Option A — Append to AGENTS.md (recommended):

Add a ## Skill Routing section at the end of AGENTS.md containing the full skill_routing: YAML block inside a fenced code block. If a ## Skill Routing section already exists, replace it in full — all triggers are regenerated from current descriptions. Any manual edits to the previous section will be lost; users should preserve custom triggers outside this block (see the warning comment in Step 5).

Option B — Standalone file:

Write the YAML block to router.yml in the workspace root. Inform the user to reference it in AGENTS.md if they want OpenClaw to pick it up automatically.

Step 7 — Report

After writing, output a short summary:

Router updated — N skills mapped, M skipped
Skills covered: skill-a, skill-b, skill-c, ...
Skipped (no description): skill-x, skill-y
Trigger conflicts (review manually): keyword-foo (skill-a, skill-b), keyword-bar (skill-c, skill-d)
Output: AGENTS.md § Skill Routing (or router.yml)
Note: verify your OpenClaw version supports native skill_routing before relying on auto-invoke.

Examples

Example 1: Fresh install with 6 skills

Input: 6 installed skills found via find. AGENTS.md has no routing section.

Output: ## Skill Routing appended to AGENTS.md with 6 rule entries, each containing 4–6 triggers derived from their descriptions. Summary reports "6 skills mapped, 0 skipped."

Example 2: Refresh after installing new skills

Input: AGENTS.md already has a ## Skill Routing section with 4 rules. 3 new skills were installed since last run.

Output: Existing section replaced in full with 7 rules — all triggers regenerated from current descriptions. Summary reports "7 skills mapped." Any manual trigger edits in the previous section are not preserved; the report reminds the user to re-apply them if needed.

Example 3: No AGENTS.md found

Input: Workspace has no AGENTS.md.

Output: router.yml written to workspace root. User informed to create AGENTS.md and include the routing block, or to re-run once AGENTS.md is present.

Example 4: Skills with missing descriptions

Input: 8 skills found; 2 have no description field in their frontmatter.

Output: 6 rules generated for the skills with descriptions. Report lists the 2 skipped skills by name. User can add descriptions to those skills' SKILL.md files and re-run.

Requirements

  • At least one skill installed with a valid description field (output is empty otherwise — report this clearly)
  • Read access to ~/.openclaw/skills/ and OpenClaw's system skill directories
  • Write access to AGENTS.md or workspace root for router.yml
  • bash tool available for the find and which commands in Step 1

No API keys or external accounts required. Runs entirely on local files.

Support

Issues or questions: https://clawhub.com/@ordo-tech/auto-invoke-router Publisher: @ordo-tech on ClawHub

安全使用建议
Before installing, be comfortable with the skill reading installed skill frontmatter and updating AGENTS.md. Back up or inspect AGENTS.md, review ambiguous triggers, and consider writing router.yml first if you want a manual approval step.
功能分析
Type: OpenClaw Skill Name: auto-invoke-router Version: 1.0.0 The 'auto-invoke-router' skill is a utility designed to automate intent-based routing by scanning local skill directories and generating a configuration block in 'AGENTS.md'. It uses standard system commands like 'find' and 'bash' to locate installed skills and extracts metadata from their frontmatter. The behavior is transparent, well-documented, and lacks any indicators of malicious intent, unauthorized data exfiltration, or harmful prompt injection.
能力评估
Purpose & Capability
The stated purpose matches the documented behavior: it reads installed skill descriptions and generates a routing map. The result may influence future auto-invocation, so users should review the generated routes.
Instruction Scope
Instructions are mostly scoped to SKILL.md frontmatter and AGENTS.md routing sections. It explicitly says not to read full skill bodies, which reduces prompt-injection exposure from other skills.
Install Mechanism
No install spec or code files are present; this is an instruction-only skill requiring local find/bash usage. Static scan reported no findings, though the provided SKILL.md excerpt is truncated.
Credentials
Local filesystem reads under installed skill directories and AGENTS.md are proportionate to the routing purpose and no credentials or external data transmission are shown.
Persistence & Privilege
The skill can append or replace a Skill Routing section in AGENTS.md, creating persistent agent configuration. This is disclosed and purpose-aligned, but users should back up or inspect AGENTS.md.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install auto-invoke-router
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /auto-invoke-router 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
auto-invoke-router v1.0.0 — Initial release. - Scans installed skills and AGENTS.md to auto-generate a skill routing config mapping conversation intents to skills. - Extracts intent triggers from each skill’s description for accurate, up-to-date routing. - Writes the generated routing block to AGENTS.md or as a standalone router.yml if AGENTS.md is missing. - Clearly reports included, skipped, and ambiguous trigger mappings for review.
元数据
Slug auto-invoke-router
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Auto Invoke Router 是什么?

Scans installed skills and AGENTS.md to generate a routing config that maps conversation intents to skills. Use when you want to reduce manual skill invocati... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 56 次。

如何安装 Auto Invoke Router?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install auto-invoke-router」即可一键安装,无需额外配置。

Auto Invoke Router 是免费的吗?

是的,Auto Invoke Router 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Auto Invoke Router 支持哪些平台?

Auto Invoke Router 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Auto Invoke Router?

由 Ordo-tech(@ordo-tech)开发并维护,当前版本 v1.0.0。

💬 留言讨论