process-learnings

process-learnings is a command for Claude Code from closedloop-ai/claude-plugins. It costs 15 tokens per session (3,534 once invoked), scanned A, original, Apache-2.0.

A command that turns pending raw learnings from a ClosedLoop run into checked, deduplicated organization patterns. It saves the results in a shared local learnings file and removes processed files.

In plain words
What is it for?
Use it to classify and review pending learnings, reject or rewrite poor patterns, merge duplicates, and update the organization pattern store.
Why use it?
Raw learnings may be unclear, misleading, or repeated. Processing validates them, merges duplicates, and produces patterns that can be reused by later runs.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions subagents.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/user/Source/project/.closedloop-ai/runs/new-feature.

Part of the self-learning plugin — 2 skills, 6 commands shipped together

Good fit Use it to classify and review pending learnings, reject or rewrite poor patterns, merge duplicates, and update the organization pattern store.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add closedloop-ai/claude-plugins
Claude Code
/plugin install self-learning

Made for: Claude Code.

Or install self-learning, the plugin that ships this one along with the rest of its 2 skills, 6 commands.

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 process-learnings

README.md
[![agentmods](https://agentmods.dev/badge/commands/closedloop-ai/claude-plugins/process-learnings.svg)](https://agentmods.dev/commands/closedloop-ai/claude-plugins/process-learnings)
Your own site
<a href="https://agentmods.dev/commands/closedloop-ai/claude-plugins/process-learnings"><img src="https://agentmods.dev/badge/commands/closedloop-ai/claude-plugins/process-learnings.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,534 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.00015 $0.03534
Opus 5 $0.00008 $0.01767
Sonnet 5 $0.00003 $0.00707
Haiku 4.5 $0.00002 $0.00353

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

Security

Grade A, and why

process-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-learning/commands/process-learnings.md · 332 lines

How it starts

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

Process Learnings Command

Purpose: Transform raw pending learnings into validated, deduplicated patterns stored in ~/.closedloop-ai/learnings/org-patterns.toon.

Success criteria:

  • All pending learnings are classified and processed
  • Learnings are validated for correctness and clarity (misleading patterns rejected or reworded)
  • Duplicates are merged (not created separately)
  • Global org-patterns.toon is updated with new/updated patterns
  • Processed files are cleaned up

Usage

/process-learnings [workdir]
  • workdir: Path to the ClosedLoop run directory (defaults to current directory)

Instructions

Execute these steps in order:

Step 1: Determine Working Directory

Parse the argument to identify CLOSEDLOOP_WORKDIR:

  1. If argument provided → use it as CLOSEDLOOP_WORKDIR
  2. Else if .learnings/pending/ exists in current directory → use current directory
  3. Else check .closedloop-ai/runs/*/ for recent runs with pending learnings

Step 1.5: Rescue Stray Learnings from Project Root

Subagents sometimes write learnings to the project root .learnings/pending/ instead of $CLOSEDLOOP_WORKDIR/.learnings/pending/. Check for and move any stray files:

PROJECT_ROOT=$(git -C "$CLOSEDLOOP_WORKDIR" rev-parse --show-toplevel 2>/dev/null)
if [[ -n "$PROJECT_ROOT" ]] && [[ -d "$PROJECT_ROOT/.learnings/pending" ]]; then
    STRAY_FILES=$(ls -A "$PROJECT_ROOT/.learnings/pending/"*.json 2>/dev/null)
    if [[ -n "$STRAY_FILES" ]]; then
        echo "Found stray learnings at project root, moving to $CLOSEDLOOP_WORKDIR/.learnings/pending/"
        mkdir -p "$CLOSEDLOOP_WORKDIR/.learnings/pending"
        mv "$PROJECT_ROOT/.learnings/pending/"*.json "$CLOSEDLOOP_WORKDIR/.learnings/pending/"
    fi
fi

Read the full file on GitHub · 332 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 · 332 lines · 15 tokens per session scan A de96dd5f7f0a

Subscribe to this mod's changes

process-learnings is a command published in the GitHub repository closedloop-ai/claude-plugins (103 stars, last pushed 2d ago), licensed Apache-2.0. It adds 15 tokens to every session and 3,534 once invoked, about $0.0001 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-09-07.