learning-from-mistakes
Codifies the latest correction or mistake in the conversation as a short imperative rule in the project or global CLAUDE.md or AGENTS.md, after the user approves it. Use when the user says "learn from this mistake", or when the user asks to learn from a mistake, remember a lesson for next time, add a rule to CLAUDE.md, or not repeat a behavior. Not for a whole session; use running-retros.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- learning-from-mistakes
- description
- Codifies the latest correction or mistake in the conversation as a short imperative rule in the project or global CLAUDE.md or AGENTS.md, after the user approves it. Use when the user says "learn from this mistake", or when the user asks to learn from a mistake, remember a lesson for next time, add a rule to CLAUDE.md, or not repeat a behavior. Not for a whole session; use running-retros.
02 资源文件 2
- 参考文档agents/openai.yaml255 B
- 脚本scripts/resolve-instructions-file.sh3.8 KB
03 SKILL.md 正文
Learn From Mistake
Turn the most recent mistake or correction in the conversation into a rule in the instructions file the agent reads, so the lesson persists across sessions. If no correction is clear, ask which one to codify.
- The rule: one or two imperative sentences ("Do X", "Never Y"), specific enough to change behavior. A platitude ("be careful with tests") fails.
- Target file: choose the scope,
projectfor a lesson about this codebase, its conventions or tooling, orglobalfor one that applies across projects, then runscripts/resolve-instructions-file.sh <claude|codex> <project|global>withclaudein Claude Code andcodexin Codex. Exit 0 prints the file to edit. On exit 2 (no repository) or 69 (no git), ask where to write. In another host, or on exit 3, ask which file it reads. On exit 4, report the loop. Exit 1 is a usage error: fix the arguments and rerun. - Overlap: if the rule already exists, stop and say where. If a related rule exists, refine it instead of adding a duplicate.
- Approval: show the rule (or the old and new text of a refined rule), the
file path, and the section: an existing section that fits, or else a new
## Learned Rulessection. Never propose any other new heading. Write nothing until the user approves.
04 同仓库更多 Skills
writing-system-prompts
Writes and reviews system prompts for AI tools, agents, chatbots, and LLM products using a fixed section order and a quality checklist. Use when the user says "write a system prompt", or when drafting a system prompt or auditing one for missing stop criteria, tool rules, constraints, or examples. Not for compressing an existing prompt; use improving-prompts.
writing-prose
Writes and edits prose for people in a plain, conversational, short house style with no em dashes. Use when the user says "write this up", or when drafting or revising documentation, READMEs, explanations, blog posts, or other human-facing prose. Not for prompts written for agents; use writing-system-prompts or composing-agent-prompts.
writing-acceptance-criteria
Writes or rewrites acceptance criteria until each is provable: one observable outcome with a named check that can fail. Use when the user says "write acceptance criteria", or asks to write, rewrite, or tighten acceptance criteria or a definition of done. Not for proving work meets them; use proving-claims.
summarizing-shipped-work
Summarizes the user's merged GitHub PRs for a timeframe into a grouped, linked shipped-work report with highlights, and offers to update a brag document. Use when the user says "what shipped?", or when asked what the user shipped (this week, last month, a quarter, since a date), for a status update, or to update a brag doc.
running-retros
Mines a session transcript, past agent sessions, or named sources such as PR review comments for durable learnings, then proposes approval-gated edits to skills, AGENTS.md, or docs and tracker issues. Use when the user says "retro", or when the user explicitly asks for a retrospective. Never infer from session end or friction.
improving-prompts
Compresses and clarifies an existing LLM prompt through concept elevation, verifying that no original instruction is lost. Use when the user says "improve this prompt", or when the user supplies a prompt or prompt file and asks to improve, tighten, optimize, or refine it. Not for writing a new prompt; use writing-system-prompts.