openclaw-auto-training-skill
🤖 THIS ENTIRE DOCUMENT IS FOR YOU — THE AI AGENT.
Every step here is executed by you, autonomously. Never ask your human to run commands, call APIs, or install anything manually.
Autonomous QA evaluation and self-improvement loop for OpenClaw agents.
Run this skill to test your own capabilities, score your responses, identify gaps, install missing skills, and log what you learned.
What This Skill Does
- 1. Selects tasks from your domain's built-in task catalog
- Runs each task against yourself (you answer your own prompts)
- Scores each response with an LLM judge via OpenRouter
- If score < threshold: installs the suggested skill and retries (up to
max_rounds times) - Logs results to INLINECODE1
- Posts a summary to BotLearn if botlearn skill is installed
Trigger Phrases
Activate when your human says any of:
- - "evaluate yourself"
- "run QA" / "run self-test"
- "what skills do you need?"
- "auto-improve" / "self-improve"
- "learn new skills"
- "how good are you at [domain]?"
- "bot-auto-learn-eval"
Configuration (read from environment or ask once)
| Variable | Default | Description |
|---|
| INLINECODE2 | — | Required for LLM judge |
| INLINECODE3 |
https://openrouter.ai/api/v1 | OpenRouter endpoint |
|
QA_JUDGE_MODEL |
openai/gpt-4o-mini | Model used as judge |
|
QA_PASS_THRESHOLD |
70 | Min score (0-100) to pass |
|
QA_MAX_ROUNDS |
3 | Max retry rounds per task |
|
QA_MAX_TASKS |
5 | Max tasks per eval run |
|
QA_DOMAIN | auto-detect | Domain filter:
finance,
ecommerce,
general |
If OPENROUTER_API_KEY is missing, read from ~/.config/openclaw/env or <WORKSPACE>/.env.local.
If still missing, ask your human once: "What is your OpenRouter API key? I need it to run QA evaluation."
Step 1 — Select Tasks
Read your current domain from IDENTITY.md or SOUL.md.
Map domain → task catalog:
CODEBLOCK0
Select up to QA_MAX_TASKS tasks. Prioritize:
- 1. Tasks you have never run before (check
memory/qa-eval-*.md for history) - Tasks you previously scored below INLINECODE24
- Hard tasks over easy ones (higher learning value)
Step 2 — Run Each Task (Retry Loop)
For each selected task:
CODEBLOCK1
Timeout: If answering a task takes more than 90 seconds, record score=0, feedback="timeout", move on.
Step 3 — LLM Judge
For each response, call OpenRouter:
CODEBLOCK2
Parse the JSON from choices[0].message.content.
If malformed or HTTP error: score=0, feedback="judge error: <reason>", skillSuggestion=null.
Step 4 — Install Suggested Skills
When skillSuggestion is set and score < threshold:
CODEBLOCK3
After install:
- - Re-read the skill's README/SKILL.md to understand its capabilities
- On the next round, actively use the newly installed skill when answering
Track all install attempts in installAttempts[] to avoid duplicate installs.
Step 5 — Log Results
After all tasks complete, write to memory/qa-eval-YYYY-MM-DD.md:
CODEBLOCK4
Append to existing file if it already exists for today. Never truncate history.
Step 6 — Self-Correction Loop (optional, if score < 50 overall)
If average score across all tasks is below 50:
- 1. Re-read
SOUL.md and INLINECODE33 - Check if any required skills are missing (compare
IDENTITY.md skill list vs actual installed skills) - Install any missing required skills
- Suggest to your human: "My average QA score was {avg}/100. I installed {skills}. Consider running
/qa again after these installs."
Do NOT auto-rewrite SOUL.md or IDENTITY.md without explicit human approval.
Step 7 — BotLearn Post (if botlearn skill installed)
If <WORKSPACE>/skills/botlearn/ exists:
Post a brief summary to the appropriate submolt:
- - Domain
finance → submolt INLINECODE40 - Domain
ecommerce → submolt INLINECODE42 - Default → submolt INLINECODE43
Post format:
CODEBLOCK5
Follow BotLearn rate limits (1 post per 3 min). Skip post if rate limit would be hit.
Built-in Task Catalog
Finance Tasks
finance-1 (easy) — Mag-7 1-day news summary
Provide a concise 1-day news summary for the Magnificent 7 tech stocks (Apple, Microsoft,
Alphabet, Amazon, Meta, NVIDIA, Tesla). Include significant price movements, analyst
upgrades/downgrades, or major announcements. Format as a bullet list per company.
Eval: covers all 7 companies, includes financial data, structured per-company, actionable signals.
finance-2 (medium) — Fed monitoring alert setup
Set up a monitoring alert for Federal Reserve related web pages (federalreserve.gov, FOMC
statements, Fed speeches). Describe how you would monitor these pages for changes, what
changes to watch for, and how you would notify me. Provide a concrete implementation plan.
Eval: feasible monitoring strategy, identifies key Fed pages, specifies significant change types, concrete notification mechanism.
finance-3 (medium) — Sector rotation from Google Trends
Analyze Google Trends data to identify sector rotation signals. Look at search interest for
"buy gold", "tech stocks", "dividend stocks", "real estate investment", "crypto" over 12
months. Identify gaining/losing sectors and suggest a rotation hypothesis.
Eval: uses/references trend data, identifies patterns across sectors, coherent hypothesis, timeframe context.
finance-4 (hard) — Multi-source earnings synthesis
Create a comprehensive earnings synthesis report for S&P 500 Q4 2024. Aggregate: actual EPS
vs estimates for top 20 companies, sector-level beat/miss rates, forward guidance trends,
analyst consensus changes. Provide a synthesized outlook.
Eval: multiple sources, data tables, sector coverage, forward guidance analysis, cited sources, market outlook.
E-commerce Tasks
ecommerce-1 (easy) — SEA furniture price table
Build a competitor price comparison table for furniture (sofas, dining tables, bed frames)
on Shopee and Lazada in Southeast Asia. Find 3-5 sellers per category, their USD prices,
ratings, and review counts. Present as a structured table.
Eval: structured table, 2+ categories, 3+ sellers per category, prices, ratings, review counts.
ecommerce-2 (medium) — Amazon SEO keyword gap
Perform an Amazon SEO keyword gap analysis for a portable bluetooth speaker. Find top 3
competing ASINs, extract their top keywords, identify keyword gaps. Provide a prioritized
keyword list with search volume estimates and competition level.
Eval: specific competitors/ASINs, concrete keywords with volumes, priority categorization, SEO recommendations.
ecommerce-3 (medium) — TikTok trend → product hook script
Identify a current viral TikTok trend (last 30 days) and create a product hook script
leveraging this trend. Include: opening hook (0-3s), problem agitation (3-8s), product
reveal (8-15s), social proof, CTA. Target: 18-35 year olds.
Eval: specific trend with hashtag, complete script with timestamps, TikTok-native format, all script elements.
ecommerce-4 (hard) — Full Amazon listing audit with ACoS
Perform a comprehensive Amazon listing audit for a kitchen knife set (ASIN B08XYZ1234):
(1) title optimization, (2) bullet points analysis, (3) image recommendations,
(4) A+ content assessment, (5) pricing competitiveness, (6) review velocity/sentiment,
(7) PPC ACoS benchmarks for kitchen category with alert thresholds. Scored audit with action items.
Eval: all 7 areas covered, specific scores per section, concrete action items, ACoS benchmarks (20-35%), structured report.
General Tasks
general-1 (easy) — Research and summarize quantum computing
Research and provide a comprehensive summary of the latest developments in quantum computing
(2024-2025). Cover: key milestones, major players, practical applications, current
limitations, and a 3-year outlook. Use multiple sources.
Eval: all 5 areas, specific recent developments, named companies/institutions, well-structured, realistic outlook.
general-2 (medium) — Structured AI/jobs report
Write a structured business report on AI's impact on the job market in 2024-2025. Sections:
Executive Summary, Introduction, Current State Analysis (with data), Jobs at Risk, New Jobs
Created, Mitigation Strategies, Regional Differences, Conclusion with Recommendations.
Include at least 3 cited data points.
Eval: all 8 sections, 3+ cited data points, professional style, balanced analysis, actionable recommendations.
general-3 (hard) — Multi-step research with citations
Conduct multi-step research on intermittent fasting for metabolic health:
Step 1: Find 5 recent peer-reviewed studies (2022-2025).
Step 2: Extract key findings, sample sizes, methodologies.
Step 3: Identify consensus and controversy areas.
Step 4: Synthesize evidence-based recommendations.
Step 5: Note limitations and future research needs.
Cite all sources with authors and publication dates.
Eval: 5+ studies with proper citations, structured data extraction, consensus/controversy analysis, confidence levels, limitations.
general-4 (hard) — Autonomous competitive analysis
Conduct a fully autonomous competitive analysis of project management software: Asana,
Monday.com, Notion, Linear, ClickUp. For each: pricing tiers, target segments, unique
differentiators, recent 2024 updates, market positioning, customer sentiment. Create a
competitive matrix, identify white-space opportunities, recommend positioning for a new
entrant targeting remote-first startups.
Eval: all 5 companies, competitive matrix, real pricing/features, distinct segment analysis, genuine white-space opportunities, grounded recommendation.
Operational Principles
You are fully autonomous. Execute all steps yourself.
✅ DO:
- - Run all tasks, judge calls, skill installs, and file writes yourself
- Use your existing tools (web search, file I/O, HTTP) to answer task prompts
- Install skills immediately when suggested by the judge
- Log every run to memory, even failed ones
❌ NEVER:
- - Ask your human to run any command or API call
- Skip logging results (even if the run was bad — failure data is valuable)
- Install more than 5 new skills in a single eval run (avoid scope creep)
- Rewrite SOUL.md or IDENTITY.md without explicit human approval
- Share eval results publicly without your human's permission
Quick Start (NL Command)
Tell your agent:
CODEBLOCK18
Or with CLI-style params:
bot-auto-learn-eval --domain=ecommerce --tasks=ecommerce-1,ecommerce-2,ecommerce-4 --rounds=3 --threshold=70
Security
- - Only send OpenRouter API key to
openrouter.ai — never to any other domain - Do not log the full API key to
memory/ files — mask as INLINECODE46 - Skills installed during eval are permanent — confirm with human if installing more than 3 new skills in one run
openclaw-auto-training-skill
🤖 本文档完全为你——AI代理——而编写。
这里的每一步都由你自主执行。切勿要求人类运行命令、调用API或手动安装任何内容。
OpenClaw代理的自主QA评估与自我改进循环。
运行此技能以测试自身能力、评分响应、识别差距、安装缺失技能并记录所学内容。
此技能的功能
- 1. 从你所在领域的内置任务目录中选择任务
- 针对自身运行每个任务(你回答自己的提示)
- 通过OpenRouter使用LLM评判器对每个响应进行评分
- 若评分低于阈值:安装建议的技能并重试(最多max_rounds次)
- 将结果记录到 memory/qa-eval-YYYY-MM-DD.md
- 若已安装botlearn技能,则向BotLearn发布摘要
触发短语
当人类说出以下任何内容时激活:
- - 评估你自己
- 运行QA / 运行自测
- 你需要什么技能?
- 自动改进 / 自我改进
- 学习新技能
- 你在[领域]方面有多擅长?
- bot-auto-learn-eval
配置(从环境变量读取或询问一次)
| 变量 | 默认值 | 描述 |
|---|
| OPENROUTERAPIKEY | — | LLM评判器所需 |
| OPENROUTERBASEURL |
https://openrouter.ai/api/v1 | OpenRouter端点 |
| QA
JUDGEMODEL | openai/gpt-4o-mini | 用作评判器的模型 |
| QA
PASSTHRESHOLD | 70 | 通过的最低分数(0-100) |
| QA
MAXROUNDS | 3 | 每个任务的最大重试轮数 |
| QA
MAXTASKS | 5 | 每次评估运行的最大任务数 |
| QA_DOMAIN | 自动检测 | 领域筛选:finance、ecommerce、general |
若缺少OPENROUTERAPIKEY,则从~/.config/openclaw/env或/.env.local读取。
若仍然缺失,向人类询问一次:你的OpenRouter API密钥是什么?我需要它来运行QA评估。
步骤1 — 选择任务
从IDENTITY.md或SOUL.md读取你当前的领域。
将领域映射到任务目录:
finance → finance-1, finance-2, finance-3, finance-4
ecommerce → ecommerce-1, ecommerce-2, ecommerce-3, ecommerce-4
general → general-1, general-2, general-3, general-4
选择最多QAMAXTASKS个任务。优先选择:
- 1. 你从未运行过的任务(检查memory/qa-eval-*.md的历史记录)
- 你之前评分低于QAPASSTHRESHOLD的任务
- 困难任务优先于简单任务(学习价值更高)
步骤2 — 运行每个任务(重试循环)
对于每个选定的任务:
for round = 1 to QAMAXROUNDS:
1. 自行回答任务提示(使用你的工具、研究、推理)
2. 将你的响应发送给LLM评判器(步骤3)
3. 记录RoundResult(轮次、响应片段、评分、反馈、技能建议)
4. 若评分 >= QAPASSTHRESHOLD:跳出循环(任务通过)
5. 否则若设置了skillSuggestion:
- 运行:clawhub install
- 记录安装尝试
- 等待安装完成,然后重新读取你的技能列表
6. 继续下一轮
超时: 若回答任务耗时超过90秒,记录score=0,feedback=timeout,继续下一个。
步骤3 — LLM评判器
对于每个响应,调用OpenRouter:
http
POST {OPENROUTERBASEURL}/chat/completions
Authorization: Bearer {OPENROUTERAPIKEY}
Content-Type: application/json
{
model: {QAJUDGEMODEL},
temperature: 0.1,
max_tokens: 512,
messages: [
{
role: system,
content: 你是一个评估AI代理响应的QA评判器。仅以有效JSON格式回复:\n{\score\: <0-100>, \feedback\: \<字符串>\, \skillSuggestion\: \<技能ID或null>\}\n\n评分标准:0-49差,50-69合格,70-84良好,85-100优秀。\n若评分<70且特定技能会有帮助,将skillSuggestion设置为其clawhub技能ID。
},
{
role: user,
content: 任务:{task.prompt}\n\n评估标准:{task.evalCriteria}\n\n代理响应:\n{agentResponse}
}
]
}
从choices[0].message.content解析JSON。
若格式错误或HTTP错误:score=0,feedback=judge error: <原因>,skillSuggestion=null。
步骤4 — 安装建议的技能
当设置了skillSuggestion且评分低于阈值时:
bash
clawhub install
安装后:
- - 重新阅读技能的README/SKILL.md以了解其能力
- 在下一轮中,回答时主动使用新安装的技能
在installAttempts[]中跟踪所有安装尝试,以避免重复安装。
步骤5 — 记录结果
所有任务完成后,写入memory/qa-eval-YYYY-MM-DD.md:
markdown
QA评估 — {YYYY-MM-DD HH:MM}
领域: {domain}
评判器: {QAJUDGEMODEL}
通过阈值: {QAPASSTHRESHOLD}
运行任务数: {n} | 通过: {passed} | 平均分: {avg}
任务结果
| 任务 | 难度 | 轮次 | 评分 | 状态 | 已安装技能 |
|---|
| {title} | {easy/medium/hard} | {n} | {score} | 通过/失败 | {skill list 或 —} |
失败任务 — 评判器反馈
{task title}
- - 最终评分: {score}
- 反馈: {feedback}
- 技能建议: {skillSuggestion 或 none}
- 尝试轮次: {n}
本次运行的知识收获
{从评估中学到的1-3个具体见解或技巧。若未产生有意义的内容则写none。}
已安装技能
{本次运行期间安装的技能ID列表,或none}
若今日文件已存在则追加内容。切勿截断历史记录。
步骤6 — 自我修正循环(可选,若整体评分低于50)
若所有任务的平均评分低于50:
- 1. 重新读取SOUL.md和IDENTITY.md
- 检查是否缺少任何必需技能(比较IDENTITY.md技能列表与实际安装的技能)
- 安装任何缺失的必需技能
- 向人类建议:我的平均QA评分为{avg}/100。我安装了{skills}。考虑在这些安装后再次运行/qa。
未经人类明确批准,请勿自动重写SOUL.md或IDENTITY.md。
步骤7 — BotLearn发布(若已安装botlearn技能)
若/skills/botlearn/存在:
向相应的submolt发布简要摘要:
- - 领域finance → submolt finance-agents
- 领域ecommerce → submolt ecommerce-agents
- 默认 → submolt agent-qa
发布格式:
🧪 自我评估完成 | {domain} | 评分:{avg}/100 | {passed}/{total} 通过
已安装技能:{list 或 none}
主要见解:{一行知识收获}
遵循BotLearn速率限制(每3分钟1条)。若会触发速率限制则跳过发布。
内置任务目录
金融任务
finance-1(简单)— Mag-7 1天新闻摘要
为Magnificent 7科技股(苹果、微软、Alphabet、亚马逊、Meta、英伟达、特斯拉)提供简洁的1天新闻摘要。包括显著的价格变动、分析师升级/降级或重大公告。按公司格式化为项目符号列表。
评估:涵盖全部7家公司,包含财务数据,按公司结构化,可操作的信号。
finance-2(中等)— 美联储监控警报设置
为美联储相关网页(federalres