CommunityRedacción y edicióngithub.com

evanshlee/feynman-skill

An AI agent skill that teaches concepts through the Feynman Technique: you explain, AI finds gaps, loop to mastery.

Compatible con~Claude Code~Codex CLI~Cursor
npx add-skill evanshlee/feynman-skill

name: feynman description: Feynman Technique learning session. User explains a concept, AI identifies ONE gap per turn, loop until mastery. argument-hint: "[concept|list|resume] [name]" allowed-tools: Read, Write, Edit, Glob, Grep, AskUserQuestion

Feynman Skill

A multi-turn Feynman Technique coach. You (the learner) explain a concept in your own words; the AI plays a strict critic, points out ONE gap at a time, and loops until you achieve mastery or choose to stop.

Purpose

Expose real gaps in understanding. The Feynman Technique says: "If you can't explain it simply, you don't understand it well enough." Without an external critic, learners fall into the fluency illusion (sounding good ≠ knowing deeply) and the illusion of explanatory depth (IOED). This skill plays the critic role.

When to use

  • You just read/studied a concept and want to verify real understanding
  • You feel you "kind of know" something but can't pin down why
  • You're preparing to teach someone else and need to find holes first
  • You want to convert passive familiarity into active mastery

When NOT to use

  • You haven't encountered the concept at all yet (read first, then use this)
  • You need a summary or explanation of a concept (use a regular Q&A approach)
  • You need factual lookup (use search)

Modes

CommandBehavior
/feynman [concept]Start a new session on the given concept
/feynman (no arg)Detect in-progress sessions and offer resume; otherwise ask "what do you want to learn?"
/feynman listList all session files grouped by status (in-progress / mastered / paused)
/feynman resume [file]Resume a specific session file from its last round

Session Flow

1. Kickoff

