lesson
Lesson Skill — 铁律捕获
Overview
自动从对话中提取踩坑经验和关键教训,写入项目的 MEMORY.md。
Prerequisites
- 项目根目录需要有
MEMORY.md文件 - 如果没有,运行安装脚本自动创建
Installation
# 自动安装(如果项目没有 MEMORY.md)
curl -sL https://raw.githubusercontent.com/Ai-feier/skills/main/docs/INSTALL.sh | bash
Usage
触发方式
- 显式命令:
/lesson、记录经验、铁律 - Agent 自动检测到重要经验时
写入内容
- 开发规范
- 调试经验
- 工具配置
- 代码风格
- 任何值得记录的经验
示例
You: 这个项目的 API 总是返回 401,可能是我 token 过期了
Agent: 记录下来,写入 MEMORY.md
会写入:
## 调试经验
- 401 错误通常是 token 过期,检查 Auth 头部
More from ai-feier/skills
init-agents-md
在项目根目录生成 AGENTS.md 文件和 docs/ 知识库骨架,建立 agent-first 仓库的文档治理体系。手动触发,检查是否存在后写入模板。
3openspec-propose
Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.
2openspec-explore
Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change.
2your-skill-name
Describe what this skill does and when Claude/OpenCode should use it. Be specific about trigger phrases and scenarios. Write it 'pushy' — err on the side of triggering too often rather than too little.
2openspec-apply-change
Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.
2openspec-archive-change
Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.
2