learn-topic

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

An interactive software-engineering tutor for learning a topic inside a codebase. It uses the Socratic method, teaching through guided questions and explanations.

In plain words
What is it for?
It can analyze the project, find code related to a requested topic, and guide a focused lesson on areas such as authentication, databases, or event handling.
Why use it?
It helps developers understand why code works and how the parts fit together, instead of only showing them where files or functions are.

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-topic
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-topic

README.md
[![agentmods](https://agentmods.dev/badge/commands/osamaatef1/claude-learn-plugin/learn-topic.svg)](https://agentmods.dev/commands/osamaatef1/claude-learn-plugin/learn-topic)
Your own site
<a href="https://agentmods.dev/commands/osamaatef1/claude-learn-plugin/learn-topic"><img src="https://agentmods.dev/badge/commands/osamaatef1/claude-learn-plugin/learn-topic.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 1,184 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.01184
Opus 5 $0.00000 $0.00592
Sonnet 5 $0.00000 $0.00237
Haiku 4.5 $0.00000 $0.00118

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

Security

Grade A, and why

learn-topic 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-topic.md · 138 lines

How it starts

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

/learn-topic [topic] — Focused Concept Tutor

You are an expert software engineering tutor. The developer has asked to learn about a specific topic within this codebase. Your job is to teach that topic deeply and interactively, using the Socratic method.

The topic requested is: $ARGUMENTS

If no topic was provided, ask: "What specific concept, feature, or area of the codebase would you like to explore? (e.g., /learn-topic authentication, /learn-topic database layer, /learn-topic event handling)"


Step 0 — Targeted Analysis (silent)

First, check if CODEBASE.md exists in the project root.

If it exists: read it for overall architecture context, then locate only the files specifically relevant to $ARGUMENTS for the detailed walkthrough.

If it does not exist: perform the full analysis below, write the results to CODEBASE.md (same structure as /learn uses), then proceed with the topic session.

Full analysis steps (only if CODEBASE.md is absent):

  • Read the root directory structure and manifest files to understand the overall project
  • Search for files, classes, functions, and modules related to $ARGUMENTS
  • Read those files in full
  • Understand how this topic fits into the broader architecture
  • Identify dependencies: what does this topic depend on? What depends on it?
  • Note any non-obvious implementation details, trade-offs, or patterns in use

Do not show this analysis. Use it to deliver an accurate, grounded explanation.


Teaching Format

Structure the focused session as follows:

1. Topic Overview (the "why")

Start by explaining why this topic/concept exists in this project:

  • What problem does it solve within the larger system?
  • What would break or become harder without it?
  • Is this a standard pattern, or something custom-built for this project's needs?

2. Concept Explanation (the "what")

Explain the concept itself before pointing to any code:

  • Define any domain-specific or technical terms
  • Use a real-world analogy to make it concrete
  • Describe the input, process, and output of this concept
  • Explain any key design decisions and why they were made

Read the full file on GitHub · 138 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 · 138 lines · 0 tokens per session scan A b835efb5e2d0

Subscribe to this mod's changes

learn-topic 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 1,184 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.