learn

learn is a skill for Claude Code, Codex from capitalone/context-specs. It costs 120 tokens per session (3,869 once invoked), scanned B, original, Apache-2.0.

A post-merge workflow that updates a project's long-term memory after code is merged into the main branch. It also maps project instructions and suggests rules that could become automated checks.

In plain words
What is it for?
Use it after a merge to reconcile reference files, update AGENTS.md guidance, identify project invariants, and prepare a reviewable pull request with proposed improvements.
Why use it?
It keeps future coding agents aligned with the code's latest structure and decisions instead of relying on outdated instructions or memory.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; mentions subagents; mentions AGENTS.md.

Good fit Use it after a merge to reconcile reference files, update AGENTS.md guidance, identify project invariants, and prepare a reviewable pull request with proposed improvements.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/capitalone/context-specs/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.

Any agent
npx skills add capitalone/context-specs --skill learn
Clone the repo
git clone --depth 1 https://github.com/capitalone/context-specs

Made for: Claude Code, Codex.

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/skills/capitalone/context-specs/learn/github.svg)](https://agentmods.dev/skills/capitalone/context-specs/learn)
Your own site
<a href="https://agentmods.dev/skills/capitalone/context-specs/learn"><img src="https://agentmods.dev/badge/skills/capitalone/context-specs/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/skills/capitalone/context-specs/learn"><img src="https://agentmods.dev/badge/skills/capitalone/context-specs/learn.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 120 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,869 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00120 $0.03869
Opus 5.5 $0.00048 $0.01548
Sonnet 5.5 $0.00024 $0.00774
Haiku 4.5 $0.00012 $0.00387

Measured 1mo ago against content hash dc4ea57135c1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

learn scanned grade B with 1 finding 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 1mo ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/check-agents-md.sh, scripts/check-expert-links.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Enumerates other installed skillsmediumAgent snooping

Other skills' SKILL.md files reveal prompts, capabilities and secrets that should be invisible to peers.

files (`ls .claude/skills/expert/references/*.md` plus their contents); the
skills/harness/learn/SKILL.md · 251 lines

How it starts

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

learn

This is how the project gets better on every merge. When code lands on main, /learn reconciles the project's long-term memory with what just landed: it updates the Expert (procedural + semantic memory, pulled on demand) and the AGENTS.md map (eager memory, loaded as agents traverse the repo), discovers project invariants, and drafts candidate lints (the highest-value memory, because a lint is a rule the agent cannot ship past).

You run headless, invoked by the memory loop (scripts/learn-dispatch.sh in the harness repo, driven by the context-specs supervisor on its own interval) as the post-merge step — in a dedicated ../<repo>-harness-learn worktree on a learn/<sha> branch off origin/main, never in the developer's clone. The memory loop runs independently of the feature/build loop, so a from-scratch Expert bootstrap blocks neither. Your output is a single reviewable PR — never an auto-merge. Humans steer at merge.

What memory is (read this first)

The memory is the developer's. It holds facts about the code as it is and decisions, direction, and aspirations the developer has written that the code hasn't caught up to. Your input is the merged diff — that's why you run post-merge — and your job is to reconcile memory with it: add what the merge taught, update what it invalidated, and advance any direction it touches (fulfilled → rewrite as cited fact; contradicted → edit and note it). Direction is never stale merely because it isn't observable in code yet.

You are the automated writer; the developer writes memory directly, any time, and their edits are authoritative (P7). STUCK features are handled by the human directly (their first job there is to identify the context defect that misled the agent, correct it on the feature branch, then fix the code); their corrections ride into main with the feature merge, and you observe them in the diff you read.

The philosophy

  • P1 — Write from the merged diff. Your own additions are evidence-based: cite the diff. But memory as a whole is not diff-shaped — developer-written direction lives beside your facts, and you maintain it (advance or close it when a merge fulfills or contradicts it), never delete it for lacking a code anchor.
  • P2 — Two memory shapes, opposite costs. The Expert is pulled on demand (cheap until consulted). AGENTS.md is eager — loaded automatically every session that touches a folder, paid in tokens whether or not it's relevant. So the bar for putting something in AGENTS.md is far higher than for the Expert.
  • P3 — The four destinations. Every fact worth remembering routes to exactly one place: a lint (if mechanically checkable), eager prose (AGENTS.md, if it clears the high bar), lazy prose (an Expert reference file — one of how-to-* / concept-* / pattern-* / invariant-* / example-* / decision-*), or nowhere. Most things go nowhere or to the Expert. The decision-* prefix is forward-looking direction — human-authored, never one you seed; you only retire it when a merge fulfills or reverses it (P9). See references/routing-rules.md and references/expert-structure.md.
  • P4 — Map, not encyclopedia. AGENTS.md is the table of contents that points into the Expert; it never duplicates it. A monolithic AGENTS.md rots, crowds out the task, and turns "everything important" into "nothing important." Keep it a map. See references/agents-md-guidance.md.
  • P5 — Progressive disclosure inside the Expert. Reference files are small and topic-focused, cross-linked via Obsidian [[wikilinks]]. SKILL.md is an index — one line per file. An agent reads the index, opens only what's relevant, then follows wikilinks to discover related context. See references/expert-structure.md and references/wikilink-convention.md.
  • P6 — Invariants are discovered, then promoted. You may notice architectural rules the codebase upholds. Record each as its own invariant-<rule>.md file (one rule per file); flag the mechanically checkable ones as candidate lints (the highest-value memory, because a lint is a rule the agent cannot ship past). See references/invariant-discovery.md.
  • P7 — Human-authored memory edits are authoritative. When the merged diff already touches AGENTS.md, an Expert reference file, or a spec, treat those changes as authoritative — extend them, never second-guess them. They came from a human resolving a STUCK or making a deliberate correction. Your job there is to extend (what else, given this correction, now needs to change?) — not to vote on whether to apply it.
  • P8 — Reviewable, revertible, human-merged. Everything lands on a learn/<sha> PR. Never auto-merge.
  • P9 — Reconcile, don't accumulate. Memory is a current model of the project — its code and its intent — not an append-only log. Every run must look for deleted concepts (the code is gone → the reference file goes), inter-file contradictions (two files disagree → merge or scope-qualify), and claims invalidated by the merged diff. Adds, edits, and deletes all ride on the same PR. See references/reconcile.md.
  • P10 — Nothing to learn is a valid outcome. Most merges produce nothing for memory. When reconcile finds zero adds, edits, deletes, AGENTS.md pointer changes, or candidate lints, print learn: nothing to learn from <sha>, skipping PR to stdout, exit 0, and do not push a branch or open a PR. The outer loop advances refs/harness/last-learned regardless.

Read the full file on GitHub · 251 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 251 lines · 120 tokens per session scan B dc4ea57135c1

Subscribe to this mod's changes

learn is a skill published in the GitHub repository capitalone/context-specs (44 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 120 tokens to every session and 3,869 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it B with 1 finding (enumerates other installed skills). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

mem0-oss-to-platform

Plan, then execute, a migration of a project from the mem0 open-source / self-hosted SDK (local Memory class) to the mem0 Platform / hosted SDK (MemoryClient). TRIGGER when: the developer wants to move, switch, or migrate mem0 off OSS/self-hosted to the hosted API, e.g. "migrate my mem0 setup to the platform", "switch…

mem0ai/mem0 · 217 tokens

forget

Remove a personal fact, preference, relationship detail, topic, or prior event from Muse's active memory and stop existing copies or automations from bringing it back. Use for explicit requests such as 'forget that', 'don't remember this about me', or 'remove that from your memory'. Do not use when 'forget it' merely…

asgeirtj/system_prompts_leaks · 74 tokens

Cortex

Operate Cortex, the LifeOS memory system — the typed Knowledge Archive (People, Companies, Ideas, Research with typed related: links) plus recall of prior work sessions, ISAs, and conversations. Search, add, harvest, develop, ingest, distill, graph-navigate, recall. USE WHEN cortex, knowledge, knowledge base, search…

danielmiessler/LifeOS · 196 tokens

memory

Use when the user asks to remember, recall, forget, update, search, or inspect durable OpenSquilla memory, including profile facts in USER.md and long-term notes in MEMORY.md or memory//.md.

opensquilla/opensquilla · 44 tokens

ha-data-stores

Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…

shiwenwen/hope-agent · 115 tokens

establishing-project-context

Use when the user asks to establish shared project language, or project work exposes a conflicting, renamed, or deprecated domain term that needs active semantic modeling. Routine small tasks stay on the fast path.

GanyuanRan/Aegis · 45 tokens