Back to Skills

session-learning

verified

This skill should be used when the user asks about "session learning", "learn from session", "improve future sessions", "session reflection", "session metrics", "session analysis", "/session-reflect", "req learning", "learning updates", "rollback learning", or wants to understand how Claude Code can get smarter over time by learning from sessions.

View on GitHub

Marketplace

requirements-framework-local

HarmAalbers/claude-requirements-framework

Plugin

requirements-framework

Repository

HarmAalbers/claude-requirements-framework
1stars

plugins/requirements-framework/skills/session-learning/SKILL.md

Last Verified

January 25, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/HarmAalbers/claude-requirements-framework/blob/main/plugins/requirements-framework/skills/session-learning/SKILL.md -a claude-code --skill session-learning

Installation paths:

Claude
.claude/skills/session-learning/
Powered by add-skill CLI

Instructions

# Session Learning Guide

The session learning system helps Claude Code improve over time by analyzing your sessions and suggesting updates to memories, skills, and commands.

## Quick Start

### Enable Session Learning

Add to your `.claude/requirements.yaml` or `.claude/requirements.local.yaml`:

```yaml
hooks:
  session_learning:
    enabled: true
    prompt_on_stop: true  # Prompts for review when ending session
```

### Review a Session

```bash
/session-reflect          # Full analysis with recommendations
/session-reflect quick    # Quick summary statistics
/session-reflect analyze-only  # Analysis without applying changes
```

### Manage Learning

```bash
req learning stats        # Show learning statistics
req learning list         # List recent updates
req learning rollback 3   # Undo update #3
req learning disable      # Disable learning for this project
```

## How It Works

### 1. Data Collection

During your session, the framework collects metrics:
- **Tool usage**: Which tools you use, how often, which files
- **Requirement flow**: What gets blocked, how long to satisfy
- **Errors**: What errors occur and how they're resolved
- **Skills/Agents**: Which skills and agents you run

Metrics are stored in `.git/requirements/sessions/<session_id>.json`.

### 2. Pattern Analysis

When you run `/session-reflect`, the session-analyzer agent looks for:
- **Workflow patterns**: Common sequences, TDD cycles, etc.
- **Friction points**: High time-to-satisfy, repeated blocks
- **Knowledge gaps**: Repeated lookups, error patterns
- **Automation opportunities**: Manual steps that could be automated

### 3. Recommendations

Based on analysis, the system suggests:
- **Memory updates**: Add project conventions to Serena memories
- **Skill updates**: Improve trigger patterns
- **Command updates**: Add frequently used arguments

Each recommendation has a confidence score (0-1).

### 4. User Approval

You review and select which recommendations to apply. All changes are:
-

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
4506 chars