session-learning
БесплатноБез исполняемых скриптовНе проверенCross-session learning system that extracts insights from session transcripts and injects relevant past learnings at session start. Uses simple keyword…
от rysweet★ 77 звёзд на GitHubОб этом скилле
Session Learning Skill
Purpose
This skill provides cross-session learning by:
- Extracting learnings from session transcripts at Stop hook
- Storing learnings in structured YAML format (
~/.amplihack/.claude/data/learnings/) - Injecting relevant past learnings at SessionStart based on task similarity
- Managing learnings via
/amplihack:learningscapability
Design Philosophy
Ruthlessly Simple Approach:
- One YAML file per learning category (not per session)
- Simple keyword matching for relevance (no complex ML)
- Complements existing DISCOVERIES.md/PATTERNS.md - doesn't replace them
- Fail-safe: Never blocks session start or stop
Learning Categories
Learnings are stored in five categories:
| Category | File | Purpose |
|---|---|---|
| errors | errors.yaml |
Error patterns and their solutions |
| workflows | workflows.yaml |
Workflow insights and shortcuts |
| tools | tools.yaml |
Tool usage patterns and gotchas |
| architecture | architecture.yaml |
Design decisions and trade-offs |
| debugging | debugging.yaml |
Debugging strategies and root causes |
YAML Schema
Each learning file follows this structure:
# .claude/data/learnings/errors.yaml
category: errors
last_updated: "2025-11-25T12:00:00Z"
learnings:
- id: "err-001"
created: "2025-11-25T12:00:00Z"
keywords:
- "import"
- "module not found"
- "circular dependency"
summary: "Circular imports cause 'module not found' errors"
insight: |
When module A imports from module B and module B imports from module A,
Python raises ImportError. Solution: Move shared code to a third module
or use lazy imports.
example: |
# Bad: circular import
# utils.py imports from models.py
# models.py imports from utils.py
# Good: extract shared code
# shared.py has common functions
# both utils.py and models.py import from shared.py
confidence: 0.9
times_used: 3
When to Use This Skill
Automatic Usage (via hooks):
- At session stop: Extracts learnings from transcript
- At session start: Injects relevant learnings based on prompt keywords
Manual Usage:
- When you want to view/manage learnings
- When debugging and want to recall past solutions
- When onboarding to understand project-specific patterns
Learning Extraction Process
Step 1: Analyze Session Transcript
At session stop, scan for:
- Error patterns: Errors encountered and how they were solved
- Workflow insights: Steps that worked well or poorly
- Tool discoveries: New ways of using tools effectively
- Architecture decisions: Design choices and their rationale
- Debugging strategies: Root cause analysis patterns
Step 2: Extract Structured Learning
For each significant insight:
- Generate unique ID based on category and timestamp
- Extract keywords from context (3-5 relevant terms)
- Create one-sentence summary
- Write detailed insight with explanation
- Include code example if applicable
- Assign confidence score (0.5-1.0)
Step 3: Merge with Existing Learnings
- Check for duplicate learnings using keyword overlap
- If similar learning exists (>60% keyword match), update confidence
- Otherwise, append new learning to category file
Learning Injection Process
Step 1: Extract Task Keywords
From session start prompt, extract:
- Technical terms (languages, frameworks, tools)
- Problem indicators (error, fix, debug, implement)
- Domain keywords (api, database, auth, etc.)
Step 2: Find Relevant Learnings
For each learning category:
- Load learnings from YAML
- Calculate keyword overlap with task
- Rank by
overlap_score * confidence * recency_weight - Select top 3 most relevant learnings
Step 3: Inject Context
Format relevant learnings as context:
## Past Learnings Relevant to This Task
### [Category]: [Summary]
## [Insight with example if helpful]
Usage Examples
Example 1: Automatic Extraction
Session: Debugging circular import issue in Neo4j module
Duration: 45 minutes
Resolution: Moved shared types to separate file
Extracted Learning:
- Category: errors
- Keywords: [import, circular, neo4j, type]
- Summary: Circular imports in Neo4j types cause ImportError
- Insight: When Neo4jNode imports from connection.py which imports
Node types, move types to separate types.py module
- Example: types.py with dataclasses, connection.py imports from types.py
Example 2: Automatic Injection
Session Start Prompt: "Fix the import error in the memory module"
Matched Learnings:
1. errors/err-001: "Circular imports cause 'module not found' errors" (85% match)
2. debugging/dbg-003: "Use `python -c` to isolate import issues" (60% match)
Установить session-learning в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл session-learning?
Cross-session learning system that extracts insights from session transcripts and injects relevant past learnings at session start. Uses simple keyword matching for relevance. Complements DISCOVERIES.md/PATTERNS.md with structured YAML storage.
Как установить скилл session-learning?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл session-learning запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic