learnings

A background learning log that records corrections, errors, suggestions, and knowledge gaps in a .learnings folder. It is designed to capture lessons during a coding session.

In plain words
What is it for?
Use it to record session discoveries automatically, including mistakes, user corrections, and advice that may later be reviewed or added to project instructions.
Why use it?
It prevents useful lessons from being forgotten between sessions while keeping capture separate from later review and promotion.

Skill for Claude CodeCodex

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 skills/trtmn/agent-plugins/learnings
Any agent
npx skills add trtmn/agent-plugins --skill learnings
Clone the repo
git clone --depth 1 https://github.com/trtmn/agent-plugins

Made for: Claude Code, Codex.

Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,841 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.00082 $0.01841
Opus 5 $0.00041 $0.00920
Sonnet 5 $0.00016 $0.00368
Haiku 4.5 $0.00008 $0.00184

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

Security

Grade A, and why

learnings 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/self-improvement/skills/learnings/SKILL.md · 139 lines

How it starts

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

Learnings

Autonomous, in-session capture of everything worth remembering across sessions. This skill documents the contract; the actual work is done by the learnings subagent, invoked in the background by main Claude whenever a trigger fires.

This skill is the capture half of the learning loop. The review + auto-promote half lives in the self-improvement skill (same plugin). Capture is autonomous and continuous; review is autonomous on session-end (and runnable on demand).

Relationship to self-improvement

These are two skills, one plugin, one invocation model each — a clean seam:

learnings self-improvement
Who invokes Main Claude, autonomously, on every trigger The SessionEnd hook (headless) — or you, via /self-improvement
When Continuously, as things happen After a session ends (if enough piled up), or on demand
Does Appends pending entries to ~/.learnings/ Sweeps, investigates "needed-ness", auto-promotes qualifiers to CLAUDE.md, logs to CHANGELOG
Behavior Pure capture, never promotes Non-interactive auto-promote, with a conservative bar + revertible audit trail

Capture is cheap; promotion is gated. The two never share behavior, so neither gets invoked in the other's mode.

The Trigger Contract

Main Claude (not this skill directly) watches for these signals and delegates to the learnings subagent via the Agent tool, in the background (run_in_background: true):

  • User corrections: "Actually, it should be...", "No, don't...", "That's wrong because..." → LEARNINGS.md
  • Knowledge gaps: outdated info given, project convention missed, rule had to be taught → LEARNINGS.md
  • Suggestions: user proposed a better approach, tool, or pattern → LEARNINGS.md
  • Command/tool failures: shell command failed, API errored, file op behaved unexpectedly → ERRORS.md
  • Feature requests: user asked for something Claude couldn't do → FEATURE_REQUESTS.md
  • Repeated mistakes: same slip twice in one session → LEARNINGS.md, priority high

Read the full file on GitHub · 139 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 · 139 lines · 82 tokens per session scan A 37f9e14ac7d2

Subscribe to this mod's changes

learnings is a skill published in the GitHub repository trtmn/agent-plugins (2 stars, last pushed 5d ago), licensed Unlicense. It adds 82 tokens to every session and 1,841 once invoked, about $0.0004 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-31.

Related

Other skills, from other repositories

skill-template

Template for creating new Agent Skills for context engineering. Use this template when adding new skills to the collection.

muratcankoylan/Agent-Skills-for-Context-Engineering · 24 tokens

create-skill

Guides users through creating effective Agent Skills for Cursor. Use when the user wants to create, write, or author a new skill, or asks about skill structure, best practices, or SKILL.md format.

xstongxue/best-skills · 46 tokens

creating-skills

Guide for creating Claude Code skills following Anthropic's official best practices. Use when user wants to create a new skill, build a skill, write SKILL.md, update an existing skill, or needs skill creation guidelines. Provides structure, frontmatter fields, naming conventions, and new features like dynamic context…

redai-infra/Relax · 70 tokens

aish-add-skills

Create new skills from documents, tutorials, or examples. Use when user wants to create a skill from learning materials or existing content.

AI-Shell-Team/aish · 32 tokens

master-debate

Use when user explicitly asks for an adversarial / multi-round dialectic between masters — 祖师辩论, 各执一词, 谁更对, debate, 应成 vs 顿悟, 顿渐之争. Differs from /compare-masters (parallel single-round) by being adversarial multi-round via fresh-subagent orchestration. Topics 空有 / 禅净 / 性相 / 戒律 vs 内观 — trigger is adversarial framing…

xr843/Master-skill · 127 tokens

skill-master

Guides skill creation and updates with specialized knowledge and workflows. Use when: "создай скилл", "измени скилл", "гайд по скиллам", "обнови скилл", "улучши скилл", "create skill", "update skill", "skill guide", "new skill", "how to write a skill".

pavel-molyanov/molyanov-ai-dev · 79 tokens