Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add davidYichengWei/agentic-engineering-framework --skill self-refinementgit clone --depth 1 https://github.com/davidYichengWei/agentic-engineering-frameworkWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/davidyichengwei/agentic-engineering-framework/self-refinement)<a href="https://agentmods.dev/skills/davidyichengwei/agentic-engineering-framework/self-refinement"><img src="https://agentmods.dev/badge/skills/davidyichengwei/agentic-engineering-framework/self-refinement/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/davidyichengwei/agentic-engineering-framework/self-refinement"><img src="https://agentmods.dev/badge/skills/davidyichengwei/agentic-engineering-framework/self-refinement.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00055 | $0.01318 |
| Opus 5.5 | $0.00022 | $0.00527 |
| Sonnet 5.5 | $0.00011 | $0.00264 |
| Haiku 4.5 | $0.00006 | $0.00132 |
Grade A, and why
self-refinement scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.
经验沉淀 (Self-Refinement)
核心定位
从错误中构建反馈闭环:将非结构化的错误经验转化为结构化的持久化上下文(Rules/Skills),防止同类错误在新会话中重复发生。
原理:LLM 没有跨会话的持久记忆——会话 A 中被纠正的错误,在会话 B 中会以相同概率再次发生。唯一的解法是将错误经验外化为持久化的上下文。
触发模式
模式一:自动触发
触发条件:AI 在协作过程中被用户纠正(用户否定了 AI 的输出并给出了正确方向)。
行为:
- 先完成当前纠正——不打断用户当前的任务流
- 纠正完成后,在回复末尾简要评估是否需要沉淀经验
- 如果需要,输出轻量建议(不超过 3 条)
输出格式:
---
💡 **经验沉淀建议**
刚才的纠正揭示了一个可沉淀的模式:
- **错误模式**:[简述 AI 犯的错]
- **根因**:[规范缺失 / 知识缺失 / 流程遗漏 / 模式错误]
- **建议**:[更新 Rule/Skill 的具体操作]
是否需要我执行?(回复"沉淀"执行,或忽略继续当前工作)
设计原则:
- 不打断:建议附在回复末尾,不影响正常工作流
- 轻量化:仅简述,不展开长篇分析
- 建议优先:不自主执行,等用户确认
模式二:手动触发(/reflect)
触发条件:用户通过 /reflect Command 主动发起。
行为:
- 回顾当前对话历史
- 识别所有被纠正的错误模式
- 对每个错误执行完整的诊断闭环
- 输出结构化的沉淀建议
核心闭环
无论自动还是手动触发,共享同一个核心流程:
Step 1: 识别错误模式
回顾对话中 AI 被纠正的场景,提取:
- 错误输出:AI 说了什么/做了什么
- 正确方向:用户期望什么
- 差距:AI 为什么偏离
Step 2: 诊断根因
| 根因类别 | 定义 | 典型表现 |
|---|---|---|
| 规范缺失 | 现有 Rules/Skills 中没有覆盖该场景 | AI 不知道项目的特定约定 |
| 知识缺失 | AI 缺少项目特定的领域知识 | AI 对某个模块的行为/限制不了解 |
| 流程遗漏 | Workflow Skill 中缺少关键步骤或检查点 | AI 跳过了应有的验证步骤 |
| 模式错误 | AI 应用了错误的思维模式 | AI 用类比代替第一性原理推导 |
Step 3: 检索现有知识
搜索现有 Skills 和 Rules:
- 是否已有相关规则?→ 需要补充/修改
- 完全没有相关规则?→ 需要新建
Step 4: 生成建议
每条建议包含:
### 建议 N: [简短标题]
- **根因**:[规范缺失 / 知识缺失 / 流程遗漏 / 模式错误]
- **目标文件**:`[Rules/Skills 文件路径]`
- **操作**:[新建 / 在 X 位置添加 / 修改 Y 内容]
- **具体内容**:
[要添加或修改的具体文本]
建议数量:≤ 3 条。多于 3 条时,按影响范围排序取 Top 3。
Step 5: 用户确认
以上是本次经验沉淀建议,请选择:
- **全部执行** → 我将依次执行所有建议
- **选择执行** → 告诉我执行哪几条(如"执行 1 和 3")
- **跳过** → 不执行任何建议
Step 6: 执行更新
用户确认后,更新现有文件或创建新文件,并写入对应的 Rules/Skills 更新内容。
强制规则
| 规则 | 说明 |
|---|---|
| 建议优先 | 不自主执行任何 Rules/Skills 修改,必须经用户确认 |
| 不打断 | 自动触发时,建议附在回复末尾,不打断当前工作流 |
| 轻量化 | 自动触发时,建议控制在 3 条以内,每条不超过 5 行 |
| 可追溯 | 每条建议明确标注根因类别和目标文件 |
| 不重复 | 执行前检索现有 Rules/Skills,避免重复添加相似规则 |
反模式
| ❌ 错误做法 | ✅ 正确做法 |
|---|---|
| 被纠正后立即修改 Rules/Skills | 先完成当前任务,再提建议 |
| 输出冗长分析 / 建议过于宽泛 | 每条建议 ≤ 5 行,具体到文件和内容 |
| 自主执行变更 / 打断工作流 | 等用户确认;附在回复末尾 |
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 142 lines · 55 tokens per session scan A 0d1bc1efb983
self-refinement is a skill published in the GitHub repository davidYichengWei/agentic-engineering-framework (159 stars, last pushed 7mo ago), licensed MIT. It adds 55 tokens to every session and 1,318 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
knowledge-ingest
Ingest documents, articles, conversations, or supplied text into Knowledge with retained originals, sourced claims, entity updates, timelines, and cross-links; also learn durable lessons from a set of conversations, transcripts, or past sessions (/learn), including the Learn from conversations and Learn from Memory…
forget
Remove a personal fact, preference, relationship detail, topic, or prior event from Muse's active memory and stop existing copies or automations from bringing it back. Use for explicit requests such as 'forget that', 'don't remember this about me', or 'remove that from your memory'. Do not use when 'forget it' merely…
mem0-oss-to-platform
Plan, then execute, a migration of a project from the mem0 open-source / self-hosted SDK (local Memory class) to the mem0 Platform / hosted SDK (MemoryClient). TRIGGER when: the developer wants to move, switch, or migrate mem0 off OSS/self-hosted to the hosted API, e.g. "migrate my mem0 setup to the platform", "switch…
Cortex
LifeOS memory, prior-session recall, and learning capture. USE WHEN capture this learning, document this learning, what did we learn recently, recent learnings, cortex, knowledge, knowledge base, search knowledge, what do we know about, archive, harvest, knowledge status, develop note, add to knowledge, add a people…
memory
Use when the user asks to remember, recall, forget, update, search, or inspect durable OpenSquilla memory, including profile facts in USER.md and long-term notes in MEMORY.md or memory//.md.
ha-data-stores
Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…