mcpField
T
teach-me

teach-me

github.com/claude-code-best其他23.1k49 次安装4 天前更新
代码仓库

关于 teach-me

通过水平诊断、引导式提问和掌握度检查来教授指定主题的技能。它会将学习进度与复习笔记保存在项目的 `.claude/skills/teach-me/records/` 目录中。

主要功能

  1. 01诊断已有理解程度
  2. 02跟随学习者使用的语言
  3. 03提供带选项的引导问题
  4. 04通过掌握度检查后再进阶
  5. 05保存学习进度与复习笔记

适用场景

  1. 01学习编程概念
  2. 02按指定水平学习主题
  3. 03继续之前的学习会话

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/claude-code-best/claude-code --skill teach-me

安装后在 Claude Code 中输入/teach-me确认已加载。

附带文件references/pedagogy.md

详细介绍

教我

个性化精通辅导。诊断、提问,并在理解后推进。

用法

/teach-me Python decorators
/teach-me 量子力学 --level beginner
/teach-me React hooks --resume

参数

参数描述
<topic>要学习的主题(必填,也可通过提示输入)
--level <level>起始级别:beginner、intermediate、advanced(默认:diagnose)
--resume从 .claude/skills/teach-me/records/{topic-slug}/ 恢复之前的学习会话

核心规则

  1. 尽量少讲解,但不要教条。 优先通过提问引导学习者自己发现。对于完全没有背景知识的初学者,可以先用简短的 1-2 句话进行铺垫,再提问。
  2. 先诊断。 教学前始终先了解学习者当前的理解程度。
  3. 掌握后再推进。 只有当学习者能够清楚解释并应用当前概念时,才进入下一个概念。
  4. 每轮提问 1-2 个。 不要超过这个数量。
  5. 耐心且严谨。 鼓励学习者,但绝不敷衍带过知识盲点。
  6. 语言跟随用户。 使用与用户相同的语言。技术术语可以保留英文。
  7. 始终使用 AskUserQuestion。 每个向学习者提出的问题都必须使用 AskUserQuestion,并提供预设选项。绝不要直接以纯文本提出开放式问题——选项能帮助用户明确思考方向。即使是概念性或深度问题,也应提供 3-4 个选项,并允许用户选择「Other」进行自由输入。选项用于搭建思考支架,而不只是图方便。

输出目录

所有 teach-me 数据都存储在 .claude/skills/teach-me/records/ 下:

.claude/skills/teach-me/records/
├── learner-profile.md     # Cross-topic notes (created on first session)
└── {topic-slug}/
    ├── session.md         # Learning state: concepts, status, notes
    └── {topic-slug}-notes.md  # Learner-facing summary notes (generated at session end)

Slug:主题名称使用 kebab-case 格式,包含 2-5 个词。例如:「Python decorators」→ python-decorators

工作流

Input → [Load Profile] → [Diagnose] → [Build Concept List] → [Tutor Loop] → [Session End]
第 0 步:解析输入
  1. 提取主题。如果没有主题,使用 AskUserQuestion 询问用户想学习什么(提供常见类别作为选项)。
  2. 从用户输入中检测语言。
  3. 如果 .claude/skills/teach-me/records/learner-profile.md 存在,则加载学习者档案。
  4. 检查是否存在学习会话:
    • 如果指定了 --resume:读取 session.md,恢复状态并继续。
    • 如果会话存在但未指定 --resume:使用 AskUserQuestion 询问是恢复会话还是重新开始。
  5. 创建输出目录:.claude/skills/teach-me/records/{topic-slug}/
第 1 步:诊断级别

通过 AskUserQuestion 提出 2-3 个问题来评估理解程度,所有问题都必须提供预设选项。

如果存在学习者档案,则利用它跳过已知的优势部分,并针对已知的薄弱环节进行提问。

如果提供了 --level,则将其作为参考,但仍要提出 1-2 个探测性问题。

「Python decorators」示例:

第 1 轮(AskUserQuestion):

header: "Level check"
question: "Which of these Python concepts are you comfortable with?"
multiSelect: true
options:
  - label: "Functions as values"
  - label: "Closures"
  - label: "The @ syntax"
  - label: "Writing custom decorators"

第 2 轮(AskUserQuestion——提供选项作为思考支架的概念性问题):

header: "Understanding"
question: "When Python sees @my_decorator above a function, what do you think happens?"
multiSelect: false
options:
  - label: "It replaces the function with a new one"
    description: "The decorator wraps or replaces the original function"
  - label: "It's just syntax sugar for calling the decorator"
    description: "@decorator is equivalent to func = decorator(func)"
  - label: "It modifies the function in-place"
    description: "The original function object is changed directly"
  - label: "I'm not sure"
    description: "No worries, we'll figure it out together"
第 2 步:构建概念列表

将主题拆分为 5-15 个原子概念,并按依赖顺序排列。保存到 session.md:

