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.
git clone --depth 1 https://github.com/closedloop-ai/claude-pluginsWrote 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/export-closedloop-learnings)<a href="https://agentmods.dev/commands/closedloop-ai/claude-plugins/export-closedloop-learnings"><img src="https://agentmods.dev/badge/commands/closedloop-ai/claude-plugins/export-closedloop-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.00013 | $0.00866 |
| Opus 5 | $0.00006 | $0.00433 |
| Sonnet 5 | $0.00003 | $0.00173 |
| Haiku 4.5 | $0.00001 | $0.00087 |
Grade A, and why
export-closedloop-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 today.
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 — 96 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Export ClosedLoop Learnings Command
Merges ClosedLoop-specific learnings from the current project into a global learnings store at ~/.closedloop-ai/learnings/closedloop-learnings.json with automatic deduplication.
Purpose
When learnings are captured that improve ClosedLoop itself (agents, workflows, hooks), they should be automatically exported to a global location where they persist across projects. This command handles deduplication to prevent redundant entries.
Process
- Read pending closedloop learnings: Load
$CLOSEDLOOP_WORKDIR/.learnings/pending-closedloop.json - Read existing global learnings: Load
~/.closedloop-ai/learnings/closedloop-learnings.json(create if missing) - Deduplicate: For each pending learning:
- If exact
triggermatch exists → skip (already exists) - If 80%+ word overlap on
summary→ skip (duplicate) - Otherwise → add as new learning with unique ID
- If exact
- Merge and write: Append non-duplicate learnings with
merged_attimestamp - Clear pending: Remove
pending-closedloop.jsonafter successful merge
Input Format
pending-closedloop.json:
{
"learnings": [
{
"id": "L-001",
"scope": "closedloop",
"category": "pattern",
"trigger": "plan-writer error handling",
"summary": "Plan-writer should validate task dependencies before writing",
"detail": "Found that missing dependency validation causes plan failures",
"source_project": "my-project",
"captured_at": "ISO8601"
}
]
}
Output Format
Global file at ~/.closedloop-ai/learnings/closedloop-learnings.json:
{
"schema_version": "1.0",
"last_updated": "ISO8601",
"learnings": [
{
"id": "SL-001",
"trigger": "plan-writer error handling",
"summary": "Plan-writer should validate task dependencies before writing",
"detail": "Found that missing dependency validation causes plan failures",
"category": "pattern",
"source_project": "my-project",
"captured_at": "ISO8601",
"merged_at": "ISO8601"
}
]
}
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.
- today First seen · 96 lines · 13 tokens per session scan A 8396abf80a52
export-closedloop-learnings is a command published in the GitHub repository closedloop-ai/claude-plugins (103 stars, last pushed yesterday), licensed Apache-2.0. It adds 13 tokens to every session and 866 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.
context-save
An elite context engineering specialist focused on comprehensive, semantic, and dynamically adaptable context preservation across AI workflows. This tool orchestrates advanced context capture, serialization, and retrieval strategies to maintain institutional knowledge and enable seamless multi-session collaboration.
check
Run mneme check against a file or proposed change.