learn · worldflowai — Claude Code command: what it does, how to install
The learn slash command turns reusable lessons from the current session into skills. Run it after a difficult fix, debugging session, or project-specific discovery.
MIT ★ 6,739 updated 2026-01-23
/plugin marketplace add WorldFlowAI/everything-claude-code
/plugin install everything-claude-code@everything-claude-codeWhat learn does
/learn reviews the active session for knowledge worth keeping: resolved errors, diagnostic methods, workarounds for library or API limits, and conventions found in the codebase. It selects the most reusable insight and drafts a skill with a specific problem, solution, example, and trigger conditions.
The command asks for approval before writing anything. Once confirmed, the skill goes to ~/.claude/skills/learned/[pattern-name].md. Simple typos and one-off incidents such as a single API outage are excluded. The file is not saved until the user confirms it.
What it helps with
- save a hard-won error fix for later sessions
- turn a debugging method into a reusable skill
- document a workaround for a library or API limit
- capture a convention discovered in the codebase
Example prompts for the agent
- Run
/learnand find reusable solutions in this session. - Use
/learnto select the most valuable debugging pattern and draft a skill file. - Run
/learn, show me the draft, and wait for my approval before saving it.
How to install learn
1Plugin marketplace
/plugin marketplace add WorldFlowAI/everything-claude-code/plugin install everything-claude-code@everything-claude-code2Manually: put the files in place
.claude/commands/learn.mdCall it with /learn. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/learn.mdCall it with /prompts:learn. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/learn.prompt.mdManually: put the files in place
.gemini/commands/learn.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about learn
How do I install learn in Claude Code?
Add the marketplace with /plugin marketplace add WorldFlowAI/everything-claude-code, install the plugin using /plugin install everything-claude-code@everything-claude-code, then use .claude/commands/learn.md.
What does learn do?
It reviews the current session, picks a reusable pattern, and drafts a skill covering the problem, solution, example, and usage conditions.
Does learn save the skill automatically?
No. It requests confirmation first, then writes the approved skill to ~/.claude/skills/learned/[pattern-name].md.
Source text
learn.md · MIT
# /learn - Extract Reusable Patterns Analyze the current session and extract any patterns worth saving as skills. ## Trigger Run `/learn` at any point during a session when you've solved a non-trivial problem. ## What to Extract Look for: 1. **Error Resolution Patterns** - What error occurred? - What was the root cause? - What fixed it? - Is this reusable for similar errors? 2. **Debugging Techniques** - Non-obvious debugging steps - Tool combinations that worked - Diagnostic patterns 3. **Workarounds** - Library quirks - API limitations - Version-specific fixes 4. **Project-Specific Patterns** - Codebase conventions discovered - Architecture decisions made - Integration patterns ## Output Format Create a skill file at `~/.claude/skills/learned/[pattern-name].md`: ```markdown # [Descriptive Pattern Name] **Extracted:** [Date] **Context:** [Brief description of when this applies] ## Problem [What problem this solves - be specific] ## Solution [The pattern/technique/workaround] ## Example [Code example if applicable] ## When to Use [Trigger conditions - what should activate this skill] ``` ## Process 1. Review the session for extractable patterns 2. Identify the most valuable/reusable insight 3. Draft the skill file 4. Ask user to confirm before saving 5. Save to `~/.claude/skills/learned/` ## Notes - Don't extract trivial fixes (typos, simple syntax errors) - Don't extract one-time issues (specific API outages, etc.) - Focus on patterns that will save time in future sessions - Keep skills focused - one pattern per skill
© Affaan Mustafa · MIT · WorldFlowAI/everything-claude-code
Similar slash commands
All slash commands for Agent setup: memory, context, orchestration →learn by other authors comes first.