Skip to main content
command CX Codex

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

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add WorldFlowAI/everything-claude-code
/plugin install everything-claude-code@everything-claude-code
Open on GitHub

What 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 /learn and find reusable solutions in this session.
  • Use /learn to 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-code

2Manually: put the files in place

.claude/commands/learn.md

Call it with /learn. For all projects use ~/.claude/commands/

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.

learn Rohit Ghumare learn is a Claude Code command that shows topic-based guidance and saves confirmed takeaways from a session. CX Codex +1 ★ 2,966repo stars learn LihFolk learn is a Claude Code command that distills evaluation entries from .lihfolk/ledger.jsonl into .lihfolk/recipes.md. It extracts working patterns to raise initial generation scores. CX Codex +1 ★ 98repo stars microsoft-events Microsoft microsoft-events — a GitHub Copilot plugin that finds relevant Microsoft Build and Ignite sessions based on your project dependencies. ★ 295repo stars learn-taste emilkowalski learn-taste — a Claude Code skill turns design feedback into rules and records the reasoning behind them. It reviews session corrections and proposes which ones should carry into later work. CX Codex +1 13,700installs learn-codebase thedotmack learn-codebase — a skill for Claude Code, Codex, Cursor and other AI coding platforms that reads every source file in the project from start to finish. Runs when the user asks to learn, read or prime the codebase. CX Codex +1 5,800installs learn-agent-skills rohitg00 Interactive tutor for the Agent Skills Engineering track. Teaches one lesson per call, guides hands-on labs, and logs evidence to AGENT-SKILLS-LEARNING.md. CX Codex +1 3,700installs Microsoft Learn MCP microsoft Microsoft Learn MCP — an MCP server that brings official Microsoft and Azure documentation directly into your IDE. Your agent can search docs, find code samples, and fetch full pages without leaving the editor. CX Codex +1 1,272installs learn-docker-k8s-game reason-machines learn-docker-k8s-game — a skill for Claude Code, Codex, Cursor and other AI editors that turns the chat into a story-driven Docker and Kubernetes training game, running real terminal commands at each step. CX Codex +1 801installs

From the same set29

The whole set →
coding-style coding-style is a Claude Code rule for code structure and quality checks. It applies while an agent writes or changes code. CX Codex +1 ★ 6,739repo stars hooks The hooks rule defines actions before and after tool calls, plus a final session check. It helps run code checks and review Git-related changes. CX Codex +1 ★ 6,739repo stars agents Defines nine agents in ~/.claude/agents/ for different development tasks: planning, design, testing, code review, and more. Run them in parallel for independent work. CX Codex +1 ★ 6,739repo stars checkpoint Saves named Git checkpoints during a Claude Code workflow and compares changed files, test results, and test coverage against earlier marks. CX Codex +1 ★ 6,739repo stars setup-pm setup-pm — a command to configure which package manager (npm, pnpm, yarn, or bun) Claude Code uses in your project or globally. Use it when you want to enforce a specific manager across your workflow. CX Codex +1 ★ 6,739repo stars code-reviewer The code-reviewer subagent reviews code changes for security vulnerabilities, bugs, performance problems, and style violations. Run it immediately after writing or modifying code to catch issues before they reach production. CX Codex ★ 6,739repo stars planner planner generates structured implementation plans and refactoring roadmaps for Claude Code projects. CX Codex ★ 6,739repo stars orchestrate orchestrate routes a complex task through a sequence of agents and combines their findings into a report. Choose a workflow for a feature, bug fix, refactor, or security review. CX Codex +1 ★ 6,739repo stars

Project sponsors

Companies that keep this analytics open