Skip to main content
command

session-learning-capture — Claude Code command: save session learnings

A slash command that pulls lessons out of the current Claude session and writes them into the project's memory files, so the next run starts informed.

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --command team/session-learning-capture
Open on GitHub

What session-learning-capture does

The command scans a session for things worth keeping: new project facts, fixes to the implementation, observations about structure, and workflow improvements. It sorts each find by type, picks the memory file it belongs in, and updates CLAUDE.md. You steer it with an argument — --project-learnings, --implementation-corrections, --structure-insights or --workflow-improvements.

It runs on four tools: Read, Write, Edit and Glob. The last one locates CLAUDE*.md files in the project, which is how the command decides where knowledge goes. No such files means nowhere obvious to write, so create at least one first.

Before saving, it checks that what it captured is accurate and that existing notes survive the edit. Handy on long projects where conventions pile up faster than anyone documents them.

What it helps with

  • keep session takeaways in project memory files
  • separate implementation fixes from general notes
  • locate every CLAUDE*.md file and pick which to update
  • record workflow improvements without writing them by hand
  • append structural observations to the docs

Example prompts for the agent

  • /session-learning-capture --implementation-corrections
  • /session-learning-capture --project-learnings
  • /session-learning-capture --workflow-improvements

How to install session-learning-capture

1claude-code-templates

npx claude-code-templates@latest --command team/session-learning-capture

2Manually: put the files in place

.claude/commands/session-learning-capture.md

Call it with /session-learning-capture. For all projects use ~/.claude/commands/

Questions about session-learning-capture

How do I install session-learning-capture in Claude?

Use the templates CLI: npx claude-code-templates@latest --command team/session-learning-capture. The command file then sits at .claude/commands/session-learning-capture.md.

What does session-learning-capture do?

It captures knowledge from the current session and integrates it into the project's memory files, updating CLAUDE.md and related docs.

What arguments does the command take?

--project-learnings, --implementation-corrections, --structure-insights and --workflow-improvements — each narrows the capture to one kind of knowledge.

Source text

session-learning-capture.md · MIT
---
allowed-tools: Read, Write, Edit, Glob
argument-hint: "[capture-type] | --project-learnings | --implementation-corrections | --structure-insights | --workflow-improvements"
description: Capture and document session learnings with automatic knowledge integration and memory updates
---

# Session Learning Capture

Capture and integrate session learnings into project memory and knowledge base: **$ARGUMENTS**

## Current Learning Context

- Session duration: Current Claude Code session learning opportunities
- Memory files: !`find . -name "CLAUDE*.md" | wc -l` available memory files for knowledge integration
- Project complexity: Assessment of project structure and documentation completeness
- Learning patterns: Identification of knowledge gaps and correction opportunities

## Task

Execute comprehensive learning capture with automatic knowledge integration:

**Capture Type**: Use $ARGUMENTS to focus on project learnings, implementation corrections, structure insights, or workflow improvements

**Learning Capture Framework**:
1. **Learning Identification** - Detect new project knowledge, identify implementation corrections, recognize structural insights, note workflow discoveries
2. **Knowledge Classification** - Categorize learning type, assess importance level, determine integration location, evaluate reusability potential
3. **Context Analysis** - Analyze session context, identify triggering conditions, assess knowledge applicability, determine documentation needs
4. **Integration Planning** - Select appropriate memory files, determine update strategy, maintain consistency, preserve existing knowledge
5. **Memory Updates** - Update CLAUDE.md files, enhance documentation, improve workflows, strengthen knowledge base
6. **Validation Process** - Verify accuracy of captured knowledge, ensure integration quality, validate accessibility, confirm usefulness

**Advanced Features**: Automated learning detection, intelligent categorization, context-aware integration, knowledge graph enhancement, version control integration.

**Quality Assurance**: Learning accuracy validation, integration consistency, accessibility optimization, knowledge retrieval efficiency.

**Output**: Comprehensive learning integration with updated memory files, enhanced documentation, improved workflows, and validated knowledge base.

© davila7 · MIT · davila7/claude-code-templates

Similar slash commands

All slash commands for Agent setup: memory, context, orchestration →

From the same set205

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor