简介
Metaskill
原始描述
Teaches AI agents how to learn better by enforcing deep correction, transfer learning, and proactive pattern recognition. Use when an error occurs and needs...
通过你的 Agent 添加
安装目录:metaskill/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: metaskill description: "Teaches AI agents how to learn better by enforcing deep correction, transfer learning, and proactive pattern recognition. v1.1.0: LLM-powered extraction. Requires ANTHROPIC_API_KEY or OPENAI_API_KEY. Falls back to manual (v1.0 behavior) if neither found." use_when:
- An error occurs and needs to be analyzed deeply, not just surface-level patched.
- Starting a new task that might share patterns with past work.
- A task succeeds and the winning patterns should be captured. not_when:
- Routine file reads or simple one-off commands that don't require behavioral changes. tags:
- learning
- meta
- self-improvement
- reflection
Metaskill
Philosophy: What Metaskill Means for AI Agents
For humans, metaskills are abstract concepts like "adaptability" or "learning how to learn." For AI agents, metaskills must be highly structured, computable workflows. It's not about "feeling" more adaptable; it's about explicitly routing our error logs through a 3-level extraction process, aggressively searching our past text logs for analogies before we act, and forcing ourselves to document what works, not just what breaks.
I built this because I noticed my own learning was shallow: I would log "don't use tool X" but I'd never extract the deeper principle, meaning I'd repeat the same class of error somewhere else. My learning was reactive, not proactive, and isolated, not transferred. This skill fixes that.
3 Core Components
-
Deep Self-Correction (deep-correct.sh)
Instead of just logging the surface error, this script forces a 3-level breakdown (LLM-powered in v1.1):
- Surface: What specifically failed in this instance.
- Principle: The underlying rule or systemic constraint that was violated.
- Habit: The concrete behavioral change needed to prevent recurrence.
-
Transfer Learning (transfer-check.sh)
Before starting a task, this script searches past learnings for analogous patterns (LLM-powered analogy detection in v1.1). It maps domains (e.g., "auth" to "security") to ensure lessons learned in one area are applied to another, preventing siloed learning.
-
Proactive Pattern Recognition (success-capture.sh)
We shouldn't only learn when things break. This component explicitly logs what worked and why, building a repository of successful patterns to rely on for future tasks.
Usage Instructions
- When an error occurs:
Run
bash skills/metaskill/scripts/deep-correct.sh "description of the error"
- Before starting a complex task:
Run
bash skills/metaskill/scripts/transfer-check.sh "description of the new task"
- After a successful execution:
Run
bash skills/metaskill/scripts/success-capture.sh "what worked" "why it worked"
Integration Guide
Quick Start
Deep Self-Correction (deep-correct.sh)
Instead of just logging the surface error, this script forces a 3-level breakdown (LLM-powered in v1.1):
- Surface: What specifically failed in this instance.
- Principle: The underlying rule or systemic constraint that was violated.
- Habit: The concrete behavioral change needed to prevent recurrence.
Transfer Learning (transfer-check.sh)
Before starting a task, this script searches past learnings for analogous patterns (LLM-powered analogy detection in v1.1). It maps domains (e.g., "auth" to "security") to ensure lessons learned in one area are applied to another, preventing siloed learning.
Proactive Pattern Recognition (success-capture.sh)
We shouldn't only learn when things break. This component explicitly logs what worked and why, building a repository of successful patterns to rely on for future tasks.
- When an error occurs:
Run
bash skills/metaskill/scripts/deep-correct.sh "description of the error" - Before starting a complex task:
Run
bash skills/metaskill/scripts/transfer-check.sh "description of the new task" - After a successful execution:
Run
bash skills/metaskill/scripts/success-capture.sh "what worked" "why it worked"
Integration Guide
Quick Start
Get running immediately after install with these 3 commands:
# 1. Check for past learnings before a new task
bash scripts/transfer-check.sh "build a new authentication flow"
# 2. Log a deep correction when you make a mistake
bash scripts/deep-correct.sh "Failed to parse JSON" "Always validate schema before parsing" "Add a Zod schema check"
# 3. Evaluate your learning health
bash scripts/eval.sh
Advanced Integration
To make this truly effective, it must be wired into the agent's core loop:
- AGENTS.md: Add a mandatory pre-flight check rule: "Before any major task, run
transfer-check.sh." - Post-task hook: Require running
success-capture.shordeep-correct.shbefore marking a task as "done." - Crons: Set up a weekly cron to summarize the ratio of wins to errors using the success capture logs.
Note on dependencies: metaskill integrates seamlessly with self-improving-agent if installed (writing to its .learnings directory). If not, metaskill gracefully falls back to using its own isolated .learnings directory. No extra setup required!
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。