code-lesson-writer

code-lesson-writer is an agent for Claude Code from Egonex-AI/Understand-Anything. It costs 44 tokens per session (1,040 once invoked), scanned A, original, MIT.

A teaching tool that creates guided lessons for source files shown in a code viewer. It reads the actual code and explains sections by their line ranges.

In plain words
What is it for?
Use it to write file overviews and line-by-line learning notes for selected files in a software project. It is intended for code-reading lessons in an educational dashboard.
Why use it?
It gives learners context while they read unfamiliar files instead of leaving them to understand the source alone. The explanations follow the project's guided tour.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the understand-anything plugin — 9 skills, 12 agents, 2 hooks shipped together

Good fit Use it to write file overviews and line-by-line learning notes for selected files in a software project. It is intended for code-reading lessons in an educational dashboard.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/egonex-ai/understand-anything/code-lesson-writer
About the project

Understand Anything analyzes codebases, knowledge bases, or documentation and turns their files, functions, classes, and dependencies into an interactive knowledge graph with summaries and relationships. It helps developers learn unfamiliar projects, explore structure, and ask questions through a visual dashboard. The catalogue entries are integrations for coding agents, including skills, agents, plugins, hooks, and instructions.

Egonex-AI/Understand-Anything · 94,917 stars · on GitHub · understand-anything.com

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/Egonex-AI/Understand-Anything

Made for: Claude Code.

Or install understand-anything, the plugin that ships this one along with the rest of its 9 skills, 12 agents, 2 hooks.

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 code-lesson-writer

README.md
[![agentmods](https://agentmods.dev/badge/agents/egonex-ai/understand-anything/code-lesson-writer/github.svg)](https://agentmods.dev/agents/egonex-ai/understand-anything/code-lesson-writer)
Your own site
<a href="https://agentmods.dev/agents/egonex-ai/understand-anything/code-lesson-writer"><img src="https://agentmods.dev/badge/agents/egonex-ai/understand-anything/code-lesson-writer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code-lesson-writer

Your own site · 80×15
<a href="https://agentmods.dev/agents/egonex-ai/understand-anything/code-lesson-writer"><img src="https://agentmods.dev/badge/agents/egonex-ai/understand-anything/code-lesson-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 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,040 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.00044 $0.01040
Opus 5.5 $0.00018 $0.00416
Sonnet 5.5 $0.00009 $0.00208
Haiku 4.5 $0.00004 $0.00104

Measured 16d ago against content hash 54cb0fcda51c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

code-lesson-writer 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 16d 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.

understand-anything-plugin/agents/code-lesson-writer.md · 114 lines

How it starts

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

Code Lesson Writer

You are an expert technical educator who writes source-reading lessons. Your job is to produce per-file learning explanations that appear next to the source code in the dashboard's code viewer, so a reader can study each file with guidance that matches the project's guided tour.

Task

Given the project's tour steps and the detailed files list, produce a code-lessons.json document keyed by file path. Every file in the detailed list receives a detailed lesson: an overview plus explained segments anchored to line ranges, read from the actual source. Do NOT write entries for any other file — overview-only entries for the remaining file-level nodes are generated deterministically from their node summaries by the calling skill's normalization step, not by you.

Language directive: If the dispatch prompt includes a language directive (e.g., "Generate all textual content in Chinese"), apply it to every title, overview, and explanation you write. Keep technical terms clear — some concepts may benefit from bilingual explanation (English term + local translation). Use native-level terminology appropriate for technical education.


Detailed Lessons (the dispatch's detailed files list)

For every file that appears in the dispatch prompt's Detailed files list:

  1. Read the actual source file from disk (paths are relative to the provided project root).
  2. Write an overview (2-5 sentences): what this file is responsible for, how it fits into the project, and how it relates to the tour step(s) that reference it.
  3. Split the file into 2-10 sections following the file's logical structure (imports, types, constants, one per function/class/method group, exports). Each section:
    • title — short, descriptive (2-6 words)
    • lineRange — [startLine, endLine] (1-based, inclusive), MUST match the real lines you read; sections must not overlap
    • explanation — 2-6 sentences of markdown explaining WHAT the code does, WHY it is written this way, and any non-obvious design decisions, patterns, or gotchas worth noticing
    • tourOrder — when a tour step explains this area of the file, the order of that tour step (integer). Omit when no step corresponds.

Read the full file on GitHub · 114 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. 16d ago First seen · 114 lines · 44 tokens per session scan A 54cb0fcda51c

Subscribe to this mod's changes

code-lesson-writer is an agent published in the GitHub repository Egonex-AI/Understand-Anything (94,917 stars, last pushed 5d ago), licensed MIT. It adds 44 tokens to every session and 1,040 once invoked, about $0.0002 per session on Opus 5.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-11-14.

Related

code-lesson-writer compared with agents from other repositories

code-lesson-writer next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
code-lesson-writerEgonex-AI/Understand-AnythingAgent95k5d agoMITA44Claude Code
executordatit309/supergraphAgent235d agoMITA25Claude Code
qa-testerdatit309/supergraphAgent235d agoMITA41Claude Code
scene-designerchoxos/MathVizAgentAgent16mo agoMITA32Claude Code
auditorvibhasdutta/loop-engineerAgent34mo agononeA35Claude Code
loop-engineer-agent-factoryvibhasdutta/loop-engineerAgent34mo agononeA40Claude Code
loop-engineer-memory-keepervibhasdutta/loop-engineerAgent34mo agononeA25Claude Code