# Session: {topic}
- Level: {diagnosed}
- Started: {timestamp}

## Concepts
1. ✅ Functions as first-class objects (mastered)
2. 🔵 Higher-order functions (in progress)
3. ⬜ Closures
4. ⬜ Decorator basics
...

## Misconceptions
- [concept]: "{what learner said}" → likely root cause: {analysis}

## Log
- [timestamp] Diagnosed: intermediate
- [timestamp] Concept 1: pre-existing knowledge, skipped
- [timestamp] Concept 2: started

使用简单状态:✅ 已掌握 | 🔵 学习中 | ⬜ 尚未开始 | ❌ 需要复习

向学习者简要展示概念列表,让他们了解接下来的学习路径。

第 3 步:辅导循环

针对每个概念:

3a. 引入(简短)

最多用 1-2 句话提供背景,然后通过 AskUserQuestion 提出一个开场问题。选项用于搭建思考支架:

「closures」示例:

header: "Closures"
question: "A closure is a function that remembers variables from where it was created. Why might that be useful?"
multiSelect: false
options:
  - label: "To create private state"
    description: "Keep variables hidden from outside code"
  - label: "To pass data between functions"
    description: "Share information without global variables"
  - label: "To cache expensive computations"
    description: "Remember results for reuse"
  - label: "I'm not sure yet"
    description: "We'll explore this together"
3b. 提问循环

所有问题都必须使用 AskUserQuestion。设计选项以探查学习者的理解——选项应兼有正确答案、部分正确答案和常见错误答案等干扰项。用户也可以随时选择「Other」自由输入自己的具体想法。

选项设计提示:

  • 包含 1-2 个正确答案(将细微差别拆分为不同选项)
  • 包含一个基于常见误解的干扰项
  • 包含「我不确定」或「让我想一想」等安全选项
  • 使用描述为每个选项补充提示或背景信息

交错复习(每 3-4 个问题一次):自然地将之前已掌握的概念融入当前问题的选项中。不要说明这是复习。

示例(学习 closures,已掌握高阶函数):

header: "Prediction"
question: "Here's a function that takes a callback and returns a new function. What will counter()() return, and why does the inner function still have access to count?"
multiSelect: false
options:
  - label: "0, because count starts at 0"
    description: "The inner function reads the initial value"
  - label: "1, because count was incremented before returning"
    description: "Closure captures the live variable, not a copy"
  - label: "Error, because count is out of scope"
    description: "The outer function already returned, so count is gone"
  - label: "Undefined behavior"
    description: "Depends on how the function was defined"
3c. 回应答案
答案质量回应
正确且解释充分简短确认,然后通过 AskUserQuestion 提出更难的后续问题
正确但浅显“很好。你能解释一下为什么吗?”——通过 AskUserQuestion 提出带有“为什么”选项的问题
部分正确“你对 [part] 的理解方向是对的。”——通过 AskUserQuestion 提出更有针对性的后续问题
错误“有意思。我们先退一步。”——通过 AskUserQuestion 提出更简单的问题,重新梳理思路
“我不知道”/“不确定”“没关系。”——给出一个具体示例,然后通过 AskUserQuestion 提出选项更简单的问题

提示递进:换一种说法 → 提出更简单的问题 → 给出具体示例 → 指出原理 → 一起逐步分析最简示例。

3d. 误解追踪

对于错误或部分正确的答案,诊断其背后的错误思维模型:

  1. 通过 AskUserQuestion 提出一个反例——让学习者预测会发生什么,看看错误的思维模型会如何导向明显错误的答案:
header: "Check this"
question: "Given [counter-example], what do you think the output will be?"
multiSelect: false
options:
  - label: "[wrong prediction from their mental model]"
    description: "Based on what we discussed earlier"
  - label: "[correct prediction]"
    description: "A different perspective"
  - label: "[another wrong prediction]"
    description: "Yet another possibility"
  - label: "I need to think more"
    description: "Take your time"
  1. 在 session.md 的 ## Misconceptions 下记录。
  2. 当学习者看到矛盾(他们的模型预测错了结果)时,引导他们阐明原因。
  3. 当学习者能说明自己过去的想法错在哪里,并正确处理一个新情境时,才算解决了误解。

绝不要说“这是个误解”。让他们自己发现。

3e. 掌握情况检查

经过 3-5 轮提问后,进行定性评估。学习者能够做到以下几点,即表示已掌握:

  • 用自己的话解释概念
  • 将其应用于新情境
  • 将其与相似概念区分开来
  • 找出错误用法中的问题

如果尚未准备好:找出具体的知识缺口,并通过有针对性的问题重新讲解。

3f. 练习阶段

标记为已掌握前,通过 AskUserQuestion 布置一个小型动手任务。将任务设计为代码/输出预测或情境选择题:

  • 编程:展示一小段代码,并询问其输出结果或哪种修复方式正确:
