/sage:sage-learnfrom sage
Captures codebase knowledge into sage-memory by scanning project structure and analyzing modules. Stores prose findings and ontology entities for persistent context. Useful for onboarding or deep-diving into a project.
Ships in sage. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Load this skill when the user runs /sage-learn or asks to learn something (the Sage learn workflow).
Hermes does NOT interpolate an in-body argument token. The user's arguments/flags arrive as a SEPARATE instruction line appended to this skill invocation. Wherever the steps below refer to "the user's arguments", use the text of that appended instruction line.
When a step calls for an independent review, invoke delegate_task against the sage-reviewer skill. Hermes delegate_task has NO toolset-restriction parameter — read-only is prompt-enforced, and you MUST verify afterward that the reviewer made no edits (e.g. git status unchanged) before accepting its verdict.
RULES (apply to every step — non-negotiable):
Deliberate knowledge capture. Use to onboard to a new codebase, deeply understand a module, or build persistent memory for a project area.
/learn builds memory (prose knowledge). /learn --ontology builds the
ontology (a typed entity/relationship graph) instead — it folds in the
former /map workflow. Parse the arguments the user provided alongside this skill invocation (delivered as a separate instruction line, NOT a literal token):
/learn (default) → Steps 1–N below (memory capture)./learn --ontology → read core/workflows/learn-modes/ontology.md and follow
it; it maps modules, services, and APIs and their dependencies via the
sage-ontology skill.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 with these parameters:
MCP parameter types matter: tags must be an actual array, not a JSON string. Pass ["billing", "auth"], not '["billing", "auth"]'. Same for all array and integer parameters across all sage-memory tools.
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.
After storing prose knowledge, create ontology entities for the structural elements you discovered. This builds a knowledge graph that keeps the codebase's architecture navigable across sessions.
For broad scans, create entities for:
Project entity (name, status: active)depends_on relationsDocument entitiesFor deep dives, create entities for:
Project entity if not already in graphTask entities (as sub-units of work)depends_on relationsdepends_on relationsKeep it lightweight:
sage_memory_search: tags=["ontology"]) to
avoid duplicating existing entitiesskills/sage-ontology/SKILL.mdSave 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.
What SKILL.md sets; muted values are Claude Code's defaults
33 skills in this plugin
/apiUse when designing, reviewing, or changing an HTTP, REST, or GraphQL API — endpoints, resource naming, error responses, pagination, versioning, idempotency, or API contracts between services./autoresearchAutonomous iteration toward a measurable outcome. Use when the user wants to optimize a numeric metric through repeated modify-verify cycles — reduce bundle size, increase test coverage, improve query time, lower readability score. Not for exploratory research, subjective judgment, or tasks without a verification command.
/baasUse when building on Firebase, Supabase, or a similar Backend-as-a-Service — writing security rules, modeling data for client queries, deciding whether logic needs a serverless function, or wiring real-time and client-direct access.Generated from the plugin's indexed repository (xoai/sage) — no native marketplace selected
npx claudepluginhub p/xoai-sageOther plugins' skills for the same job