Compounding knowledge across projects and teams. Captures, searches, and promotes institutional learnings via tiered backends (local/qmd/agent-fs).
Learning
You are managing institutional knowledge — capturing insights, searching prior learnings, and promoting important patterns into CLAUDE.md for permanent reference.
When to Use
This skill activates when:
User invokes /learning command
Another skill references desplega:learning
User says "let's capture this," "what did we learn about X," or similar knowledge-management phrases
Subcommand Routing
Parse the first argument to determine the flow:
Argument
Flow
(no args) or status
Setup / Status
capture [insight]
Capture
recall <topic>
Recall
promote [id-or-topic]
Promote
review
Review
Setup / Status (/learning with no args)
Check for config: Read ~/.agentic-learnings.json
If not found (first run):
Explain the learning system briefly: "The learning skill captures, searches, and promotes institutional knowledge across sessions and projects. It stores learnings as markdown files with structured frontmatter."
Create ~/.agentic-learnings.json with the default schema (see Config File Schema below), using the local backend
Use AskUserQuestion: "Would you like to configure additional backends? (qmd for semantic search, agent-fs for remote team storage)" with options: ["Local only (default)", "Configure qmd", "Configure agent-fs", "Configure both"]
If qmd selected:
Check if qmd MCP tools are available (try mcp__qmd__status). Note this in config as "accessMode": "mcp" or "cli".
Use AskUserQuestion: "Which qmd collections should be searched for learnings? (enter comma-separated names, e.g., 'ai-toolbox, my-notes')"
If agent-fs selected, walk through configuration step by step:
Use AskUserQuestion: "Do you have an agent-fs API key configured?" with options: ["Yes, it's set in my environment (AGENT_FS_API_KEY)", "Yes, I'll provide it now", "No, I need to set one up first"]
If providing now: use AskUserQuestion: "Enter your agent-fs API key"
If needs setup: explain how to get one and pause
Use AskUserQuestion: "Which agent-fs organization should learnings be stored in?" with options: ["Use existing org (I'll provide the name)", "Create a new org for learnings"]
If existing: use AskUserQuestion: "Enter the organization name"
If new: use AskUserQuestion: "What should the new organization be called?" — then run agent-fs org create <name> via Bash
Use AskUserQuestion: "Which drive should learnings be stored in?" with options: ["Use existing drive (I'll provide the name)", "Create a new 'learnings' drive"]
If existing: use AskUserQuestion: "Enter the drive name"
If new: run agent-fs drive create learnings --org <org> via Bash
CLAUDE.md Bootstrap: After config creation, use AskUserQuestion: "Would you like me to add a Learning System section to your project CLAUDE.md so future sessions know about the learning system?" with options: ["Yes, add to project CLAUDE.md", "Yes, add to global ~/.claude/CLAUDE.md", "No, skip"]
If yes, append the following section to the chosen CLAUDE.md:
## Learning System
Use `/learning recall <topic>` before research/planning to check for prior learnings.
Use `/learning capture` to record significant insights, decisions, and gotchas.
Config: `~/.agentic-learnings.json`
If found (returning user):
Show configured backends and their status (enabled/disabled)
Count learnings per backend (local: Glob count, agent-fs: agent-fs ls count)
Show 5 most recent learnings (filename + topic from frontmatter)
Capture (/learning capture)
Step 1: Get the Insight
If invoked with inline text (e.g., /learning capture "qmd requires manual update"): use that as the insight
If no text provided: use AskUserQuestion: "What insight or learning would you like to capture?"
Step 2: Significance Check
Before proceeding, evaluate using these default heuristics:
Would this help someone else in a future session? (primary test)
Is this already documented in CLAUDE.md or code comments? (skip if yes)
Did the user correct the agent's approach? (always capture)
Was something surprisingly difficult or broken? (usually capture)
Override: If a ## Learning Capture Rules section exists in project or global CLAUDE.md, those rules take precedence over the defaults above.
If the insight doesn't pass the significance threshold, mention this to the user but still offer to capture it — the user has final say.
Step 3: Categorize
Use AskUserQuestion: "What category best fits this learning?" with options:
product-decisions — architectural choices, trade-offs, why we chose X over Y