Skills

Learn

Extract reusable knowledge from the current session into a persistent skill.

Install

npx skills add pedrohcgs/claude-code-my-workflow --skill learn -g -a claude-code -y
Category
Engineering
Updated
1mo ago
License
MIT
Context cost
Lightabout 1,068 tokens
Runs scripts
No, instructions only

What it does

Extract reusable knowledge from the current session into a persistent skill. Use when you discover something non-obvious, create a workaround, or develop a multi-step workflow that future sessions would benefit from.

/learn, Skill Extraction Workflow

Extract non-obvious discoveries into reusable skills that persist across sessions.

When to Use This Skill

Invoke /learn when you encounter:

  • Non-obvious debugging, Investigation that took significant effort, not in docs
  • Misleading errors, Error message was wrong, found the real cause
  • Workarounds, Found a limitation with a creative solution
  • Tool integration, Undocumented API usage or configuration
  • Trial-and-error, Multiple attempts before success
  • Repeatable workflows, Multi-step task you'd do again
  • User-facing automation, Reports, checks, or processes users will request

Workflow Phases

PHASE 1: Evaluate (Self-Assessment)

Before creating a skill, answer these questions:

  1. "What did I just learn that wasn't obvious before starting?"
  2. "Would future-me benefit from this being documented?"
  3. "Was the solution non-obvious from documentation alone?"
  4. "Is this a multi-step workflow I'd repeat?"

Continue only if YES to at least one question.

PHASE 2: Check Existing Skills

Search for related skills to avoid duplication:

# Check project skills
ls .claude/skills/ 2>/dev/null

# Search for keywords
grep -r -i "KEYWORD" .claude/skills/ 2>/dev/null

Outcomes:

  • Nothing related → Create new skill (continue to Phase 3)
  • Same trigger & fix → Update existing skill (bump version)
  • Partial overlap → Update with new variant

PHASE 3: Create Skill

Create the skill file at .claude/skills/[skill-name]/SKILL.md:

Read the whole SKILL.md on GitHub

More in Engineering