Skill Priority Setup
Automated skill tiering and injection policy configuration for OpenClaw.
What This Skill Does
- 1. Discovery Phase: Scans all installed skills across standard directories
- Analysis Phase: Suggests L0-L3 tier assignments based on skill characteristics
- Configuration Phase: Applies the tiered architecture to your setup
- Validation Phase: Verifies configuration and estimates token savings
Quick Start
CODEBLOCK0
When to Use
- - New Setup: Just installed multiple skills and want optimal configuration
- Performance Issues: High token usage or slow responses
- Migration: Upgrading from flat skill structure to tiered architecture
- Audit: Reviewing and optimizing existing skill priorities
Architecture Overview
This skill implements a 4-tier priority system:
L0 - ROM Core (Always Active)
- -
semantic-system: Semantic routing (message injector) - INLINECODE1 : Self-improvement behaviors (SOUL.md)
- INLINECODE2 : Config safety (on-demand)
- INLINECODE3 : Installation safety (on-demand)
L1 - Routing Layer (Task-Triggered)
- -
browser-automation: Web automation - INLINECODE5 : Skill discovery
- INLINECODE6 : Multi-agent coordination
L2 - Domain Skills (Keyword-Triggered)
- - Document:
word-docx, INLINECODE8 - Media: INLINECODE9
- Platform:
discord, wechat-suite, INLINECODE12 - Automation: INLINECODE13
L3 - Extensions (Manual/On-Demand)
- - Third-party integrations:
notion, slack, github, etc.
Workflow
CODEBLOCK1
Token Budget
- - L0 Core: ≤300 tokens/round (minimal rules)
- L1 Triggered: ≤400 tokens per injection
- Total Budget: ≤900 tokens/round
- Overflow Strategy: Inject summary + file path only
Safety Features
- - Backup before any configuration changes
- JSON validation before applying
- Dry-run mode (
--dry-run) - Rollback capability
Files Created
- -
SKILL_PRIORITY_POLICY.md: Your custom policy document - INLINECODE19 updates: Core constraints added
- INLINECODE20 updates: Agent evolution behaviors
- Backup files: INLINECODE21
Configuration
Edit ~/.openclaw/workspace/skills/skill-priority-setup/config.yaml to customize:
CODEBLOCK2
Troubleshooting
Gateway Won't Start
- - Check if message injector content exceeds limit
- Run with
--diagnose flag
Skills Not Loading
- - Verify allowBundled list in openclaw.json
- Check file permissions
High Token Usage
- - Review L0 assignments (should be minimal)
- Consider moving skills to lower tiers
References
技能优先级设置
为OpenClaw提供自动化的技能分级与注入策略配置。
该技能的功能
- 1. 发现阶段:扫描标准目录下所有已安装的技能
- 分析阶段:根据技能特征建议L0-L3层级分配
- 配置阶段:将分级架构应用到您的设置中
- 验证阶段:检查配置并估算令牌节省量
快速开始
bash
运行交互式设置向导
python3 ~/.openclaw/workspace/skills/skill-priority-setup/scripts/setup.py
或使用默认设置的非交互模式
python3 ~/.openclaw/workspace/skills/skill-priority-setup/scripts/setup.py --auto
使用场景
- - 新配置:刚安装多个技能,需要最佳配置
- 性能问题:令牌使用量过高或响应缓慢
- 迁移:从扁平技能结构升级到分级架构
- 审计:审查并优化现有技能优先级
架构概览
该技能实现了一个4层优先级系统:
L0 - ROM核心(始终激活)
- - semantic-system:语义路由(消息注入器)
- agent-evolution:自我改进行为(SOUL.md)
- config-modification:配置安全(按需)
- skill-safe-install:安装安全(按需)
L1 - 路由层(任务触发)
- - browser-automation:Web自动化
- find-skills:技能发现
- teamtask:多智能体协调
L2 - 领域技能(关键词触发)
- - 文档:word-docx、tesseract-ocr
- 媒体:youtube-transcript
- 平台:discord、wechat-suite、evomap
- 自动化:automation-workflows
L3 - 扩展(手动/按需)
- - 第三方集成:notion、slack、github等
工作流程
┌─────────────────┐
│ 1. 扫描技能 │ → 查找所有SKILL.md文件
└────────┬────────┘
▼
┌─────────────────┐
│ 2. 分析 │ → 检测技能类型与依赖关系
└────────┬────────┘
▼
┌─────────────────┐
│ 3. 建议层级 │ → 提出L0-L3分配方案
└────────┬────────┘
▼
┌─────────────────┐
│ 4. 用户审查 │ → 确认或修改建议
└────────┬────────┘
▼
┌─────────────────┐
│ 5. 应用配置 │ → 更新AGENTS.md、SOUL.md等文件
└────────┬────────┘
▼
┌─────────────────┐
│ 6. 验证 │ → 检查JSON,测试注入
└─────────────────┘
令牌预算
- - L0核心:每轮≤300令牌(最小规则)
- L1触发:每次注入≤400令牌
- 总预算:每轮≤900令牌
- 溢出策略:仅注入摘要+文件路径
安全特性
- - 任何配置更改前自动备份
- 应用前进行JSON验证
- 试运行模式(--dry-run)
- 回滚能力
创建的文件
- - SKILLPRIORITYPOLICY.md:您的自定义策略文档
- AGENTS.md更新:添加核心约束
- SOUL.md更新:智能体进化行为
- 备份文件:.backup/*.timestamp
配置
编辑~/.openclaw/workspace/skills/skill-priority-setup/config.yaml进行自定义:
yaml
默认层级分配(按技能覆盖)
default_tiers:
semantic-router: L0
browser: L1
word-docx: L2
令牌预算
token_budget:
l0_max: 300
l1_max: 400
total_max: 900
安全设置
backup
beforechange: true
validate_json: true
auto_rollback: true
故障排除
网关无法启动
- - 检查消息注入器内容是否超出限制
- 使用--diagnose标志运行
技能无法加载
- - 验证openclaw.json中的allowBundled列表
- 检查文件权限
令牌使用量过高
- - 审查L0分配(应保持最小化)
- 考虑将技能移至较低层级
参考