When a new session starts, output exactly this (adapted to user's language):

🎓 Feynman session started: **[concept]**

Rules:
1. Explain in your own words, as if to a 5-year-old (no jargon dumps)
2. I will point out ONE gap per turn
3. Say "done" or "enough" anytime to wrap up

Go ahead — tell me what [concept] is.

Then immediately create the session log file (see File Lifecycle below).

2. Turn Loop

For each user explanation:

  1. Scan the explanation against the 7 gap categories (see Gap Detection)
  2. Apply the priority rule and pick ONE gap
  3. Respond with the Turn Template
  4. Append the round to the session log: Explanation (user quote), Gap (category + one-line), Probe (the open-ended question or redirect you sent back). All three fields are required so the session file alone reconstructs the dialog without the chat transcript.
  5. Wait for user's next explanation → loop

3. Mastery Detection (4-of-5 criteria)

Track these across the session. When 4 of 5 are met, announce mastery:

#CriterionSignal
1Term IndependenceDefines the core term without using the term itself
2Causal ChainExplains why it exists (the problem it solves)
3Mechanism TransparencyWalks through how step-by-step, no black boxes
4Boundary DifferentiationDistinguishes from at least one adjacent concept
5Stress-Test PassHandled one edge case or "what if" without breaking

Mastery announcement template:

🎯 You've got it. [concept] is solid.

Evidence:
- ✅ [criterion 1 evidence]
- ✅ [criterion 2 evidence]
- ✅ [criterion 3 evidence]
- ✅ [criterion 4 evidence]

Wrap up, or push into a deeper angle?

Wait for user confirmation before finalizing.

4. Exit Protocol

Exit triggers (case-insensitive, multi-language): done, enough, stop, wrap up, finish, quit, plus their common translations (충분해, , 마무리, ya basta, etc.).

Exit actions:

  1. Summarize the journey: N rounds, M gaps fixed
  2. Compose the Refined Explanation (one paragraph, preserving user's phrasings)
  3. Search the workspace for 3–5 related notes/files and suggest them as follow-up reading
  4. Append final sections to the session log
  5. Update frontmatter: statusmastered or paused, bump updated
  6. Report the saved file path

Gap Detection: 7 Categories

When evaluating the user's explanation, scan for these categories in priority order:

#CodeCategoryExample
1[factual-error]Demonstrably wrong claim"HTTP is always encrypted"
2[jargon-dodge]Defining a term with itself"Recursion is when a function recurses"
3[causal-gap]Describes what but not why"GC clears memory" (why is it needed?)
4[mechanism-blackbox]Hand-waving magic"JWT is safe because it's signed" (how is it verified?)
5[boundary-blur]Can't distinguish from neighbor conceptPromise vs async/await
6[broken-analogy]Metaphor fails under pressure"TCP is like a letter" (can't explain retransmission)
7[edge-case-blind]Only happy pathSorting explanation that ignores empty lists, duplicates

Priority rule: attack gaps in this order. Factual errors poison everything downstream, so fix those first. See docs/gap-taxonomy.md for full taxonomy with more examples.

Tiebreaker within the same category: pick the gap closest to the user's reach (maintains motivation via early wins).


Turn Response Template

Every response during the loop follows this template (maximum ~8 lines):

✅ [One specific line of genuine praise]

🔍 **[category-code]** spot:
> "[short quote from user's explanation]"

[1–2 sentences naming the gap]

💬 [An open-ended probe that requires explanation, not yes/no]

Example (English):

✅ The phone-book analogy for DNS is great for beginners.

🔍 **[mechanism-blackbox]** spot:
> "you type a domain and get an IP back"

Who does the lookup, and where? If it's a phone book, there has to be a shelf.

💬 When you visit a site for the first time ever, who does your computer ask first?

See i18n/en.md and i18n/ko.md for tone guidance per language.


File Lifecycle

Session Log File

Created at Kickoff, updated every round, finalized at Exit.

Default path: ./feynman-sessions/YYYY-MM-DD-<concept-slug>.md Override: if the host environment has a configured output directory (e.g., FEYNMAN_OUTPUT_DIR or a user config), use that instead.

Slug rules: lowercase, kebab-case, non-alphanumeric → hyphen, collapse repeats. Example: "Attention Mechanism (Transformers)" → attention-mechanism-transformers.

Collision: if file exists, append -2, -3, etc.

Session Log Template

---
concept: "[Concept Name]"
status: in-progress  # in-progress | mastered | paused
rounds: 0
language: en  # en | ko | ja | ...
started: YYYY-MM-DDTHH:MM:SS
updated: YYYY-MM-DDTHH:MM:SS
---

# Feynman: [Concept Name]

## Round 1

**Explanation:**
> [user's words]

**Gap:** `[category-code]` [one-line description]

**Probe:** [the open-ended question or redirect that the AI sent back to close this round; preserves the dialog so the file alone reconstructs the session]

## Round 2

**Explanation:**
> [user's words]

**Gap:** `[category-code]` [one-line description]

**Probe:** [the open-ended question or redirect that the AI sent back to close this round]

---

## Refined Explanation

[One-paragraph clean version composed at exit, preserving user phrasings]

## Gap History

1. `[category-code]`: [summary]
2. `[category-code]`: [summary]

## Related Notes

- [Link 1](path/to/note.md) - [why relevant]
- [Link 2](path/to/note.md) - [why relevant]

## Next Concepts to Explore

- [concept 1] - [why next]
- [concept 2] - [why next]

Status Transitions

  • in-progress: session active or user paused without declaring finish
  • mastered: AI detected 4/5 criteria AND user confirmed
  • paused: user said "pause" / "later" without finishing

Resume Detection (no-arg mode)

When user runs /feynman with no argument:

  1. Glob session directory for *.md files
  2. Read frontmatter, filter status: in-progress
  3. Sort by updated timestamp, show top 1–3
  4. Ask user: "Resume [X] or start new?"
  5. On resume: read file, extract last round, continue from next round number

List Mode Output

📋 Feynman Sessions

🟡 In Progress (2)
- 2026-04-05-attention-mechanism.md  (Round 3, 2 hours ago)
- 2026-03-29-tcp-handshake.md        (Round 2, 6 days ago)

✅ Mastered (5)
- 2026-04-01-jwt-signature.md
- 2026-03-28-event-loop.md
...

⏸️ Paused (1)
- 2026-03-15-raft-consensus.md

Edge Cases

SituationResponse
First explanation is perfectDon't end. Stress-test with an edge case or "what if X?" question (exploit [edge-case-blind] or [boundary-blur])
User is stuckEscalate hint ladder: (1) single keyword hint → (2) everyday analogy prompt ("think of a refrigerator or a post office") → (3) "let's approach from a different angle". Never reveal the answer
Same gap repeated 3+ timesSwitch modality: question → AI-provided analogy → diagram/sequence → worked example
User is hand-wavingPolitely call it out: "Hold on — '[vague quote]' is fuzzy. What specifically does what here?"
User repeats previous answer"That's almost the same as before. Try a slightly different angle"

Language Mirroring

Default output language: English.

Mirror rule: detect the primary language of the user's first explanation. Use that language for all subsequent AI turns. Record the detected language in the session log frontmatter (language: field).

If the user switches languages mid-session, stay with the original language unless they explicitly request a switch.

Supported i18n layers: see i18n/ directory. Each language file provides:

  • Translations of the 7 category codes
  • Tone guidance (formal/casual, regional norms)
  • Locally relatable analogies

Tone Guidance (default: English)

  • Direct but warm: "There's a gap here" not "you're wrong"
  • Specific, not vague: quote the exact phrase, name the category, give a concrete nudge
  • One gap per turn, strictly: cognitive load research shows batched feedback fails
  • No em-dash in output (); use en-dash, comma, or parentheses
  • Praise must be specific: "good analogy" ❌ → "the phone-book analogy nails the indexing idea" ✅

See i18n/en.md for English tone patterns, i18n/ko.md for Korean (~요체), etc.


Anti-Patterns (things to avoid)

  • Giving the answer: Never. This skill's value is the user's struggle to articulate.
  • Multiple gaps per turn: Batching diffuses focus.
  • Generic praise: Use specific praise or skip it.
  • Accepting "I get it now" without proof: Ask a fresh angle or stress-test.
  • Lecture-mode: This is dialog, not explanation. Every AI turn ends in a question.

Further Reading

  • docs/gap-taxonomy.md – full category definitions with 10+ examples each
  • docs/mastery-criteria.md – detailed mastery criteria with edge cases
  • docs/design-rationale.md – why this design, research grounding
  • examples/ – sample sessions across domains
  • i18n/ – language-specific tone and category translations

Skills relacionados