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.
Analyzes coding sessions to identify patterns and improve future Claude Code performance through memory and skill updates.
npx claudepluginhub harmaalbers/claude-requirements-frameworkThis skill inherits all available tools. When active, it can use any tool Claude has access to.
The session learning system helps Claude Code improve over time by analyzing your sessions and suggesting updates to memories, skills, and commands.
Add to your .claude/requirements.yaml or .claude/requirements.local.yaml:
hooks:
session_learning:
enabled: true
prompt_on_stop: true # Prompts for review when ending session
/session-reflect # Full analysis with recommendations
/session-reflect quick # Quick summary statistics
/session-reflect analyze-only # Analysis without applying changes
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
During your session, the framework collects metrics:
Metrics are stored in .git/requirements/sessions/<session_id>.json.
When you run /session-reflect, the session-analyzer agent looks for:
Based on analysis, the system suggests:
Each recommendation has a confidence score (0-1).
You review and select which recommendations to apply. All changes are:
.git/requirements/learning_history.jsonreq learning rollback.serena/memories/)hooks:
session_learning:
enabled: true # Enable the learning system
prompt_on_stop: true # Show review prompt when session ends
min_tool_uses: 5 # Minimum activity before prompting
max_recommendations: 5 # Max recommendations per session
confidence_threshold: 0.7 # Only show high-confidence items
update_targets:
- memories # .serena/memories/ files
- skills # Plugin skill files
- commands # Plugin command files
1. You work normally through a session...
2. When ending the session, Stop hook prompts:
"Session had 47 tool uses. Review for learning?
Run /session-reflect to analyze and improve future sessions."
3. You run /session-reflect
4. Analyzer detects patterns:
- TDD Workflow (HIGH confidence)
- Repeated ADR lookup (MEDIUM confidence)
- Useful command pattern (MEDIUM confidence)
5. You select which to apply
6. Updates are written with version tracking:
- .serena/memories/workflow-patterns.md (appended)
- .serena/memories/frequently-referenced.md (created)
7. Next session benefits from these learnings
analyze-only first - Preview before committingreq learning rollback reverses mistakes# Check if metrics directory exists
ls -la .git/requirements/sessions/
# Sessions are collected automatically when framework is enabled
# Run some commands first, then try again
Check configuration:
hooks:
session_learning:
enabled: true # Must be true
prompt_on_stop: true # Must be true
min_tool_uses: 5 # Session must have at least this many tool uses
Some updates (like creates) don't have previous content to restore. Use git to restore:
git checkout -- .serena/memories/filename.md
The session analyzer may recommend process skills based on session patterns:
| Session Pattern | Recommended Skill |
|---|---|
| High test failures | systematic-debugging |
| Code before tests | test-driven-development |
| Multiple plan revisions | brainstorming |
| Incomplete verification | verification-before-completion |
| Sequential independent tasks | dispatching-parallel-agents |
| Command | Description |
|---|---|
/session-reflect | Analyze session and apply learning |
req learning stats | Show learning statistics |
req learning list | List recent updates |
req learning rollback <id> | Undo a specific update |
req learning disable | Disable learning for project |
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
Search, retrieve, and install Agent Skills from the prompts.chat registry using MCP tools. Use when the user asks to find skills, browse skill catalogs, install a skill for Claude, or extend Claude's capabilities with reusable AI agent components.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.