learn

learn is a command for Claude Code from app-vitals/shipwright. It costs 13 tokens per session (613 once invoked), scanned A, original, MIT.

A command that captures a reusable lesson from a conversation and writes it to the appropriate permanent project guidance file.

In plain words
What is it for?
Use it to add general rules or practices to project instructions, skills, or installed-plugin guidance.
Why use it?
It keeps useful working knowledge from being lost between sessions and avoids recording lessons that are already enforced elsewhere.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md.

Part of the shipwright plugin — 27 skills, 32 commands, 5 agents shipped together

Good fit Use it to add general rules or practices to project instructions, skills, or installed-plugin guidance.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/app-vitals/shipwright/learn
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.

Clone the repo
git clone --depth 1 https://github.com/app-vitals/shipwright

Made for: Claude Code.

Or install shipwright, the plugin that ships this one along with the rest of its 27 skills, 32 commands, 5 agents.

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/app-vitals/shipwright/learn/github.svg)](https://agentmods.dev/commands/app-vitals/shipwright/learn)
Your own site
<a href="https://agentmods.dev/commands/app-vitals/shipwright/learn"><img src="https://agentmods.dev/badge/commands/app-vitals/shipwright/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/app-vitals/shipwright/learn"><img src="https://agentmods.dev/badge/commands/app-vitals/shipwright/learn.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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 613 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.00013 $0.00613
Opus 5.5 $0.00005 $0.00245
Sonnet 5.5 $0.00003 $0.00123
Haiku 4.5 $0.00001 $0.00061

Measured yesterday against content hash 8501cbdf49d7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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.

plugins/shipwright/commands/learn.md · 63 lines

How it starts

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

/learn — Capture a Learning

Capture a learning and put it in its permanent home now — CLAUDE.md, the relevant skill, or (for installed plugins) the right place per the routing rules. No staging file, no separate promote step. Git is the audit trail.

Usage

/learn use uv instead of pip
/learn always run the suite before committing
/learn SSR errors surface in the terminal, not the browser console
/learn

Process

  1. Get the insight.

    • With an argument: that is the insight.
    • Without an argument: look at the recent conversation, propose the one or two strongest candidate learnings, and ask the user which to capture (this is the only question the command asks — picking the insight, not approving the edit).
  2. Run the generalization gate. Apply both tests from skills/learning-capture/references/generalization-gate.md:

    • Does it generalize beyond the change just made?
    • Is it already captured by the code, a test, a type, lint, CI, or existing docs?

    If it fails the gate, say so plainly and stop — do not write a watered-down version:

    Not capturing that — the change you just made already enforces it (the new
    handler is the pattern future handlers will copy). The code is the memory here.
    
  3. Route it using the table in the learning-capture skill. Project CLAUDE.md, package CLAUDE.md, ~/.claude/CLAUDE.md / CLAUDE.local.md for personal, a skill, or — for installed plugins — the plugin source (local marketplace) or a local override plus a PR note (remote marketplace).

  4. Check for duplicates. Grep the target file. If a near-duplicate exists, edit it in place. If the new learning contradicts an old one, replace the old one.

  5. Make the edit and confirm in one line:

    Noted in CLAUDE.md: use `uv`, not `pip`, for Python package management.
    

Notes

  • /learn is an explicit opt-in, so it does not ask permission for the edit — only, when run bare, which candidate insight to capture.
  • The gate still applies to /learn. Running the command does not force a bad learning through; if it fails the gate, the command declines and explains why.
  • For learnings across many past sessions rather than this one, use /learn-dream, which routes them into task-store tasks (and drains the # Harness TODO queue the same way).

Read the full file on GitHub · 63 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 Changed 8501cbdf49d7
  2. 14d ago First seen · 63 lines · 13 tokens per session scan A c232db8fb1f3

Subscribe to this mod's changes

learn is a command published in the GitHub repository app-vitals/shipwright (16 stars, last pushed today), licensed MIT. It adds 13 tokens to every session and 613 once invoked, about $0.0001 per session on Opus 5.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-11-17.

Related

learn compared with commands from other repositories

learn next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
learnapp-vitals/shipwrightCommand16todayMITA13Claude Code
constitutiondmae97/omkCommand155yesterdayMITA0Claude Code
plandmae97/omkCommand155yesterdayMITA0Claude Code
tasksdmae97/omkCommand155yesterdayMITA0Claude Code
review-codechohra-med/expo_boilerplateCommand362mo agoMITA50Claude Code
tree-ring-recallTerminallyLazy/Tree-Ring-MemoryCommand242mo agoMITA12Claude Code
tree-ring-statusTerminallyLazy/Tree-Ring-MemoryCommand242mo agoMITA12Claude Code