learn

learn is a command for Claude Code from terrene-foundation/kailash-coc-claude-py. It costs 15 tokens per session (859 once invoked), scanned A, original, Apache-2.0.

A status view for a project's learning system, which records corrections, recurring rule violations, completed work, and decisions. It also shows which observations have been turned into project guidance.

In plain words
What is it for?
Use it to review learning summaries, inspect observation statistics, and check the history of lessons added to project artifacts.
Why use it?
It helps teams see repeated problems and useful lessons instead of letting them disappear after a session.

Command for Claude Code

Written for Claude Code: UserPromptSubmit hook event.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node scripts/learning/digest-builder.js --stats.

Good fit Use it to review learning summaries, inspect observation statistics, and check the history of lessons added to project artifacts.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/terrene-foundation/kailash-coc-claude-py
agentmods
npx agentmods add commands/terrene-foundation/kailash-coc-claude-py/learn

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for learn

README.md
[![agentmods](https://agentmods.dev/badge/commands/terrene-foundation/kailash-coc-claude-py/learn/github.svg)](https://agentmods.dev/commands/terrene-foundation/kailash-coc-claude-py/learn)
Your own site
<a href="https://agentmods.dev/commands/terrene-foundation/kailash-coc-claude-py/learn"><img src="https://agentmods.dev/badge/commands/terrene-foundation/kailash-coc-claude-py/learn/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for learn

Your own site · 80×15
<a href="https://agentmods.dev/commands/terrene-foundation/kailash-coc-claude-py/learn"><img src="https://agentmods.dev/badge/commands/terrene-foundation/kailash-coc-claude-py/learn.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 859 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00015 $0.00859
Opus 5 $0.00008 $0.00430
Sonnet 5 $0.00003 $0.00172
Haiku 4.5 $0.00002 $0.00086

Measured 9d ago against content hash 6cbf23e5a5af, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

learn 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 9d ago.

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/learn.md · 73 lines

How it starts

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

/learn - Learning System Status

Purpose

View the learning digest and codification history. The learning system captures meaningful signals (user corrections, rule violations, session accomplishments, journal decisions) and feeds them into /codify for integration into real artifacts.

Quick Reference

Command Action
/learn Show learning digest summary
/learn stats Show observation statistics and breakdown

Usage

View Learning Digest

Read .claude/learning/learning-digest.json and present:

  1. Corrections — Times the user pushed back or redirected. These are the most valuable signals — each represents a gap in the current artifacts.
  2. Error patterns — Recurring rule violations (which rules are being violated most?).
  3. Accomplishments — What was completed in recent sessions.
  4. Decisions — Journal entries (DECISION, DISCOVERY, TRADE-OFF) that may need codification.
  5. Active frameworks — Which Kailash frameworks are in use.

View Codification History

Read .claude/learning/learning-codified.json to see what /codify has already processed from the digest.

View Stats

node scripts/learning/digest-builder.js --stats

How It Works

  1. Hooks capture signals — User corrections (UserPromptSubmit), rule violations (PostToolUse), session accomplishments (SessionEnd), journal decisions (SessionEnd). Pure file I/O, no LLM.
  2. Digest builder aggregates — At session end, observations are summarized into learning-digest.json. Pure aggregation, no pattern matching or confidence scores.
  3. /codify does the thinking — When /codify runs, it anchors on learning-codified.json::last_codified and enumerates the COMPLETE delta since it via .claude/bin/codify-backlog.mjs (observations, unaddressed violations, journal entries, artifact-change commits). The digest + journals + session notes are SUPPLEMENTARY semantic context — NOT the work-list (deriving the work-list from the digest/session-notes/memory alone is BLOCKED per codify.md Step 1, because they only reflect the last session). The LLM decides what to codify into real rules, skills, or agents. No intermediate staging — changes go directly into canonical artifact locations.

Read the full file on GitHub · 73 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. 9d ago First seen · 73 lines · 15 tokens per session scan A 6cbf23e5a5af

Subscribe to this mod's changes

learn is a command published in the GitHub repository terrene-foundation/kailash-coc-claude-py (12 stars, last pushed 24d ago), licensed Apache-2.0. It adds 15 tokens to every session and 859 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-09-03.