Agent skill
session-learner
Extract and persist learnings from the current session. This skill should be used when the user wants Claude to analyze the conversation and capture insights, patterns, preferences, or knowledge discovered during work. Triggers on requests like "learn from this session", "what did we learn", or "capture insights".
Install this agent skill to your Project
npx add-skill https://github.com/anexpn/claude-plugins/tree/main/skills/session-learner
SKILL.md
Session Learner
Analyze the current session to extract learnings and persist them to appropriate locations.
Workflow
Step 1: Analyze Session
Review the entire conversation to identify learnings in these categories:
- User Preferences - Working style, communication preferences, tool preferences
- Agent Failure Patterns - Mistakes Claude made, misunderstandings, approaches that didn't work
- Project Technical Patterns - Code patterns, architecture decisions, project-specific conventions
- Reusable Workflows - Multi-step procedures that could become skills
- Reference Knowledge - Architectural decisions, domain knowledge, API behaviors
Step 2: Categorize by Destination
Map each learning to its appropriate destination:
| Learning Type | Destination | Rationale |
|---|---|---|
| User preferences | ~/.claude/CLAUDE.md |
Applies across all projects |
| Agent failure patterns | ~/.claude/CLAUDE.md |
Prevents repeating mistakes globally |
| Project technical patterns | Project CLAUDE.md |
Project-specific guidance |
| Reusable workflows | New skill | Procedural knowledge for reuse |
| Reference knowledge | Project docs/ folder |
Documentation for future reference |
Step 3: Check for Conflicts
Before presenting findings, check if any learning contradicts existing content:
- Read the target file (user CLAUDE.md, project CLAUDE.md, or relevant docs)
- Identify any conflicts between new learnings and existing content
- Flag conflicts explicitly for user decision
Step 4: Present Findings
Present findings grouped by destination. For each group:
- State the destination file path
- List each learning with a brief description (1-2 sentences)
- If conflicts exist, show:
- The existing content
- The proposed new content
- Ask user to choose: keep existing, replace with new, or merge
Format:
## Learnings for ~/.claude/CLAUDE.md
1. [Brief description of learning]
2. [Brief description of learning]
⚠️ CONFLICT: [description]
Existing: [current content]
Proposed: [new content]
Keep existing / Replace / Merge?
## Learnings for [project]/CLAUDE.md
1. [Brief description of learning]
## Learnings for [project]/docs/
1. [Brief description] → docs/[filename].md
## Potential New Skill
1. [Workflow name]: [brief description]
Step 5: Apply Approved Learnings
After user approves (or modifies) findings:
- For CLAUDE.md files: Append to appropriate section, or create section if needed
- For docs/: Create or update the markdown file
- For new skills: Offer to create using the skill-creator skill
Guidelines
- Keep learnings concise and actionable
- Prefer specific examples over abstract principles
- Do not duplicate information already in target files
- When uncertain about destination, ask the user to choose
- Learnings should be evergreen - no temporal references like "today we learned"
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
dev-guided
Human-in-the-loop iterative development. Use when requirements will emerge during implementation, decisions need human approval at each step, or work will span multiple sessions with frequent feedback loops. Creates problem statement, decisions log, runbook, and progress tracking.
systematic-debugging
Structured debugging methodology for investigating and resolving technical issues. Use this skill when debugging any technical problem, investigating errors, or troubleshooting unexpected behavior to ensure root cause analysis rather than symptom treatment.
dev-auto
Autonomous development workflow. Generate detailed specs, plans, and tasks for autonomous agent execution with session memory tracking.
nb-notes
Manage persistent notes and todos using the nb note-taking system. This skill should be used when capturing cross-session learnings, technical decisions, deferred tasks, or codebase patterns that should persist beyond the current conversation. Use proactively after solving bugs, making architectural decisions, or discovering important patterns. Triggers on requests like "what did I learn yesterday", "check my notes", "what learnings do I have about X", or "capture insights". Do NOT use for tracking current work-in-progress (use TodoWrite for that).
obsidian-vault
Search, create, and manage notes in the Obsidian vault with wikilinks and index notes. Use when user wants to find, create, or organize notes in Obsidian.
edit-article
Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.
Didn't find tool you were looking for?