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.
/plugin marketplace add closedloop-ai/claude-plugins/plugin install self-learningWrote 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.
[](https://agentmods.dev/commands/closedloop-ai/claude-plugins/process-learnings)<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>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.
| Model | Per session | Once 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 |
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.
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:
- If argument provided → use it as
CLOSEDLOOP_WORKDIR - Else if
.learnings/pending/exists in current directory → use current directory - 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
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.
- yesterday First seen · 332 lines · 15 tokens per session scan A de96dd5f7f0a
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.
Other commands, from other repositories
capture
Model-driven lesson capture — read recent work in a role, distill genuine insights, append tagged bullets to pending.md. The real capture path; complements the Stop-hook's cheap regex fast-lane.
role-promote
Autonomously reconcile a role's memory — merge pending + recent learnings into ROLE.md, dedupe and declutter. The auto-promotion step fired when a role is stale (>7 days) with pending activity.
epic-claim
Claim an epic issue, stamp coordination state, and sync local ownership.
epic-review
Mark epic review requested, approved, or changes requested.
check
Run mneme check against a file or proposed change.
lessons
Lists the feedback memories captured for the current project (and globally) — the "lessons" learned from user corrections.