learn

learn is a command for Claude Code from synaptiai/synapti-marketplace. It costs 29 tokens per session (2,866 once invoked), scanned A, original, Apache-2.0.

A command that studies the project's decision journal, a record of past choices, to find repeated patterns and suggest reusable skills.

In plain words
What is it for?
Use it for retrospective analysis of project decisions and for proposing new skills based on repeated practices.
Why use it?
It helps convert recurring corrections and working patterns into guidance that can be reused in future tasks.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the flow plugin — 31 skills, 21 commands, 9 agents shipped together

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add synaptiai/synapti-marketplace
Claude Code
/plugin install flow

Made for: Claude Code.

Or install flow, the plugin that ships this one along with the rest of its 31 skills, 21 commands, 9 agents.

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 learn

README.md
[![agentmods](https://agentmods.dev/badge/commands/synaptiai/synapti-marketplace/learn.svg)](https://agentmods.dev/commands/synaptiai/synapti-marketplace/learn)
Your own site
<a href="https://agentmods.dev/commands/synaptiai/synapti-marketplace/learn"><img src="https://agentmods.dev/badge/commands/synaptiai/synapti-marketplace/learn.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,866 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.1 $0.00029 $0.02866
Opus 5 $0.00015 $0.01433
Sonnet 5 $0.00006 $0.00573
Haiku 4.5 $0.00003 $0.00287

Measured 2d ago against content hash b26ade2b65a9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

learn 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.

plugins/flow/commands/learn.md · 221 lines

How it starts

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

Learn from Decisions

Analyze the decision journal for recurring patterns and generate skill proposals.

Required Skills

None — retrospective pattern analysis over the decision journal. No skill invocations.

Phase 1: Gather Journal Entries

# Output: `###`-headed sections + KEY=value per
# `references/command-output-format.md`.

echo "### Resolved Paths"
# JOURNAL_DIR and PROPOSAL_DIR resolve via the standard settings cascade.
# settings.json may store paths with a leading `~` (literal — JSON has no
# tilde-expansion semantics). The cascade helper returns the value verbatim
# without expansion, so downstream tools that don't auto-expand tildes
# (Read/Write/Edit, Python os.path) would fail. Manually expand `~` to
# $HOME so the agent always receives an absolute path.
HELPER="$(__fr="${CLAUDE_PLUGIN_ROOT:-}";[ -x "$__fr/bin/cascade-resolve.sh" ]||__fr=$({ echo plugins/flow;ls -d "$HOME"/.claude/plugins/cache/synapti-marketplace/flow/*/ 2>/dev/null|sort -Vr;echo "$HOME/.claude/plugins/marketplaces/synapti-marketplace/plugins/flow"; }|while read -r __p;do [ -x "${__p%/}/bin/cascade-resolve.sh" ]&&{ echo "${__p%/}";break;};done);echo "$__fr")/bin/cascade-resolve.sh"
JOURNAL_DIR=".decisions"
PROPOSAL_DIR="$HOME/.claude/flow-proposals"
if [ -x "$HELPER" ]; then
  JOURNAL_DIR=$("$HELPER" --default ".decisions" '.journal.dir // empty')
  PROPOSAL_DIR=$("$HELPER" --default "$HOME/.claude/flow-proposals" '.learning.proposalDir // empty')
  echo "STATE=ok"
else
  # Helper missing or non-executable — using compile-time defaults. Surface
  # so the agent knows resolution was best-effort and config might be ignored.
  echo "STATE=unavailable"
  echo "ERROR=cascade-resolve.sh missing or non-executable; using built-in defaults"
fi
# Expand leading `~` to $HOME so downstream Read/Write/Edit tools (which
# don't tilde-expand) receive absolute paths.
JOURNAL_DIR="${JOURNAL_DIR/#\~/$HOME}"
PROPOSAL_DIR="${PROPOSAL_DIR/#\~/$HOME}"
echo "JOURNAL_DIR=$JOURNAL_DIR"
echo "PROPOSAL_DIR=$PROPOSAL_DIR"

echo ""
echo "### Journal Files"
JOURNAL_FILES=0
[ -d "$JOURNAL_DIR" ] && JOURNAL_FILES=$(ls "$JOURNAL_DIR"/*.md 2>/dev/null | wc -l | tr -d ' ')
echo "JOURNAL_FILE_COUNT=$JOURNAL_FILES"
if [ "$JOURNAL_FILES" = "0" ]; then
  echo "STATE=empty"
else
  ls "$JOURNAL_DIR"/*.md 2>/dev/null | sed 's/^/JOURNAL_FILE=/'
fi

echo ""
echo "### Proposal Files"
PROPOSAL_FILES=0
[ -d "$PROPOSAL_DIR" ] && PROPOSAL_FILES=$(ls "$PROPOSAL_DIR"/*.md 2>/dev/null | wc -l | tr -d ' ')
echo "PROPOSAL_FILE_COUNT=$PROPOSAL_FILES"
if [ "$PROPOSAL_FILES" = "0" ]; then
  echo "STATE=empty"
else
  ls "$PROPOSAL_DIR"/*.md 2>/dev/null | sed 's/^/PROPOSAL_FILE=/'
fi

# Section: FlowRun Events + FlowGoals (v3)
# Gated behind flow.goals.enabled — when v3 is enabled, surface the goal
# YAMLs + run-event ledgers so Phase 2's Goal Failure Patterns can detect
# recurring failed ACs, stuck-detection hits, and not_executed warnings.
echo ""
echo "### FlowRun Events"
GOALS_ENABLED="false"
[ -x "$HELPER" ] && GOALS_ENABLED=$("$HELPER" --default "true" '.flow.goals.enabled' 2>/dev/null)
if [ "$GOALS_ENABLED" != "true" ]; then
  echo "STATE=disabled"
else
  GOAL_FILES=0
  [ -d ".flow/goals" ] && GOAL_FILES=$(ls .flow/goals/*.goal.yaml 2>/dev/null | wc -l | tr -d ' ')
  RUN_FILES=0
  [ -d ".flow/runs" ] && RUN_FILES=$(find .flow/runs -name "events.jsonl" 2>/dev/null | wc -l | tr -d ' ')
  echo "GOAL_FILE_COUNT=$GOAL_FILES"
  echo "RUN_EVENT_FILE_COUNT=$RUN_FILES"
  if [ "$GOAL_FILES" = "0" ] && [ "$RUN_FILES" = "0" ]; then
    echo "STATE=empty"
  else
    echo "STATE=ok"
    ls .flow/goals/*.goal.yaml 2>/dev/null | sed 's/^/GOAL_FILE=/'
    find .flow/runs -name "events.jsonl" 2>/dev/null | sed 's/^/RUN_EVENTS=/'
  fi
fi

true

Read the full file on GitHub · 221 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 · 221 lines · 29 tokens per session scan A b26ade2b65a9

Subscribe to this mod's changes

learn is a command published in the GitHub repository synaptiai/synapti-marketplace (6 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 29 tokens to every session and 2,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-03.

Related

Other commands, from other repositories

paper-trail-resolve-textbooks

Resolve incomplete textbook references in the registry. Reads candidates via pipeline resolve-textbooks --list, invokes the textbook-resolver sub-agent to produce a decisions JSON (mergeinto / complete / blocked), and applies via pipeline resolve-textbooks --apply-from. Fully automated cleanup pass after INGEST.

roomi-fields/paper-trail · 62 tokens

create-worktree

Follow these steps to create a git worktree.

CaptainMe-AI/lead-dev-os · 0 tokens

learn-mode

Interactive code tutor — breaks down codebase logic, explains complexities, translates technical concepts for the user. Ideal after /btw commands. Teaches the WHY behind the code, not just the WHAT.

ShaheerKhawaja/ProductionOS · 43 tokens

alt

Import an Exam Radar (OPTIMETA Alt plugin) export and fold its lecture-emphasis exam signal into the course index — radar.md, a lecture-emphasis column on coverage.md, and a gold-zone weakmap.

OPTIMETA/PAIDEIA · 44 tokens

paper-trail-ingest

Ingest the citations of one SOTA into the registry. Extracts bibliographic sections, parses citations via the citation-parser sub-agent, resolves DOI via Crossref/S2, deduplicates against the registry, creates new candidate refs, and substitutes free-text citations with [[wikilinks]]. Required first step to make a…

roomi-fields/paper-trail · 75 tokens

hf.diff-sanity

Review the current branch diff for common implementation mistakes before committing. This is a read-only check — it does not modify files.

T-rav/hydraflow · 0 tokens