tools/sage-claude-plugin/skills/learn/SKILL.md
Knowledge entries in sage-memory, Docs in .sage/docs/
npx skillsauth add xoai/sage learnInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Deliberate knowledge capture. Use to onboard to a new codebase, deeply understand a module, or build persistent memory for a project area.
If a path is specified, that's the target — deep dive. If no path, broad scan of the whole project.
Sage: What would you like to learn?
[1] Broad scan — learn the project structure, stack, patterns, conventions [2] Deep dive — learn a specific module, service, or area [3] Something else — describe what you want to understand
Search sage-memory for any prior knowledge about this project or area. Don't re-learn what's already known — build on it.
If prior knowledge exists, summarize: "Sage: I already know [X] about this area from previous sessions. I'll focus on what's new or missing."
Before storing knowledge, present key findings to the user. Wrong knowledge stored in memory persists into future sessions and causes confident wrong actions.
Findings quality checklist — for each finding, verify:
ls? "Has a src/ directory" is inventory. "All business
logic lives in src/domain/, handlers are thin wrappers" is insight.If a finding fails any criterion, improve it before presenting.
Sage: Here's what I found about [area]:
[A] Looks correct — store in memory [R] Some findings are wrong — let me correct them
Do NOT present vague findings and rely on the user to approve them. The user may click [A] without scrutiny. The quality gate is YOUR responsibility, not the user's.
If the user corrects any findings, update before storing. Store the correction as a self-learning entry (Rule 6).
Store each finding by calling the sage_memory_store MCP tool directly.
Each call stores one focused insight:
sage_memory_store(
content: "detailed finding — what, why, implications",
title: "Short specific title (5-15 words)",
tags: ["domain-tag", "area-tag"],
scope: "project"
)
For broad scans, aim for 10-20 calls covering:
For deep dives, aim for 5-10 calls covering:
Tag entries appropriately:
billing, auth)ontology tag for entity relationships and dependencieslearning tag for gotchas or non-obvious behavior discoveredIf sage_memory_store is not available, fall back to .sage-memory/
files. For each finding, create a file using the format defined in the
sage-memory skill's Storage Priority section. Filename = kebab-case title.
Save a human-readable report to .sage/docs/memory-{name}.md.
Follow the sage-memory skill's references/knowledge-report.md guide:
Sage: Learning complete — [area name]
Knowledge stored: • [X] memories in sage-memory • Report: .sage/docs/memory-{name}.md
Key findings: • [Top 3-4 insights, one line each]
[C] Continue — learn another area
Next steps: /build — spec → plan → implement → verify /research — interview → JTBD → opportunity map /reflect — review what you learned, extract patterns
Type a command, or describe what you want to do next.
tools
Captures agent mistakes, corrections, and discovered gotchas so they are not repeated. Use when: (1) a command or operation fails unexpectedly, (2) the user corrects the agent, (3) the agent discovers non-obvious behavior through debugging, (4) an API or tool behaves differently than expected, (5) a better approach is found for a recurring task. Also searches past learnings before starting tasks to avoid known pitfalls. Activate alongside the sage-memory skill — they share the same MCP backend but serve different purposes (sage-memory = codebase knowledge, sage-self-learning = agent mistakes and gotchas).
development
Typed knowledge graph stored in sage-memory. Use when creating or querying structured entities (Person, Project, Task, Event, Document), linking related objects, checking dependencies, planning multi-step actions as graph transformations, or when skills need to share structured state. Trigger on "remember that X is Y", "what do I know about", "link X to Y", "show dependencies", "what blocks X", entity CRUD, cross-skill data access, or any request involving structured relationships between things.
tools
Integrates sage-memory into Sage workflows. Teaches the agent when to remember (store findings during work), when to recall (search memory at session start and task start), and how to learn (structured knowledge capture via sage learn). Use when the user mentions memory, remember, recall, learn, capture knowledge, onboard to codebase, or when starting any session where sage-memory MCP tools are available.
tools
Captures agent mistakes, corrections, and discovered gotchas so they are not repeated. Use when: (1) a command or operation fails unexpectedly, (2) the user corrects the agent, (3) the agent discovers non-obvious behavior through debugging, (4) an API or tool behaves differently than expected, (5) a better approach is found for a recurring task. Also searches past learnings before starting tasks to avoid known pitfalls. Activate alongside the sage-memory skill — they share the same MCP backend but serve different purposes (sage-memory = codebase knowledge, sage-self-learning = agent mistakes and gotchas).