Write a walk-through of one source file - what each part of it does, in order - and attach it to that file on the map. Use when the user wants one file explained step by step.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Lesson?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/bayshores-lesson)
---
name: lesson
description: Write a walk-through of one source file - what each part of it does, in order - and attach it to that file on the map. Use when the user wants one file explained step by step.
argument-hint: <file path>
---
# Explain one file, part by part
1. Run `und query about <file>` to learn what the file is for and what uses it.
2. Read the file with line numbers.
3. Split it into 3 to 12 parts from top to bottom (imports, each function or class, the part that starts things). For each part write 1 to 3 sentences that say what it does and why it is there, for someone new to programming. At most 500 characters per part.
4. Save the answer to a file in this shape. Parts are in order, do not overlap, and use the real line numbers:
`{"lessons":[{"path":"<file>","segments":[{"from":1,"to":12,"text":"..."}]}]}`
5. Run `und enrich-apply --file <answer file>`. It prints `Stored 1 lesson.` or the reason it refused. Fix and apply again if refused.
6. Tell the user they can walk through the lesson in the und desktop app (open the project in und, click the file's block on the map, and click "Walk this file" or press `W`), and give the walk-through in your answer too, part by part, each part with its line numbers.
The lesson is thrown away when the file changes, because its line numbers would no longer fit.