AgentSkillsCN

continuous-learning

从 Claude Code 会话中提取可复用的模式,并将其保存为已学技能。

SKILL.md
--- frontmatter
name: continuous-learning
description: Extract reusable patterns from Claude Code sessions and save them as learned skills.

Continuous Learning Skill

Extract reusable patterns from sessions and save them as learned skills for future use.

How It Works

This skill analyzes the session transcript to identify extractable patterns:

  1. Session Evaluation: Checks if session has enough messages (default: 10+)
  2. Pattern Detection: Identifies error resolutions, workarounds, debugging techniques
  3. Skill Extraction: Saves useful patterns to ~/.claude/skills/learned/

When to Use

  • At end of long sessions with multiple problem-solving cycles
  • After resolving complex errors that might recur
  • When you develop project-specific conventions

Invocation

Use /learn command or invoke directly:

code
/continuous-learning

Configuration

Edit config.json to customize:

json
{
  “min_session_length”: 10,
  “extraction_threshold”: “medium”,
  “auto_approve”: false,
  “learned_skills_path”: “~/.claude/skills/learned/”,
  “patterns_to_detect”: [
    “error_resolution”,
    “user_corrections”,
    “workarounds”,
    “debugging_techniques”,
    “project_specific”
  ]
}

Pattern Types

PatternDescription
error_resolutionHow specific errors were resolved
user_correctionsPatterns from user corrections
workaroundsSolutions to framework/library quirks
debugging_techniquesEffective debugging approaches
project_specificProject-specific conventions

Learned Skills Format

Extracted skills are saved as markdown files:

code
~/.claude/skills/learned/
├── fix-marimo-import-error.md
├── debug-pixi-environment.md
└── wrds-connection-pattern.md

Each learned skill follows standard SKILL.md format with:

  • Name and description
  • Problem context
  • Solution pattern
  • Example usage

Integration

The skill reads from CLAUDE_TRANSCRIPT_PATH (JSON conversation transcript) which is automatically set by Claude Code during sessions.

Related

  • /learn command - Manual pattern extraction mid-session
  • /checkpoint command - Save session state
  • Session-end hook - Auto-evaluates sessions for patterns