learn

A command that cleans up and reorganizes a project wiki’s REVIEW.md file and rebuilds its review history from pull-request comments.

In plain words
What is it for?
Use it to maintain review documentation, preview changes with a dry run, or refresh review history in supported repositories.
Why use it?
It keeps accumulated review guidance readable and prevents outdated or duplicate recommendations from building up.

Command

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.

agentmods
npx agentmods add commands/vorobiovd/air/learn
Clone the repo
git clone --depth 1 https://github.com/VorobiovD/air
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 8,603 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
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 $0.00028 $0.08603
Opus 5 $0.00014 $0.04301
Sonnet 5 $0.00006 $0.01721
Haiku 4.5 $0.00003 $0.00860

Measured 2d ago against content hash 0fd7b28ea788, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

learn scanned grade C with 1 finding 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

find /tmp -maxdepth 1 -name 'air-*' -mtime +1 -exec rm -rf {} + 2>/dev/null
plugins/air/commands/learn.md · 499 lines

How it starts

The opening of the file, as written. The whole thing — 499 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Fetch REVIEW.md from the wiki, clean it up using AI, generate REVIEW-HISTORY.md from PR comment history, and push both back.

Note: /air:review auto-triggers this command every 15 reviews (default; a repo can retune the count with AIR_LEARN_REVIEWS_THRESHOLD) or every 14 days — whichever comes first. You can also run it manually for immediate cleanup.

Store-backed repos (managed/headless fleet): when a repo's patterns live in an Anthropic memory store (the source of truth), the canonical learn is the cloud/client air-learner (managed learn.py, or the MA-independent managed/learn_headless.py), which curates the store; a deterministic Python step (managed/render_store_to_wiki.py) then exports the git-wiki mirror. This CLI command never reads or renders the store — it operates on the git wiki directly, so on a store-backed repo its writes would be overwritten by the next render. Step 1 now DETECTS a store mirror (via the render's banner — no API key needed) and STOPS, instead of relying on find-store (which is blank when the local ANTHROPIC_API_KEY can't see the repo's store). Reserve this CLI flow for legacy wiki-only repos.

Flags:

  • --dry-run — preview changes without pushing to wiki
  • --history-only — only regenerate REVIEW-HISTORY.md, don't touch REVIEW.md
  • --refresh-profile — re-run the full Opus deep scan for PROJECT-PROFILE.md + GLOSSARY.md (same as first-run discovery). Use when the project has changed significantly (new language, new service, major restructure). Overwrites existing profile and glossary with fresh scan results.

Setup

air uses the gh CLI. Derive PLATFORM_DOMAIN from the remote host (same as review.md "Setup"):

REMOTE_URL=$(git remote get-url origin 2>/dev/null)
if [[ "$REMOTE_URL" =~ ^https?://([^/]+)/ ]]; then PLATFORM_DOMAIN="${BASH_REMATCH[1]}"
elif [[ "$REMOTE_URL" =~ ^git@([^:]+): ]]; then PLATFORM_DOMAIN="${BASH_REMATCH[1]}"
else PLATFORM_DOMAIN="github.com"; fi

Step 0: Initialize Session Temp Directory

Read the full file on GitHub · 499 lines

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. 2d ago First seen · 499 lines · 0 tokens per session scan C 0fd7b28ea788

Subscribe to this mod's changes

learn is a command published in the GitHub repository VorobiovD/air (5 stars, last pushed 7d ago), licensed MIT. It adds 28 tokens to every session and 8,603 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.