← 返回
未分类 中文

skill invocation

Choose the best OpenClaw skill by matching trigger keywords to the TOOLS.md index, then applying strict judgment rules (most specific first; if in doubt, use...
通过将触发关键词匹配到 TOOLS.md 索引,选择最合适的 OpenClaw 技能,然后按严格判断规则(最具体优先;如有疑问,使用...
xuchang9337-dev xuchang9337-dev 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 530
下载
💾 1
安装
1
版本
#latest

概述

Skill Invocation System

This is a framework-style skill for "skill selection and invocation flow". It does not implement a specific tool; instead, it provides stable decision rules for an agent to choose the best skill (or skill combination) for a user request.


Core Principles

  1. Match the index first: consult TOOLS.md (skills index) to quickly narrow down candidate skills.
  2. Most specific wins: when multiple candidates match, choose the one whose triggers best align with the user's intent.
  3. When unsure, consult SKILL.md: if still unclear, read the candidate skill's SKILL.md to confirm fit and constraints.
  4. If in doubt, use it: if you cannot decide, pick the closest and usable candidate skill.

Invocation Flow

When a user request arrives, follow this order:

  1. Match trigger keywords using the TOOLS.md index.
  2. If matched with high confidence → use that skill.
  3. If no match / unclear → read the candidate skill's SKILL.md.
  4. If multiple are suitable → choose the most specific one.
  5. If still unclear → use "if in doubt, use it".

Requirements: Provide TOOLS.md

To make this skill reusable by anyone, your workspace needs a TOOLS.md (or an equivalent index) that maps "user intent / trigger keywords" to "candidate skill ids".

Index Contract

In TOOLS.md, skillId should follow one of these rules (pick one and keep it consistent):

  1. Equal to the skill folder name (for example: ~/.openclaw/workspace/skills//SKILL.md)
  2. Or equal to the name/slug your orchestration layer uses to call that skill

As long as skillId matches the actual callable skill identifier, this framework can be reused by anyone.

Suggested TOOLS.md format (minimum viable):

# TOOLS.md

## Skills Index
| skillId | triggers | summary |
|---|---|---|
| weather | current weather, forecast | Get weather & forecast |
| summarize | summarize, tl;dr | Summarize URLs/files/PDFs |
| stock-info-explorer | stock, quote, ticker | Analyze stock price & basics |

Matching rules (agent-side):

  1. Split triggers by commas / delimiters into multiple trigger phrases.
  2. Do case-insensitive matching against the user message; if a trigger phrase "appears", count it as a hit.
  3. When multiple candidates match, use a "most specific first" heuristic:
    • Longer trigger phrases are more specific (for example: current weather is more specific than weather)
    • More matched trigger keywords is more specific
    • Higher semantic alignment with the candidate's summary (closer wording) is more specific

When the index matches but you are still uncertain:

  1. Read the candidate skill's SKILL.md.
  2. Look for sections like When to Use, Decision Rules, or "Notes/Constraints" to validate fit.
  3. If you cannot find enough evidence or there is an obvious mismatch, fall back to "if in doubt, use it".

Decision Output (recommended output contract)

To make orchestration easier, when making a decision this skill should output (order does not matter):

  1. SELECTED_SKILLS: the list of selected skillIds (one or many)
  2. REASON: a short explanation of which triggers matched and why the choice is most specific
  3. NEXT_ACTION: the recommended calling plan for the orchestrator (for example: call the first skill, then the second)

Optional: Combination Strategy (optional)

If you want a single request to map to multiple steps, you can define an additional "combination" section in TOOLS.md (not required). When the agent detects that triggers hit multiple steps:

  1. Execute the most core step first (often "input / retrieval / preparation").
  2. Execute the step closest to the desired output shape next (for example: summarizing / formatting / exporting).

(The exact definition format is up to you; the key is that TOOLS.md explains why the combination is needed.)


Judgment Checklist (when unsure)

If you cannot decide which skill to use, check in order:

  1. Is the request covered by the candidate skill's description? → Yes → use it
  2. Could the request be handled better without this skill? → No → use it
  3. Still cannot decide → "if in doubt, use it"

Index Maintenance (optional)

If you maintain the TOOLS.md index, keep it accurate so selection logic stays reliable:

  1. Scan your workspace/install directories for candidate skill folders (according to your OpenClaw installation conventions).
  2. For each skill, read its SKILL.md for "when to use / trigger suggestions / constraints" (if available).
  3. Add or update each skill's skillId + triggers + summary in TOOLS.md.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-31 02:03 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,406 📥 324,237
ai-agent

self-improving agent

pskoett
捕获经验教训、错误及修正内容,以实现持续改进。适用于以下场景:(1)命令或操作意外失败;(2)用户纠正Claude(如“不,那不对……”“实际上……”);(3)用户请求的功能不存在;(4)外部API或工具出现故障;(5)Claude发现自身
★ 4,123 📥 842,578
ai-agent

Find Skills

guipi888
场景驱动+关键词双模式技能发现工具。当用户用自然语言描述场景/需求(如"我想做一个海报""帮我分析股票"),或明确说"安装技能/find skills/找个skill"时,自动从官方内置、本地已安装、SkillHub、虾评、GitHub、C
★ 1,488 📥 551,489