learning

A session-learning tool that reviews the current conversation, finds recurring patterns, and stores preferences you teach it.

In plain words
What is it for?
Use it to evaluate a session, view learned patterns, or manually teach a preference or working pattern.
Why use it?
It helps keep useful lessons from earlier work available instead of relying on you to repeat preferences or corrections.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/smart-ai-memory/empathy-framework/learning
Clone the repo
git clone --depth 1 https://github.com/Smart-AI-Memory/empathy-framework

Made for: Claude Code.

Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 963 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00013 $0.00963
Opus 5 $0.00006 $0.00481
Sonnet 5 $0.00003 $0.00193
Haiku 4.5 $0.00001 $0.00096

Measured yesterday against content hash 12b9bbe8a38f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

learning scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/learning.md · 156 lines

How it starts

The opening of the file, as written. The whole thing — 156 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Learning Management

Aliases: /learn-hub

IMPORTANT: This command operates on the CURRENT conversation. Do NOT start a new conversation or clear context. You have full access to the conversation history above this point.

Manage continuous learning, pattern extraction, and preferences.

Quick Examples

/learning                      # Interactive menu
/learning "evaluate session"   # Analyze for patterns
/learning "show patterns"      # View learned patterns

Discovery

Question:
  header: "Action"
  question: "What would you like to do with learning?"
  options:
    - label: "Evaluate session"
      description: "Analyze current session for learning opportunities"
    - label: "View patterns"
      description: "See patterns learned from previous sessions"
    - label: "Teach something"
      description: "Manually teach a preference or pattern"

Evaluate Session

Analyze the CURRENT session for learning opportunities.

Context: You have access to ALL messages in this conversation above this command. Use that history to identify patterns.

I will:

  1. Review the conversation history IN THIS SESSION (all messages above)
  2. Identify:
    • Corrections you made to my responses
    • Preferences you expressed (coding style, verbosity, etc.)
    • Effective approaches that worked well
    • Workarounds we discovered together
  3. Extract patterns with confidence scores
  4. Store valuable patterns to patterns/ or .claude/rules/
  5. Report what was learned

Best after:

  • Productive debugging sessions
  • When you corrected my approach
  • Discovering project conventions
  • Finding effective solutions

Note: If invoked at the start of a session with no history, will report "no patterns to evaluate".


View Patterns

See patterns learned from previous sessions.

I will:

  1. Load pattern storage
  2. Display patterns by category:
    • Preferences
    • Corrections
    • Workarounds
    • Project conventions
    • Error solutions
  3. Show confidence and usage stats
  4. Allow filtering and search

Read the full file on GitHub · 156 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 156 lines · 13 tokens per session scan A 12b9bbe8a38f

Subscribe to this mod's changes

learning is a command published in the GitHub repository Smart-AI-Memory/empathy-framework (13 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 13 tokens to every session and 963 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.