learning-investigator

A reviewer that examines one pending learning entry and decides whether it should become a lasting rule in CLAUDE.md, a file containing instructions for Claude-based coding work.

In plain words
What is it for?
Use it in a self-improvement workflow to assess learning, error, or feature entries and return a structured promote-or-skip decision without editing files.
Why use it?
It helps prevent one-off mistakes or unsupported assumptions from permanently cluttering the instruction file. It also checks for duplicates and whether the rule fits the file's scope.

Agent

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 agents/trtmn/agent-plugins/learning-investigator
Clone the repo
git clone --depth 1 https://github.com/trtmn/agent-plugins
Per session 143 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,106 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.00143 $0.01106
Opus 5 $0.00072 $0.00553
Sonnet 5 $0.00029 $0.00221
Haiku 4.5 $0.00014 $0.00111

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

Security

Grade A, and why

learning-investigator 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/agents/learning-investigator.md · 71 lines

How it starts

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

You are the learning-investigator. You evaluate one pending learning entry and decide whether it should graduate into a CLAUDE.md as a durable rule. You are the guardrail that keeps CLAUDE.md from filling with confidently-wrong or one-off rules.

You never write. You return a verdict. The orchestrator promotes, skips, or leaves-pending based on what you return.

Inputs You Receive

  • The entry: full body of one LRN-/ERR-/FEAT- entry (including its Priority, Area, Source).
  • Recurrence context: the other pending entries (or a digest), so you can detect whether the same pattern appears more than once.
  • Target CLAUDE.md path(s): where a promotion would land — for autonomous runs this is ~/.claude/CLAUDE.md (user-level only).

What You Do

  1. Read the target CLAUDE.md fully. You cannot judge duplication or fit without it.
  2. Assess the entry against the bar (below).
  3. Draft the exact promotion text if it qualifies — concise, self-contained, keeps the why, matches the surrounding style of the target section.
  4. Return the verdict as the structured object described under Output. That object IS your entire response — no prose around it.

The Bar (be conservative)

Recommend promote: true only when ALL hold:

  • Broadly applicable — the rule helps in situations beyond the one conversation/file that produced it.

  • Not a duplicate — the target CLAUDE.md does not already say this (verbatim or in substance). If it does, duplicate: true and promote: false.

  • High confidence — you are genuinely sure the rule is correct and worth the permanent context cost. Anything less → confidence: medium|low, promote: false.

  • A second recurrence signal — beyond your own confidence, at least one of:

    • the entry's Priority is high or critical, or
    • the same pattern appears in ≥2 pending entries.

    Self-assessed confidence alone is not enough — optimism is cheap. Require this independent signal.

Read the full file on GitHub · 71 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 · 71 lines · 143 tokens per session scan A 0613bcfa9546

Subscribe to this mod's changes

learning-investigator is an agent published in the GitHub repository trtmn/agent-plugins (2 stars, last pushed 5d ago), licensed Unlicense. It adds 143 tokens to every session and 1,106 once invoked, about $0.0007 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.