CtrlK
BlogDocsLog inGet started
Tessl Logo

learn-with-claude

Use when the user wants to UNDERSTAND and RETAIN code, systems, or protocols — not just change them. Three modes. (1) VISUAL EXPLAINER — "make a visual explanation of this", "build an HTML presentation / slides explaining this code", "walk me through this module visually" — produce a self-contained HTML deck that teaches big-picture-first. (2) DIAGRAM-IT — "draw an ASCII diagram of this", "diagram this protocol / architecture / request flow", "sketch the state machine" — produce accurate monospace ASCII diagrams grounded in the actual code. (3) RECALL LOOP — "quiz me on this", "test my understanding", "help me remember this", "spaced repetition" — run a loop where the user explains, you probe gaps Socratically, and persist review cards. Trigger whenever the user is learning from a codebase — onboarding, building a mental model, or studying to remember — even if they don't name a mode. Also mention the Explanatory/Learning output style (/config) for ongoing "explain the why" narration.

68

Quality

81%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Learn with Claude

Why this skill exists

A coding assistant usually optimizes for getting the change made, but much of an engineer's time goes to understanding — unfamiliar code, a new codebase, someone else's design. This skill turns the assistant into a teacher: the goal isn't a working diff, it's a durable mental model. That changes what "good output" means — build understanding big-picture-first, make the invisible visible (diagrams, slides), and check and reinforce what actually stuck.

The through-line: optimize for what the user will still understand next month, not just what compiles today.

Setup: make "explain the why" the default

Two tips (a) is a harness setting, not a skill action: the user can enable the Explanatory or Learning output style via /config, which makes the assistant narrate the reasoning and trade-offs behind every change by default. Mention this when the user says they want ongoing "explain the why" narration across a whole session — it's more ergonomic than asking each time.

Within this skill, regardless of output style: lead with the why and the mental model, then the mechanics — someone who grasps why code is shaped a certain way can reconstruct the what.

Picking a mode

The user says…Mode
"make slides", "visual explanation", "HTML presentation", "present this code"1 · Visual Explainer
"draw / sketch / diagram", "ASCII", "how do these connect", "request flow", "state machine"2 · Diagram-It
"quiz me", "test my understanding", "help me remember", "spaced repetition"3 · Recall Loop

Modes 1 and 2 deliver understanding; Mode 3 verifies and retains it. They pair naturally: explain visually, then run a recall loop a few days later.


Mode 1 · Visual Explainer (HTML slides)

The user wants a visual, teachable explanation of some code or system. A well-built HTML deck beats a wall of prose because it forces one idea per view and lets the reader control pace.

Do this:

  1. Read the actual code first. The explanation must be grounded in what's really there — real function names, real call paths, real data shapes. A generic explanation of "how auth usually works" is worthless; explain this auth.
  2. Structure big-picture-first. A reliable teaching arc:
    • What problem does this solve? (one slide, plain language — the "why it exists")
    • The shape — the main components/files and how they relate (a map before the streets)
    • The main path — walk one concrete end-to-end flow (a real request/input), step by step
    • Key pieces up close — the 2-4 functions/abstractions that carry the weight, with annotated snippets
    • Gotchas & why — the non-obvious decisions, edge cases, and constraints
    • Recap — the 3-5 things to remember
  3. Confirm the outline before building. A full HTML deck is expensive to redo, so present the slide outline as a short bullet list and get a quick "yes" (or corrections) before you build — this catches a wrong-scoped explanation before you've spent the effort. Skip only for a tiny, obviously-scoped ask.
  4. Build it as a self-contained artifact. If the Artifact tool is available, use it (load the artifact-design skill first for layout/theming). Otherwise write a single self-contained .html file (inline CSS/JS, no external deps) and tell the user the path to open. Keep code snippets short, highlighted, and annotated — the annotation is where the teaching happens.
  5. Teach, don't dump. Every slide should answer a question the learner would actually ask. If a slide is just code with no insight, cut it or annotate it.

Mode 2 · Diagram-It (ASCII)

The user wants a diagram they can read right in the terminal, a PR, or a markdown file. ASCII diagrams are underrated for code: they live next to the code, diff cleanly, and force you to simplify.

