Install
openclaw skills install agent-efficiency-manager定期分析所有 Agent 的 token 使用效率,智能推荐技能配置,生成优化报告并自动推送,实现 Agent 长期自我优化。
openclaw skills install agent-efficiency-managerLicense: MIT
Copyright: 2026 perrykono-debug
Agent 效率优化与自我进化管理器,通过定期分析、智能推荐和持续跟踪,实现 Agent 长期自我优化。
用户请求优化
├─ 分析模式 → Run analyze_agent_efficiency.py
├─ 推荐模式 → Run fetch_skillhub_skills.py + generate_recommendations.py
├─ 跟踪模式 → Run track_metrics.py
└─ 推送模式 → Run push_notifications.py
扫描 openclaw.json 中所有 Agent 配置,计算效率指标:
指标定义(参见 references/metrics_definitions.md):
skill_count:技能数量estimated_tokens:预估 token 消耗(每个 skill 约 500-1000 tokens)efficiency_score:效率评分(0-100,基于 skill 相关度)redundancy_count:重复/无关技能数量执行:
python3 scripts/analyze_agent_efficiency.py --config ~/.qclaw/openclaw.json --output metrics.json
输出: JSON 格式效率报告,包含每个 Agent 的详细指标和优化建议。
从 skillhub 获取可用技能列表,基于 Agent 角色推荐适配技能:
执行:
# 步骤1:获取 skillhub 技能列表
python3 scripts/fetch_skillhub_skills.py --output available_skills.json
# 步骤2:生成推荐
python3 scripts/generate_recommendations.py --config ~/.qclaw/openclaw.json --available available_skills.json --output recommendations.json
推荐逻辑(参见 references/recommendation_logic.md):
长期记录效率指标,生成趋势分析:
执行:
python3 scripts/track_metrics.py --config ~/.qclaw/openclaw.json --history metrics_history.json --output trend_report.md
跟踪内容:
通过企微/腾讯文档推送优化建议:
执行:
python3 scripts/push_notifications.py --recommendations recommendations.json --channel wecom --webhook YOUR_WEBHOOK_URL
推送内容:
用户说:"分析所有 Agent 的效率,给出优化建议"
执行流程:
analyze_agent_efficiency.py 生成效率报告fetch_skillhub_skills.py 获取可用技能generate_recommendations.py 生成推荐用户说:"每周一早上 9 点推送效率报告"
执行流程:
qclaw-cron-skill)用户说:"有没有新技能可以提升 Stock 大作手的效果?"
执行流程:
fetch_skillhub_skills.pygenerate_recommendations.py常见优化模式(详见 references/optimization_patterns.md):
| 模式 | 做法 | Token 节省 |
|---|---|---|
| 去重 | 移除 another_them / another-them 重复 | ~1000 |
| 去无关 | 移除跨领域技能(股票 Agent 不留房产技能) | ~500-2000 |
| 精简基础 | 只保留 1-2 个基础配置技能 | ~500-1000 |
| 按需启用 | 一次性工具(如 qclaw-migration)不常驻 | ~500 |
analyze_agent_efficiency.py:效率分析脚本fetch_skillhub_skills.py:获取 skillhub 技能列表generate_recommendations.py:生成优化建议track_metrics.py:跟踪长期指标push_notifications.py:推送通知metrics_definitions.md:效率指标定义与计算方法optimization_patterns.md:常见优化模式与案例recommendation_logic.md:技能推荐逻辑详解(本技能无需静态资源)
config.patch