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/pull-learnings)<a href="https://agentmods.dev/commands/closedloop-ai/claude-plugins/pull-learnings"><img src="https://agentmods.dev/badge/commands/closedloop-ai/claude-plugins/pull-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.00012 | $0.00558 |
| Opus 5 | $0.00006 | $0.00279 |
| Sonnet 5 | $0.00002 | $0.00112 |
| Haiku 4.5 | $0.00001 | $0.00056 |
Grade A, and why
pull-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 — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Pull Learnings Command
Imports organization patterns from a shared repository into local TOON format.
Prerequisites
CLAUDE_ORG_IDenvironment variable must be set- Must run
git pullfirst to get latest shared patterns - Local
.learnings/directory must exist
Process
- Read shared patterns: Load
$CLOSEDLOOP_WORKDIR/.closedloop-ai/learnings/org-patterns.json - Convert JSON → TOON: For LLM consumption
- Regenerate local IDs: Maintain unique IDs within local file
- Skip echo patterns: Exclude patterns that originated from this project
- Merge into local: Update
$CLOSEDLOOP_WORKDIR/.learnings/org-patterns.toon
Echo Prevention
To avoid circular pattern propagation:
- Read
sources.jsonto identify pattern origins - Skip patterns where
source_projectmatches current project - This prevents: Project A → Shared → Project A (echo)
JSON to TOON Conversion
# JSON
{
"id": "P-001",
"scope": "org",
"category": "pattern",
"trigger": "auth_flow",
"confidence": "high",
"seen_count": 5,
"success_rate": 0.85,
"flags": "",
"applies_to": ["impl-subagent"],
"summary": "Check token expiry"
}
# TOON
P-001|org|pattern|auth_flow|high|5|0.85||impl-subagent,"Check token expiry"
Merge Strategy
When merging into local patterns:
- New patterns: Append to file with new local ID
- Existing patterns (same trigger): Update metadata, keep higher seen_count
- Conflicting patterns: Prefer pattern with higher success_rate
Local ID Generation
Local IDs are regenerated during pull to:
- Avoid collisions with existing local patterns
- Maintain consistent ID sequence in local file
- Original shared ID preserved in metadata comment
Usage
# First, pull latest from remote
git pull origin main
# Then pull learnings (via ClosedLoop orchestrator)
# Requires CLAUDE_ORG_ID to be set
export CLAUDE_ORG_ID="my-organization"
Output
Updates $CLOSEDLOOP_WORKDIR/.learnings/org-patterns.toon with:
- New patterns from shared repository
- Updated metadata for existing patterns
- Comments indicating pattern sources
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 · 82 lines · 12 tokens per session scan A 9b5a59949118
pull-learnings is a command published in the GitHub repository closedloop-ai/claude-plugins (103 stars, last pushed yesterday), licensed Apache-2.0. It adds 12 tokens to every session and 558 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
aside
Answer a quick side question without interrupting or losing context from the current task. Resume work automatically after answering.
recall-loop
Periodic memory digest — designed for use with Claude Code's /loop scheduler. Shows recent memories and pending to-dos in a compact, scannable format.
fire-session-summary
Auto-generate compact session summary with aggregate status, readiness, outlook, and next steps.
pin
Break checkpoint — status display, session log, optional MEMORY.md update.
cleanup
Sweep /.claude disk hygiene to stated retentions, clean up stale plans from repos, audit plugin health, and compact agent memory files.
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.