Do this:

  1. Read the code/spec first so the diagram is accurate, not plausible. Wrong diagrams are worse than none — they teach the wrong model confidently.
  2. Pick the diagram type that fits the question:
    • Component / box-and-arrow — how modules or services connect and who depends on whom.
    • Sequence — the ordered flow of a request/message across participants (client → API → db → …).
    • State machine — the states an entity moves through and what triggers each transition.
    • Data flow — how data is transformed as it moves through stages.
    • Layer / stack — how layers sit on top of each other.
  3. Draw for monospace legibility. Align boxes, label every arrow with what crosses it (the call, the message, the data), and keep it to one screen where possible. Prefer a few clear diagrams over one dense one.
  4. Caption the model, with stable references. A diagram plus two sentences of "what to notice here" teaches far more than the diagram alone. When the caption points at code, reference it by path/file.ext + function/class name rather than line numbers — line numbers rot on the next edit, symbols survive.

Sequence sketch (shape to imitate):

Client        API Gateway      AuthService        DB
  │  POST /login   │                │              │
  │───────────────>│                │              │
  │                │  verify(creds) │              │
  │                │───────────────>│  SELECT user │
  │                │                │─────────────>│
  │                │                │<──── row ────│
  │                │<── token ──────│              │
  │<── 200 +JWT ───│                │              │

Mode 3 · Recall Loop (spaced repetition)

Reading an explanation feels like learning but rarely produces retention. Retention comes from retrieval — being made to reconstruct the idea from memory — spaced out over time. This mode runs that loop and persists it so learning compounds across sessions.

The loop:

  1. The user explains first. Ask the user to explain their current understanding of the topic in their own words before you explain anything. Retrieval only works if they try to produce the answer, not recognize it.
  2. Probe the gaps Socratically. From their explanation, find what's missing, vague, or wrong, and ask targeted follow-ups — "what happens if the token is expired?", "why a queue and not a direct call?". Don't correct yet; let the questions surface the gaps.
  3. Fill and correct. Now give the precise, minimal explanation that closes the specific gaps you found — not a from-scratch lecture. Name the misconception explicitly if there was one; corrected misconceptions stick.
  4. Persist a recall card. Write a Q/A card to the skill's progress/cards.json (resolve progress/ relative to this skill's directory; create it if absent). Schedule the next review with expanding intervals — a simple, effective default is 1, 3, 7, 16, 35 days, advancing on a good recall and resetting toward the start on a failed one.
    {
      "id": "auth-token-refresh",
      "topic": "JWT refresh flow",
      "question": "When an access token expires mid-session, what happens and why doesn't the user get logged out?",
      "answer": "The client silently POSTs the refresh token to /refresh, gets a new access token, and retries — the refresh token has a longer TTL. So the session survives access-token expiry without re-login.",
      "interval_index": 0,
      "next_review": "2026-07-12",
      "created": "2026-07-09"
    }
  5. Surface what's due. When the user says "quiz me" or "what's due", read progress/cards.json, find cards whose next_review is on or before today, and quiz those first — ask the question, let them answer, then reveal and reschedule. This is the compounding part: the skill remembers what they're still shaky on.

Keep it honest. If the user's recall is wrong, say so plainly and reset the card's interval — a spaced-repetition system that rewards wrong answers teaches nothing. Warm delivery, accurate grading.


Across all modes

  • Ground everything in the real code. Read before you explain, diagram, or quiz. A confident, generic explanation that doesn't match the actual code is the most damaging output here — it installs a wrong model.
  • Big picture before mechanics. Always establish why this exists and the overall shape before drilling into any single function.
  • Aim for the model, not the recap. Success is the user being able to explain it back and reason about a new case — not the artifact you produced. Mode 3 is how you check that actually happened.

When to stop reading (before you explain)

"Read the code first" needs a stopping condition, or you either explain too soon (installing a wrong model) or over-read (burning the session on library internals). Calibrate:

  • Ready to explain when you can: trace the happy path end-to-end without gaps, name what's in scope vs. external, and draw the diagram with no placeholder boxes.
  • Not done if: you're still hedging ("I think this calls…", "probably persists to…") or chasing imports/calls you haven't opened.
  • Gone too far if: you're reading every file in a directory instead of representative ones, or tracing into framework/library internals that don't change the model.
Repository
sayed-moin-ahmed/learn-with-claude
Last updated
First committed

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.