Skip to content
Skills Library
AI & agents · Building & coding

learn

/learn

/learn - Extract Reusable Patterns. After completing a complex task (5+ tool calls with cross-scenario reuse potential), suggest "/learn" to the user. When invoked, analyze the current task's approach and distill it into a reusable skill or improve an existing one. Also use when user says "save this as a skill", "remember this approach", or "this is reusable".

Author
yrzhe ↗
Licence
MIT
Last repository change
27.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

/learn - Extract Reusable Patterns. After completing a complex task (5+ tool calls with cross-scenario reuse potential), suggest "/learn" to the user. When invoked, analyze the current task's approach and distill it into a reusable skill or improve an existing one. Also use when user says "save this as a skill", "remember this approach", or "this is reusable".

Triggers from the description

save this as a skillremember this approachthis is reusable
Original author description

/learn - Extract Reusable Patterns. After completing a complex task (5+ tool calls with cross-scenario reuse potential), suggest "/learn" to the user. When invoked, analyze the current task's approach and distill it into a reusable skill or improve an existing one. Also use when user says "save this as a skill", "remember this approach", or "this is reusable".

How it works

  1. When to Suggest
  2. Extraction Flow
Original SKILL.md headings · 110 lines, 445 words
SKILL.md preview
---
name: learn
description: /learn - Extract Reusable Patterns. After completing a complex task (5+ tool calls with cross-scenario reuse potential), suggest "/learn" to the user. When invoked, analyze the current task's approach and distill it into a reusable skill or improve an existing one. Also use when user says "save this as a skill", "remember this approach", or "this is reusable".
version: 1.0.0
user-invocable: true
allowed-tools:
  - Bash
  - Read
  - Write
  - Edit
  - Glob
  - Grep
---

# Learn — Skill Auto-Extraction

Distill the current task's approach into a reusable skill, or improve an existing one.

## When to Suggest

After completing a task, evaluate TWO conditions:
1. **Complexity**: 5+ tool calls used
2. **Reuse potential**: The approach applies to other projects/scenarios, not just this one

If both met, suggest: "This approach might be reusable — want to `/learn` it?"
Never auto-execute. Only suggest.

## Extraction Flow

### 1. Recall

Check if this knowledge already exists:
- Search existing skills for similar functionality
- If a memory system (supermemory, MEMORY.md, etc.) is available, search it too

### 2. Review

Scan the current conversation for the most recently completed task. Identify:
- Core workflow steps
- Key decisions and why they were made
- Non-obvious tricks or gotchas discovered
- Tools/libraries used and how

If `/learn "description"` was provided, focus on that specific aspect.

### 3. Dedup

Search ALL existing skills for similar functionality:
```bash
ls ~/.claude/skills/
grep -r "<relevant keywords>" ~/.claude/skills/*/SKILL.md
```

Three outcomes:
- **Similar skill exists**: Suggest `/skill-improve <skill-name>` instead. Do NOT create a duplicate.
- **Similar learned skill exists**: Suggest updating that skill instead of creating new.
- **No match**: Proceed to create new skill.

### 4. Assess Scope

Determine where this knowledge belongs:
- **Cross-project reusable workflow** → Create skill (continue to step 5)
- **Project-specific pattern** → Suggest saving to local project memory instead, stop here
- **Single factual insight** → Suggest saving to memory system instead, stop here

### 5. Generate

Create skill following skill-creator conventions:

**File**: `~/.claude/skills/<skill-name>/SKILL.md`

Naming: use `learned-` prefix for auto-extracted skills (e.g., `learned-pdf-merge`).

Structure:
```markdown
---
name: learned-<name>
description: <what it does and when to trigger — be specific>
---

# <Title>

<Concise steps. Only include what Claude doesn't already know.>
```

Rules:
- Under 200 lines — context window is shared
- Imperative form ("Run X", not "You should run X")
- No README, CHANGELOG, or extra docs
- Only add `scripts/`, `references/`, `assets/` if genuinely needed

### 6. Confirm

Show the generated SKILL.md content to the user. Write to disk only after confirmation.

### 7. Log

Create or update the extraction log:

**File**: `~/.claude/skills/learn/learned/<skill-name>.md`

```markdown
---
skill: learned-<name>
created: <YYYY-MM-DD>
last_updated: <YYYY-MM-DD>
source: conversation
---

## Creation Record
- **Date**: <YYYY-MM-DD>
- **Task**: <what triggered the extraction>
- **Reason**: <why this is reusable>
```

Also update `~/.claude/skills/learn/learned/README.md` index with a one-line entry.

### 8. Memory Sync (Optional)

If a memory system is available (supermemory, MEMORY.md, etc.) and the extraction revealed cross-project universal insights (API quirks, tool gotchas, non-obvious behaviors), save a concise one-line version.

Do NOT duplicate the full skill content into memory. Only save atomic insights that stand alone.
Files in this package (2)
  • SKILL.md 4 KB
  • learned/README.md 1 KB

Versions

RepositoryScoreLicence
This page · yrzhe/claude-skills100MIT
lucamartins/ouroboros100MIT
boykush/scraps100MIT
nicsuzor/academicops100MIT
cookys/autopilot100MIT
joelhooks/PAROL6100MIT
tw93/Waza100MIT
fainir/agent-harness100MIT
amit429/understanding-map100MIT

Database snapshot: 13.11.2026 · package version b746533e3db0 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100pattern-learn
    Use when the user wants to extract a reusable pattern from recent work and store it for future use. "Save this as a pattern", "remember this approach", "learn from this commit".
  • 100self-learn
    Extract reusable patterns from recent sessions, propose framework improvements, and (with approval) update the framework docs. This is the dogfooding meta-loop — the project learns from its own usage. Use when the user says "learn from this", "what did we learn", "extract…
  • 100session-learn
    Use when a completed work session should yield durable concepts, corrections, decisions, reusable patterns, and a traceable next action.
  • 100reflect
    Review recent work, find repeated workflow patterns, and suggest reusable skills, agents, commands, config changes, or playbooks. Use when the user asks to learn from past sessions, improve recurring workflows, or identify what should be turned into reusable agent instructions.
  • 95reflect-and-learn
    After Direct-mode fixes, summarize what changed and record reusable problem→fix patterns into the playbook. Use when CodeCortexLoop Direct mode completes successfully, or when manually invoked via /cortexloop-reflect.
  • 100reflect
    Review current conversation, analyze tasks, errors, and user feedback, extract learning opportunities for skill improvement. Use when user says "reflect", "review session", "what did we learn", "session summary", or after completing a complex task.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.