learn-save

learn-save is a command for coding agents from osamaatef1/claude-learn-plugin. It costs 0 tokens per session (580 once invoked), scanned A, original, MIT.

A command for analyzing an entire codebase and saving the findings in `CODEBASE.md`. The file gives later learning sessions a cached overview of the project.

In plain words
What is it for?
Use it to document a project's structure, important files, data flow, configuration, and non-obvious implementation details for later `/learn` or `/learn-topic` sessions.
Why use it?
It avoids repeating the same exploration of files, frameworks, entry points, architecture, and design decisions in future sessions.

Command

Part of the claude-learn-plugin plugin — 3 commands shipped together

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/osamaatef1/claude-learn-plugin/learn-save
Clone the repo
git clone --depth 1 https://github.com/osamaatef1/claude-learn-plugin

Or install claude-learn-plugin, the plugin that ships this one along with the rest of its 3 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 learn-save

README.md
[![agentmods](https://agentmods.dev/badge/commands/osamaatef1/claude-learn-plugin/learn-save.svg)](https://agentmods.dev/commands/osamaatef1/claude-learn-plugin/learn-save)
Your own site
<a href="https://agentmods.dev/commands/osamaatef1/claude-learn-plugin/learn-save"><img src="https://agentmods.dev/badge/commands/osamaatef1/claude-learn-plugin/learn-save.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 580 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 $0.00000 $0.00580
Opus 5 $0.00000 $0.00290
Sonnet 5 $0.00000 $0.00116
Haiku 4.5 $0.00000 $0.00058

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

Security

Grade A, and why

learn-save 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 3d 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.

commands/learn-save.md · 69 lines

How it starts

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

/learn-save — Cache Codebase Analysis

You are a codebase analysis expert. Your job is to thoroughly analyze this project and save the results to CODEBASE.md so future /learn and /learn-topic sessions can skip the exploration phase entirely.

Step 1 — Full Codebase Exploration

Silently analyze the entire project:

  • Read the root directory structure (all top-level files and folders)
  • Read all manifest files: package.json, pyproject.toml, Cargo.toml, go.mod, composer.json, etc.
  • Read README.md if present
  • Identify the primary language(s) and framework(s)
  • Identify all entry points (e.g., main.py, index.ts, app.js, main.go)
  • Read every significant source file (skip generated files, lock files, and vendored dependencies)
  • Identify configuration files (.env.example, docker-compose.yml, CI configs, etc.)
  • Map out the full architecture: folders, layers, patterns, data flow
  • Identify the 5–8 most important files and their responsibilities
  • Note any non-obvious design decisions, patterns, or gotchas

Step 2 — Write CODEBASE.md

Write a CODEBASE.md file in the project root with the following structure:

# Codebase Analysis
<!-- Generated by /learn-save. Used by /learn and /learn-topic to skip re-exploration. -->

## Project Purpose
[What problem this project solves. Who uses it. Why it exists.]

## Language & Frameworks
[Primary language(s), frameworks, and key libraries]

## Architecture
[The architectural pattern in use. An ASCII diagram if helpful. Why this structure was chosen.]

## Folder Structure
[Each top-level folder and its role]

## Entry Points
[The main entry files and what they do]

## Key Files
[The 5–8 most important files, each with: path, single responsibility, what depends on it, what it depends on]

## Data Flow
[How a typical request/operation flows through the system end to end]

## Core Patterns & Concepts
[The 2–4 most important design patterns or abstractions in use, with brief explanations]

## Configuration
[Key config files and environment variables]

## Gotchas & Non-Obvious Details
[Anything a new developer would likely stumble on]

Read the full file on GitHub · 69 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. 3d ago First seen · 69 lines · 0 tokens per session scan A c5adf0f0ae7f

Subscribe to this mod's changes

learn-save is a command published in the GitHub repository osamaatef1/claude-learn-plugin (3 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 580 tokens. 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-31.