push-learnings

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

A command that sends locally collected organization patterns to a shared Git repository. It merges them with existing patterns and records where each pattern came from.

In plain words
What is it for?
Use it to publish local learnings for team-wide use, merge them into the shared collection, resolve duplicate IDs, and track their source projects.
Why use it?
Teams can otherwise keep useful coding and workflow lessons separated across projects. It also prevents identifier conflicts when patterns from different projects are combined.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

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

Good fit Use it to publish local learnings for team-wide use, merge them into the shared collection, resolve duplicate IDs, and track their source projects.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/closedloop-ai/claude-plugins/push-learnings
Install

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.

Clone the repo
git clone --depth 1 https://github.com/closedloop-ai/claude-plugins

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/closedloop-ai/claude-plugins/push-learnings.svg)](https://agentmods.dev/commands/closedloop-ai/claude-plugins/push-learnings)
Your own site
<a href="https://agentmods.dev/commands/closedloop-ai/claude-plugins/push-learnings"><img src="https://agentmods.dev/badge/commands/closedloop-ai/claude-plugins/push-learnings.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 535 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.00011 $0.00535
Opus 5 $0.00005 $0.00267
Sonnet 5 $0.00002 $0.00107
Haiku 4.5 $0.00001 $0.00053

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

Security

Grade A, and why

push-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/push-learnings.md · 82 lines

What it actually says

Push Learnings Command

Exports local organization patterns to a shared repository for team-wide distribution.

Prerequisites

  • CLAUDE_ORG_ID environment variable must be set
  • Git repository must be initialized
  • Network access to remote repository

Process

  1. Read local patterns: Load $CLOSEDLOOP_WORKDIR/.learnings/org-patterns.toon
  2. Convert TOON → JSON: For cross-project compatibility
  3. Regenerate pattern IDs: Resolve collisions (P-001 might exist in target)
  4. Merge with shared patterns: Read $CLOSEDLOOP_WORKDIR/.closedloop-ai/learnings/org-patterns.json
  5. Track source project: Update sources.json with origin metadata
  6. Write merged output: Save to shared location

ID Collision Resolution

When merging patterns from multiple projects:

  1. Load existing IDs from target file
  2. For each new pattern:
    • If ID exists, generate new ID (P-XXX where XXX is next available)
    • Preserve original ID in metadata for traceability

Source Tracking

sources.json format:

{
  "patterns": {
    "P-001": {
      "source_project": "project-name",
      "source_id": "P-042",
      "pushed_at": "ISO8601",
      "pushed_by": "[email protected]"
    }
  }
}

TOON to JSON Conversion

# TOON
P-001|org|pattern|auth_flow|high|5|0.85||impl-subagent,"Check token expiry"

# 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"
}

Usage

# Requires CLAUDE_ORG_ID to be set
export CLAUDE_ORG_ID="my-organization"
# Then invoke via ClosedLoop orchestrator

Error Handling

  • If CLAUDE_ORG_ID not set, exit with error
  • If local patterns file missing, exit with error
  • If merge conflict, prefer newer pattern (by timestamp)
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 · 82 lines · 11 tokens per session scan A 075e38f3bf25

Subscribe to this mod's changes

push-learnings is a command published in the GitHub repository closedloop-ai/claude-plugins (103 stars, last pushed yesterday), licensed Apache-2.0. It adds 11 tokens to every session and 535 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.