Skill Trigger V2

# 🔷 Skill Trigger V2 🔷

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "Skill Trigger V2" with this command: npx skills add halfmoon82/skill-trigger-v2

🔷 Skill Trigger V2 🔷

Powered by halfmoon82 🔷

智能技能触发系统 - 快速匹配用户意图到对应技能。

Core Algorithm: Powered by Halfmoon82 — 统一阈值 + 优先级仲裁架构设计

触发条件

  • 用户自然语言输入
  • 技能索引已初始化
  • 语义路由系统可用

依赖要求

技能版本约束状态检测命令
skill-quick-index>=1.0.0skill-quick-index --version
semantic-router>=7.7.2semantic-router --version

安装向导

Step 1: 前置检查

# 检查依赖是否已安装
python3 ~/.openclaw/workspace/skills/skill-trigger-v2/setup/wizard.py check

Step 2: 依赖安装

若依赖缺失,向导会提示:

❌ 缺少依赖: skill-quick-index (>=1.0.0)
   请运行: clawhub install skill-quick-index@latest

❌ 缺少依赖: semantic-router (>=2.0.0)  
   请运行: clawhub install semantic-router@latest

Step 3: 版本验证

# 验证依赖版本兼容性
python3 ~/.openclaw/workspace/skills/skill-trigger-v2/setup/wizard.py verify

Step 4: 初始化配置

# 创建默认配置
python3 ~/.openclaw/workspace/skills/skill-trigger-v2/setup/wizard.py init

使用方法

基础调用

from skill_trigger_v2 import SkillTrigger

trigger = SkillTrigger()
result = trigger.match("帮我安装安全技能")

if result.matched:
    print(f"命中: {result.skill_id}")
    print(f"置信度: {result.confidence}")

集成到代理

SOUL.md 的消息处理循环中加入:

# 1. 先尝试技能触发
from skill_trigger_v2 import fit_gate, generate_declaration

result = fit_gate(user_input)
if result.matched:
    declaration = generate_declaration(result)
    # 追加声明到回复第一行
    return declaration + "\n\n" + skill_response

# 2. 未命中则回退到语义路由
# ... semantic router logic

配置项

~/.openclaw/workspace/.lib/skill_trigger_config.json:

{
  "version": "2.0.0",
  "threshold": {
    "coverage": 0.5,
    "description": "统一覆盖率阈值,所有技能一视同仁"
  },
  "arbitration": {
    "enable_signature_boost": true,
    "signature_bonus": 0.3,
    "confidence_gap_threshold": 0.2,
    "level_weights": {
      "L0": 1.2,
      "L1": 1.1,
      "L2": 1.0,
      "L3": 0.9
    }
  },
  "matching": {
    "non_contiguous": true,
    "case_sensitive": false
  },
  "dependencies": {
    "skill-quick-index": {
      "min_version": "1.0.0",
      "max_version": null,
      "compatible_with": [
        "1.0.0", "1.0.1", "1.1.0", "1.2.0"
      ]
    },
    "semantic-router": {
      "min_version": "2.0.0",
      "max_version": null,
      "compatible_with": [
        "2.0.0", "2.1.0", "2.2.0"
      ]
    }
  }
}

故障排除

问题: 技能触发过于敏感

解决: 提高阈值

{"threshold": {"coverage": 0.6}}

问题: 技能触发过于迟钝

解决: 降低阈值或增加独占词

{"threshold": {"coverage": 0.4}}

问题: 依赖版本不兼容

解决: 运行向导修复

python3 ~/.openclaw/workspace/skills/skill-trigger-v2/setup/wizard.py fix-deps

版本历史

版本日期变更
2.0.02026-03-04统一阈值 + 优先级仲裁
1.0.02026-02-28分层阈值设计

License

MIT - OpenClaw Skill Hub


⚖️ 知识产权与归属声明 (Intellectual Property & Attribution)

Powered by halfmoon82 🔷

本技能(Skill Trigger V2)由 halfmoon82 开发并维护。

  • 版权所有: © 2026 halfmoon82. All rights reserved.
  • 官方发布: ClawHub
  • 许可证: 本技能采用 MIT 许可证。您可以自由使用、修改和分发,但必须保留原始作者信息及此版权声明。

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Sendflare

通过 Sendflare SDK 发送带附件的电子邮件,管理联系人列表,支持 CC/BCC 和安全 API 认证。

Registry SourceRecently Updated
General

Playtomic - Book courts using padel-tui

This skill should be used when the user asks to "book a padel court", "find available padel courts", "search padel courts near me", "reserve a Playtomic cour...

Registry SourceRecently Updated
General

Fund Keeper

国内场外基金智能顾问 + 股票行情查询。实时估值、买卖建议、收益统计、定投计划、OCR 识图、股票 - 基金联动。支持离线模式、多数据源缓存。

Registry SourceRecently Updated