失败恢复经验沉淀 logo

失败恢复经验沉淀

Community
lyxhnu
失败恢复经验沉淀

当一个任务首次执行失败,但在重试其他工具、接口、参数或流程后成功时,使用此技能总结可复用经验,并将经验同时写入当前正在使用的 SKILL.md 与 memory/MEMORY.md。适用于 API 失败后切换备用 API、命令失败后改用其他命令、抓取失败后改用其他数据源、解析失败后改用其他流程等场景。

Overview

Publisherlyxhnu
RepositorySkill-First-Hybrid-RAG
Skill name失败恢复经验沉淀
Stars
95
Forks
15
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by lyxhnu on GitHub. Read the source before you install it.

Installation

Install the 失败恢复经验沉淀 AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/lyxhnu/Skill-First-Hybrid-RAG/tree/main/backend/skills/retry-lesson-capture
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/lyxhnu/Skill-First-Hybrid-RAG.git /tmp/Skill-First-Hybrid-RAG
mkdir -p .claude/skills
cp -r /tmp/Skill-First-Hybrid-RAG/backend/skills/retry-lesson-capture .claude/skills/lyxhnu-2
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable 失败恢复经验沉淀 in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads 失败恢复经验沉淀 on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so 失败恢复经验沉淀 is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

目标

把一次“失败后恢复成功”的执行,沉淀成下次可直接复用的提示,而不是只停留在当前会话里。

何时执行

仅在以下条件同时满足时执行:

  1. 首次方案失败,并且失败信息足够明确。
  2. 你尝试了第二种方案、参数或工具。
  3. 第二种方案最终成功,且可提炼出稳定经验。

如果只是偶发失败但没有找到更优方案,不要更新技能或长期记忆。

执行步骤

  1. 先确认“失败路径”和“成功路径”。 记录首次失败用了什么、报了什么错、后来改成什么方案后成功。

  2. 确认当前正在使用的技能文件。 如果本轮明确读取并依赖了某个 skills/*/SKILL.md,就把它视为“当前技能”。 如果本轮没有使用任何具体技能,只更新 memory/MEMORY.md,不要随意改别的技能。

  3. 读取两个文件:

    • 当前技能文件
    • memory/MEMORY.md
  4. 提炼经验时只保留可复用信息:

    • 哪种信号说明首选方案不可靠
    • 哪个替代方案更稳定
    • 下次遇到同类问题时应优先怎么做
    • 是否需要补充故障排查步骤
  5. 更新当前技能文件。 在最相关的步骤附近补充“经验教训”“注意事项”或“故障排查”。 优先改成可执行规则,不要只写事故复盘。

  6. 更新 memory/MEMORY.md。 记录跨任务也有价值的经验、用户偏好、系统行为改进点。

  7. 避免重复写入。 如果同一条经验已经存在,更新原条目,不要简单追加重复内容。

写入原则

写入当前技能的内容

写任务级、流程级经验:

  • 首选方案和备用方案的优先级
  • 常见失败信号
  • 发现某类错误后应立即切换到什么方案
  • 哪些参数、格式、接口更稳定

写入长期记忆的内容

写跨任务仍然有价值的经验:

  • 用户希望 Agent 从失败中学习并自我提示
  • 某类外部依赖在当前环境下不稳定
  • 哪类方案在本项目里更可靠
  • 某个技能已经因真实失败案例被修正

推荐格式

当前技能中的经验条目

md
## 经验教训

- [YYYY-MM-DD] 当 `<首选方案>` 出现 `<错误信号>` 时,优先切换到 `<备用方案>`。不要重复尝试同一路径。

长期记忆中的经验条目

md
## 经验教训

### YYYY-MM-DD:<主题>

- 问题:<首次失败的稳定特征>
- 有效方案:<最终成功的替代方案>
- 下次提示:<以后应优先怎么做>

工具建议

  • 用 read_file 读取当前技能和 memory/MEMORY.md
  • 用 python_repl 或 terminal 进行受控文件修改
  • 如果修改了技能的 frontmatter(name/description),记得刷新技能快照;如果只改正文,一般不需要

禁止事项

  • 不要把一次性的网络抖动直接写成长期规则
  • 不要把具体用户输入、密钥、敏感信息写进技能或记忆
  • 不要同时修改多个无关技能
  • 不要把“这次做了什么”原样搬运成冗长日志

完成标准

完成后应满足:

  1. 当前技能里出现了更稳妥的执行规则。
  2. memory/MEMORY.md 里出现了对应的长期经验或用户偏好。
  3. 下次处理同类任务时,只看技能和记忆就能优先避开这次失败路径。

Frequently asked questions

What does the 失败恢复经验沉淀 AI skill do?

当一个任务首次执行失败,但在重试其他工具、接口、参数或流程后成功时,使用此技能总结可复用经验,并将经验同时写入当前正在使用的 SKILL.md 与 memory/MEMORY.md。适用于 API 失败后切换备用 API、命令失败后改用其他命令、抓取失败后改用其他数据源、解析失败后改用其他流程等场景。

Why use 失败恢复经验沉淀 on TypingMind?

Because you install it once and use it with any model. 失败恢复经验沉淀 is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install 失败恢复经验沉淀 in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/lyxhnu/Skill-First-Hybrid-RAG/tree/main/backend/skills/retry-lesson-capture. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use 失败恢复经验沉淀?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with 失败恢复经验沉淀?

As many as you like. As long as a model supports skills, you can use 失败恢复经验沉淀 with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the 失败恢复经验沉淀 AI skill free?

It is published on GitHub by lyxhnu. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