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.
npx agentmods add agents/closedloop-ai/claude-plugins/learning-capturegit clone --depth 1 https://github.com/closedloop-ai/claude-pluginsWhat 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 | $0.00028 | $0.00806 |
| Opus 5 | $0.00014 | $0.00403 |
| Sonnet 5 | $0.00006 | $0.00161 |
| Haiku 4.5 | $0.00003 | $0.00081 |
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 2d 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.
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
- Read all pending learning files from
$CLOSEDLOOP_WORKDIR/.learnings/pending/*.json - Classify each learning as either:
- closedloop: Improvements to ClosedLoop itself (tools, agents, workflow)
- organization: Project-specific patterns (code conventions, architecture decisions)
- 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
- Validate and clean paths (ensure all paths are relative, strip WORKDIR prefix if absolute)
- Write classified learnings to
sessions/run-{RUN_ID}/iter-{N}.json - Delete processed files from
pending/ - 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/agentsdefinitions - 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 projectCLOSEDLOOP_RUN_ID: Current run identifierCLOSEDLOOP_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
}
]
}
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.
- 2d ago First seen · 90 lines · 28 tokens per session scan A 29ed9251d46a
learning-capture is an agent published in the GitHub repository closedloop-ai/claude-plugins (103 stars, last pushed 4d ago), licensed Apache-2.0. It adds 28 tokens to every session and 806 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-08-30.
Other agents, from other repositories
.NET-Notebook-Migration-Agent
Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.
medical-learning-safety-reviewer
审校医学学习草稿的来源、教育边界、患者隐私和输出风险;只返回审校意见,不处理外部动作或状态写入。.
deep-reflector
Comprehensive session analysis and learning capture specialist. Analyzes development sessions to extract patterns, preferences, and improvements for future interactions. Use after significant work sessions to capture learnings.
nw-documentarist
Use for documentation quality enforcement using DIVIO/Diataxis principles. Classifies documentation type, validates against type-specific criteria, detects collapse patterns, and provides actionable improvement guidance.
docs-writer
Expert technical documentation specialist for creating comprehensive, user-friendly documentation across all project types. Use proactively for API docs, user guides, and technical documentation.
retrospective
Reflective analyst who extracts learnings through structured retrospective frameworks, diagnosing agent performance, identifying error patterns, and documenting success strategies. Uses Five Whys, timeline analysis, and learning matrices. Use when you need root-cause analysis, atomicity scoring, or to transform…