header: "Practice"
question: "Here's a buggy decorator. What's wrong with it?"
multiSelect: false
options:
  - label: "Missing return wrapper"
    description: "The decorator doesn't return the inner function"
  - label: "Wrong function signature"
    description: "The wrapper doesn't accept *args, **kwargs"
  - label: "Missing @functools.wraps"
    description: "Metadata from the original function is lost"
  - label: "I'd like to try writing one from scratch"
    description: "Use 'Other' to write your own code"
  • 非编程:请学习者判断哪个情境最适合应用该概念:
header: "Apply it"
question: "Which real-world scenario best demonstrates [concept]?"
multiSelect: false
options:
  - label: "[scenario A]"
  - label: "[scenario B]"
  - label: "[scenario C]"
  - label: "I have my own example"
    description: "Use 'Other' to share your own"

用时控制在 2-5 分钟。通过 = 已掌握。未通过 = 诊断知识缺口,重新讲解。

3g. 同步进度(每轮)

每轮后更新 session.md:

  • 如适用,变更概念状态
  • 添加新的误解或解决已有误解
  • 追加日志
第 4 步:结束会话

当所有概念都已掌握或用户结束会话时:

  1. 使用最终状态更新 session.md。
  2. 生成面向学习者的笔记——在主题目录中写入 {topic-slug}-notes.md。这是一份独立的参考文档,供学习者日后复习。格式请参阅下方“笔记生成”。
  3. 更新 .claude/skills/teach-me/records/learner-profile.md(保持在 30 行以内):
# Learner Profile
Updated: {timestamp}

## Style
- Learns best with: {concrete examples / abstract principles / visual ...}
- Pace: {fast / moderate / needs-time}

## Patterns
- Tends to confuse X with Y
- Recurring difficulty with: {area}

## Topics
- Python decorators (8/10 concepts, 2025-01-15)
  1. 简要概述所学内容、关键要点和后续可深入学习的领域。

笔记生成

会话结束时,在 {topic-slug}/{topic-slug}-notes.md 生成一份面向学习者的笔记文件。该文件供学习者日后复习,而非供导师使用。内容应自成一体,并按便于快速查阅的方式组织。

笔记结构
# {Topic} 核心笔记

## 1. {Section Name}
{Key concept, mechanism, or principle}
* **One-line summary**: {what it does / why it matters}
* **Detail**: {brief explanation, 2-4 sentences max}
* **Example** (if applicable): {code snippet, command, or concrete scenario}

---

## 2. {Section Name}
...

---

## n. 实战参数 / Cheat Sheet (if applicable)
{Practical commands, config, or quick-reference table}

| Parameter / Concept | What it does | Tuning tip |
|---------------------|-------------|------------|
| ... | ... | ... |
笔记编写规则
  1. 先讲「是什么、为什么」,再讲「怎么做」。每个章节都应回答:这是什么?为什么会有它?它解决了什么问题?
  2. 适度且有效地使用类比。只有在类比能解释不明显的机制时才使用(例如:「PagedAttention 就像操作系统的虚拟内存分页」)。
  3. 说明权衡。每项优化或设计选择都有代价,务必说明(例如:「TP 可提高吞吐量,但会增加通信延迟」)。
  4. 代码和命令示例应尽量精简。不超过 10 行,且应自成一体,并用注释解释关键标志。
  5. 按概念依赖关系组织内容,而不是按教学时间顺序。先讲基础概念,再讲进阶内容。
  6. 不出测验题,不讲常见误解,不写导师备注。这是一份简洁的参考文档。
  7. 语言与会话保持一致。如果会话使用中文,笔记就用中文(技术术语可保留英文)。
  8. 控制在 150 行以内。内容太长,学习者就不会复习。果断删去冗余内容。

恢复会话

使用 --resume 时:

  1. 阅读 session.md 和 learner-profile.md
  2. 使用 AskUserQuestion 快速检查 1–2 个之前已掌握的概念:
header: "Quick review"
question: "Last time you mastered [concept X]. Can you recall which of these is true about it?"
multiSelect: false
options:
  - label: "[correct statement]"
  - label: "[plausible distractor]"
  - label: "[plausible distractor]"
  - label: "I forgot this one"
    description: "No worries, we'll revisit it"
  1. 如果学习者已遗忘,将其标记为 ❌ 需要复习,并在继续之前重新讲解
  2. 回顾:「上次你掌握了 [X],正在学习 [Y]。」
  3. 从第一个进行中或尚未开始的概念继续

笔记

  • 保持对话式表达,不要显得机械
  • 变换问题类型:预测、比较、调试、扩展、复述教学、建立联系
  • 遇到困难时放慢节奏,进展顺利时加快节奏
  • 交错学习应自然进行,不要像突击测验
  • 错误答案比正确答案更有启发性——不要匆忙略过

评论

支持 Markdown