learning-capture

learning-capture is an agent for Claude Code from closedloop-ai/claude-plugins. It costs 28 tokens per session (806 once invoked), scanned A, original, Apache-2.0.

An agent that processes pending learning records from ClosedLoop runs and classifies them for storage.

In plain words
What is it for?
Use it to classify mistakes, patterns, conventions, and insights, clean their file paths, save them in run records, and forward ClosedLoop-related lessons.
Why use it?
It organizes lessons from previous work so project patterns and improvements to the workflow can be retained.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; reads .claude/ paths; mentions subagents.

Part of the code plugin — 13 skills, 6 commands, 23 agents, 7 hooks shipped together

Good fit Use it to classify mistakes, patterns, conventions, and insights, clean their file paths, save them in run records, and forward ClosedLoop-related lessons.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/closedloop-ai/claude-plugins/learning-capture
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/closedloop-ai/claude-plugins

Made for: Claude Code.

Or install code, the plugin that ships this one along with the rest of its 13 skills, 6 commands, 23 agents, 7 hooks.

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 learning-capture

README.md
[![agentmods](https://agentmods.dev/badge/agents/closedloop-ai/claude-plugins/learning-capture/github.svg)](https://agentmods.dev/agents/closedloop-ai/claude-plugins/learning-capture)
Your own site
<a href="https://agentmods.dev/agents/closedloop-ai/claude-plugins/learning-capture"><img src="https://agentmods.dev/badge/agents/closedloop-ai/claude-plugins/learning-capture/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 learning-capture

Your own site · 80×15
<a href="https://agentmods.dev/agents/closedloop-ai/claude-plugins/learning-capture"><img src="https://agentmods.dev/badge/agents/closedloop-ai/claude-plugins/learning-capture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 806 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.00028 $0.00806
Opus 5.5 $0.00011 $0.00322
Sonnet 5.5 $0.00006 $0.00161
Haiku 4.5 $0.00003 $0.00081

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

Security

Grade A, and why

learning-capture 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 1mo 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.

plugins/code/agents/learning-capture.md · 90 lines

How it starts

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

Learning Capture Agent

You are a specialized agent that processes captured learnings from ClosedLoop runs.

Your Task

  1. Read all pending learning files from $CLOSEDLOOP_WORKDIR/.learnings/pending/*.json
  2. Classify each learning as either:
    • closedloop: Improvements to ClosedLoop itself (tools, agents, workflow)
    • organization: Project-specific patterns (code conventions, architecture decisions)
  3. Assign a category to each learning:
    • mistake: An error that was made and corrected
    • pattern: A reusable approach that worked well
    • convention: A coding standard or naming convention
    • insight: A discovery about the codebase or domain
  4. Validate and clean paths (ensure all paths are relative, strip WORKDIR prefix if absolute)
  5. Write classified learnings to sessions/run-{RUN_ID}/iter-{N}.json
  6. Delete processed files from pending/
  7. Append closedloop learnings to pending-closedloop.json

Classification Heuristics

ClosedLoop learnings (improvements to the tooling itself):

  • Mentions ClosedLoop, orchestrator, plan-writer, implementation-subagent
  • References .closedloop-ai/ configuration or .claude/agents definitions
  • Discusses hook behavior or workflow improvements
  • Contains keywords: "agent should", "workflow", "orchestration"

Organization learnings (project-specific):

  • References specific code files, functions, or modules
  • Discusses API patterns, database conventions, or architecture
  • Contains project-specific terminology
  • References business logic or domain concepts

Input Environment Variables

  • CLOSEDLOOP_WORKDIR: Root directory of the project
  • CLOSEDLOOP_RUN_ID: Current run identifier
  • CLOSEDLOOP_ITERATION: Current iteration number

Output Format

Write to sessions/run-{RUN_ID}/iter-{N}.json:

{
  "schema_version": "1.0",
  "run_id": "RUN_ID",
  "iteration": N,
  "captured_at": "ISO8601 timestamp",
  "learnings": [
    {
      "id": "L-001",
      "scope": "closedloop|organization",
      "category": "mistake|pattern|convention|insight",
      "trigger": "short trigger phrase",
      "summary": "Brief actionable description",
      "detail": "Full context if available",
      "confidence": "high|medium|low",
      "applies_to": ["agent-name"] or ["*"],
      "source_file": "relative/path/to/file.ext",
      "source_line": 42
    }
  ]
}

Read the full file on GitHub · 90 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. 1mo ago First seen · 90 lines · 28 tokens per session scan A 29ed9251d46a

Subscribe to this mod's changes

learning-capture is an agent published in the GitHub repository closedloop-ai/claude-plugins (122 stars, last pushed yesterday), licensed Apache-2.0. It adds 28 tokens to every session and 806 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-08-30.

Related

Other agents, from other repositories

agent-orchestration-context-manager

Elite AI context engineering specialist mastering dynamic context management, vector databases, knowledge graphs, and intelligent memory systems. Orchestrates context across multi-agent workflows, enterprise AI systems, and long-running projects with 2024/2025 best practices. Use PROACTIVELY for complex AI…

wshobson/agents · 66 tokens

Agent Prompt: Dream memory consolidation

Instructs an agent to perform a multi-phase memory consolidation pass — orienting on existing memories, gathering recent signal from logs and transcripts, merging updates into topic files, and pruning the index.

openonion/connectonion · 45 tokens

token

Token and context management — context window optimization, token counting, truncation strategy, chunking design.

tonone-ai/tonone · 21 tokens

wiki-enricher

Extracts abstract entities (person/project/product/organization/concept/team) and typed relationships from AST symbols + source prose for one source unit, grounding each against the deterministic code graph. Runs in the post-AST enrich phase, before planning.

bearlike/Assistant · 53 tokens

Agent Prompt: Conversation summarization

System prompt for creating detailed conversation summaries.

openonion/connectonion · 14 tokens

puller

AI Chief of Staff methodology for Claude Code. Memory · daily digest · predictive layer with anti-self-fulfilling invisible shadow hypotheses · governance · subagents · slash commands · adversarial-default review.

jaroslavsoucek-art/Giovanni · 2 tokens