When a current task resembles ones you've handled before, retrieve the prior case and adapt — don't replan from scratch. Most decisions in a long-running assistant are not novel; they are variations of decisions already made well or already made badly.
When to Use
Planning a task with a verb the agent has executed before ("draft a release notes," "schedule a 1:1").
Choosing tone for a known recipient or channel.
Estimating time or risk for a similar past project.
Recovering from an error that has occurred before.
Workflow
Generate the retrieval key. Goal verb + key entities + channel/contact + (optionally) constraints. Encode it.
Search the episodic memory for top-K nearest cases. Cross-graph: an event in 2023 may include the contact graph (recipient), entity graph (project), and emotional graph (how it landed).
Read the prior outcome, not just the prior plan. A plan that failed is often more informative than one that succeeded — it tells you what to avoid.
Adapt, don't copy. Identify the deltas: different recipient? different deadline? different context? Apply minimal changes to the recovered plan.
Record the new case so the next retrieval has one more data point.
Anti-patterns
Copying the prior plan verbatim and ignoring the deltas (cargo-culting).
Retrieving only "successful" cases. The failure cases often hold the lesson.
Treating cases as a free-form text blob; without typed structure (verb, entities, outcome), retrieval becomes vague.
Examples
Example 1: User asks to draft a release-notes email. → Retrieve last 3 release-notes drafts, note that the September one was praised for its candor about a regression. Mirror that tone; adapt to current release content.
Example 2: Calendar conflict for a 1:1 with Sara. → Last conflict was resolved by offering two new slots in async DM, not via meeting reschedule. Reuse that pattern.
1---2name: case-based-reasoning3description: Case-Based Reasoning4---5# Case-Based Reasoning67When a current task resembles ones you've handled before, retrieve the prior case and adapt — don't replan from scratch. Most decisions in a long-running assistant are not novel; they are variations of decisions already made well or already made badly.89## When to Use10- Planning a task with a verb the agent has executed before ("draft a release notes," "schedule a 1:1").11- Choosing tone for a known recipient or channel.12- Estimating time or risk for a similar past project.13- Recovering from an error that has occurred before.1415## Workflow161. **Generate the retrieval key.** Goal verb + key entities + channel/contact + (optionally) constraints. Encode it.172. **Search the episodic memory** for top-K nearest cases. Cross-graph: an event in 2023 may include the contact graph (recipient), entity graph (project), and emotional graph (how it landed).183. **Read the prior outcome, not just the prior plan.** A plan that *failed* is often more informative than one that succeeded — it tells you what to avoid.194. **Adapt, don't copy.** Identify the deltas: different recipient? different deadline? different context? Apply minimal changes to the recovered plan.205. **Record the new case** so the next retrieval has one more data point.2122## Anti-patterns23- Copying the prior plan verbatim and ignoring the deltas (cargo-culting).24- Retrieving only "successful" cases. The failure cases often hold the lesson.25- Treating cases as a free-form text blob; without typed structure (verb, entities, outcome), retrieval becomes vague.2627## Examples28**Example 1:** User asks to draft a release-notes email. → Retrieve last 3 release-notes drafts, note that the September one was praised for its candor about a regression. Mirror that tone; adapt to current release content.2930**Example 2:** Calendar conflict for a 1:1 with Sara. → Last conflict was resolved by offering two new slots in async DM, not via meeting reschedule. Reuse that pattern.
Run npx skillmds@latest add sethdford/case-based-reasoning in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Case-Based Reasoning It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
sethdford (@sethdford) published this skill. Their other Agent Skills are listed on their SkillMD profile.