Appends short contextual lessons to responses. Supports any language or custom topic. Trigger: user asks for recurring lessons, mentions /microlearn, or wants to learn a topic during coding.
Configure a micro-learning system that appends a short, contextual lesson at the end of Claude's responses in this project. The lesson should be concise, tied to the current conversation context, and never interrupt the flow of the technical work.
If CLAUDE.local.md contains any existing lesson section — a ## {Language} Lesson heading (e.g. ## Dutch Lesson, ## Tagalog Lesson) or a ## Micro Lessons: section — ask the user: Replace (remove existing lesson, continue from Step 1) or Update (tweak current setup, skip to Step 8).
Extract from arguments passed to this skill: the topic/subject to teach, and any frequency preference. Leave either unset if absent.
Use AskUserQuestion if the TOPIC is missing. Ask what the user wants to learn. If the answer is a broad category, follow up to get the specific topic name.
If FREQUENCY was not specified in the arguments, don't ask yet — it will be defaulted intelligently in Step 4 after analyzing the topic.
Determine the learning type:
Before jumping to interview questions, think creatively about how this specific topic is best learned. Different topics have fundamentally different learning dynamics — don't force them all into the same mold.
Output a brief visible summary to the user — 2 sentences max — explaining your recommended approach. Example: "Here's how I'd integrate [TOPIC] into your sessions: [insight 1]. [insight 2]."
These are tools in your toolkit — pick the one that fits, or combine them:
Context-tied — Lessons react to whatever is happening in the current response. Best when the topic has natural bridges to coding concepts (e.g., language vocabulary from variable names, design patterns mirrored in music theory). No state tracking needed — each lesson is self-contained and memorable because the connection is fresh.
Structured curriculum — Lessons follow a predefined syllabus stored in memory, progressing through topics in a logical order. Best when the subject has a natural sequence that builds on itself (e.g., history chronologically, math from foundations to advanced). Uses a memory file to track the syllabus and current position so lessons don't repeat or jump around randomly.
Hybrid — Follow a curriculum for the core progression, but tie each lesson to the current context when possible. Good when the topic benefits from both structure and relevance.
Context-tied is the default. Most topics work well as self-contained lessons that react to the current conversation. Curriculum adds real overhead (memory file, progress tracking, state management) and should only be used when it's genuinely needed.
Choose curriculum only when understanding later material truly depends on earlier material — where jumping ahead would confuse or mislead the learner. The test: "Would lesson #15 be meaningless or wrong without lessons #1–14?" If yes, curriculum. If each lesson stands on its own, context-tied.
Examples where curriculum is justified:
Examples where context-tied is better despite seeming "structured":
Hybrid is for the rare case where there's genuine prerequisite ordering AND strong coding bridges. Don't use hybrid as a "safe middle ground" — if the topic doesn't need progression, context-tied is strictly better (simpler, no state, no overhead).
For LANGUAGE topics: Context-tied is almost always the right default. No predefined plan needed unless the user specifically wants structured grammar progression.
Store the chosen strategy as DELIVERY_STRATEGY (one of: context-tied, curriculum, hybrid).
If the user already provided a frequency, keep it. Otherwise, estimate a smart default based on how much material the topic has. The goal: lessons should last weeks at the user's likely usage rate (heavy users send hundreds of requests per day).
Estimate the topic's lesson pool — roughly how many distinct, interesting one-sentence lessons exist for this topic:
every responseevery other responseevery 3 responsesevery 5 responsesThis is a rough guide, not a formula. Use your judgment — the point is that a topic with 30 concepts shouldn't fire every response (exhausted in a day), while a language with 10,000+ words can sustain every response for months.
Store the result as FREQUENCY.
Ask with AskUserQuestion:
{
"question": "How would you like your {LANGUAGE} lessons to feel?",
"options": [
{
"label": "Context-tied vocabulary",
"description": "Translates words that appear in the current response — variable names, UI concepts, domain terms. Most memorable because the word is already in your head."
},
{
"label": "Grammar patterns",
"description": "One grammar rule per lesson with a short example. Systematic — builds structural understanding over time."
},
{
"label": "Mixed rotation",
"description": "Rotates through vocabulary, grammar, and pronunciation across responses. Broadest coverage, best for general fluency."
}
]
}
Store the answer as LANGUAGE_STYLE. It will be used in Step 7 to fill {STYLE_INSTRUCTION}.
Ask focused questions to understand what kind of lessons the user wants. Use AskUserQuestion with 3 options per question.
One of the questions should present your recommended delivery strategy and let the user confirm or adjust. For example, if you chose curriculum for "history of computing," explain why chronological progression makes sense and offer alternatives.
If the current directory is inside a git worktree, use the main repository root (not the worktree root) so the setup persists across all worktrees. Set ROOT_DIR to that path.
curriculum or hybrid)If the chosen strategy involves a structured curriculum:
Generate a syllabus — an ordered list of 15–25 units (not individual lessons). Each unit is a theme or era that should be explored across many lessons from different angles. The syllabus should reflect what was discussed in the interview (scope, focus areas, difficulty level).
Units vary in richness — some themes have dozens of fascinating stories, others have just a handful. That's fine. The goal is to keep the user engaged, not to hit a lesson count. Write unit descriptions that capture the scope of the theme so the model can judge how much material is there.
Save it as a memory file at {MEMORY_DIR}/microlearn-{TOPIC_SLUG}.md with this structure:
---