/teach 技能
通过多节层层递进的会话学习一个主题。
安装此技能
npx skills@latest add mattpocock/skills --skill=teach然后输入 /teach 来调用它。
本页内容
它的作用
teach 把你运行它的目录变成一个常驻教学工作区,并在许多 sessions,以简短独立的自包含 HTML 课程形式。
它不是基于 model already knows. It treats 参数化知识 as untrusted. Before it teaches, it finds high-trust resources, records them in RESOURCES.md, and cites them inside every lesson. It is also 有状态. The mission, the resources, the lessons and the record of what you have learned all live as files in the directory, so the next session continues from those files, not from what is left of the last conversation.
何时使用
你通过输入 /teach; the agent 不会自动调用它。
当学习本身就是项目时使用它:一门语言、一个框架、你刚加入的代码库、瑜伽、着色器、一个认证。它不是顺口解释一下的工具。
前置条件
teach builds a directory rather than producing a file, and the skill assumes one mission per workspace, so run it somewhere you are happy to give over to a single topic. Keep it out of the project you are working in. A separate repo is the best home, better than a global ~/.learnings/ folder or the working project itself. A dedicated repo also lets you commit the lessons, which is how teams have shared them.
那个目录里积累了什么:
| 路径 | 它持有 |
|---|---|
MISSION.md | Why you are learning this. Every other file depends on it. If it is missing, the first thing teach 做的是审问你,直到它不再是 |
RESOURCES.md | 它据以教学的经过审核的来源,分为知识与智慧(社区) |
lessons/*.html | The numbered lessons: the primary unit of teaching |
reference/*.html | Compressed cheat-sheets, algorithms, glossaries: the documents you return to |
learning-records/*.md | 关于你确实学到了什么的 ADR 式笔记,用于决定接下来教什么 |
assets/* | Reusable components, starting with a shared stylesheet, so the lessons look like one course |
NOTES.md | 你声明的教学偏好 |
Two notes on that list. A glossary suits most topics, but the skill ships a GLOSSARY-FORMAT.md that SKILL.md no longer links to, so you only get one if you ask (issue #559). All of it lands in the directory you ran /teach in.
存储强度,而非流畅度
用来思考的词是 存储强度:长期记忆,相对于 fluency,那种阅读时感觉已经掌握、一周后却消失殆尽的一时记忆。 teach builds the former through desirable difficulty: retrieval practice, spacing, interleaving. Knowledge comes first. At that stage difficulty works against you, because it uses up the working memory you need to understand. Then teach drills the skill through a tight feedback loop, and at that stage difficulty is the tool.
Two things decide what you get taught. The mission (the concrete real-world reason you want this) is the basis of every lesson. Without it the lessons become abstract and nothing decides what comes next. From the mission and the learning records, teach 在你的 最近发展区: hard enough to take effort, but not so far ahead that you cannot learn it.
Storage strength is also why the skill pushes back instead of agreeing. A question that needs wisdom (real-world judgement) gets an attempted answer and then a pointer to a community where you can test it. The skill does not let you skip a quiz. One user reported saying "thanks a lot" and being told the drill was not finished.
课程、参考资料与组件
A lesson 是一个自包含的 HTML 文件,短到一次坐下就能完成,与使命绑定,给出一项切实的胜利。它引用来源,推荐一份 第一手资料 让你自己去读,并链接到同类课程和参考文档。
You rarely go back to a lesson, but you do go back to reference documents. So the short form of a lesson (the syntax table, the algorithm, the pose sequence, the glossary) belongs in reference/,而不是埋在介绍它的那一课里。
课程由 components in assets/:样式表、测验组件、模拟器、图表辅助。复用是默认选项。智能体读取 assets/ before authoring a lesson and builds from what is there. It writes anything new that a second lesson could use as a component, not inline. The shared stylesheet is the first component in every workspace, and it makes the lessons look like one course instead of many unrelated pages.
常见问题
它把文件放在哪?我的最终出现在 ~/.claude/skills.
In the directory you ran /teach in (#377)。
我留在一个会话里,还是每课开一个新会话?
All three approaches work: staying in the same session, re-invoking /teach in a new session, or opening a new session in the same folder. Each lesson is its own invocation. The course state lives in the folder, not in the conversation. Common practice is to open a fresh session in the workspace and say /teach next lesson for <topic>.
我怎么知道它教的不是它编造的东西?
不能只凭技能的话。你要读第一手来源。 teach is not reliable enough to trust unchecked, and no skill built on an LLM is. The grounding (RESOURCES.md, citations in every lesson, one recommended primary source per lesson) makes it cheap to check a lesson. It does not remove the need to check. This failure has happened: one user learning a 2x2 Rubik's cube got made-up move sequences that don't solve it. In a case like that, check the model, the harness, the effort setting, and the source. Risk is highest in procedural domains with precise notation, and lowest where the output is immediately verifiable, like code you can run.
测验的正确选项总是第一个。
Several people have confirmed this on Sonnet, Opus and GLM, and it is still unfixed. SKILL.md now requires every answer to be the same number of words. That removes a different clue (the correct answer used to be the only fully-reasoned one), but says nothing about position. One contributor tested an instruction-level fix for position, and the correct answer still landed in slot A 33 times out of 33 across nine lessons (#335). So the real fix is a quiz component in assets/ that shuffles the answers, not better wording. Until that ships, ignore answer position. Your assets/ directory is yours to change, so you can ask for a component that shuffles at render time as a local fix.
它假设我已经知道一些东西,并使用了从未定义过的术语。
This is the most common real complaint. There is no assessment step. teach infers your level from the mission and the learning records, and in session one there are no learning records. One user running it inside a wayfinder pipeline put it plainly: "It never did 追问审视 to establish my starting point so it made lots of assumptions of what I already knew." Another reported lessons that used undefined jargon, and a lesson about their hardware that covered what the hardware could do but never said what it couldn't. Two things help: state your prior knowledge and your gaps in the first message, and correct the level out loud when a lesson misses, because the correction becomes a learning record and steers the next one. An explicit knowledge-assessment step is a standing feature request (#725),不是已发布的行为。
它做间隔重复吗?它知道什么时候该停止教学吗?
No to the first, and not reliably to the second. The skill designs lessons around spacing and interleaving, but nothing schedules a review, and there is no Anki or calendar integration. Users ask for both often. A related gap is exit criteria. As one user put it, teach 「擅长制作下一课,但不擅长判断何时该停下来切换到复习或真实练习。」如果你想要复习或练习而不是新材料,请主动要求;该技能不会自行提议切换。
它只对代码有用吗? No. Most reported use is outside coding: Korean, Japanese formal register, piano, guitar, board game design, OpenSCAD, film plots, Azure and CCNA certifications, university exams, and children of eight and ten getting printable books on escape rooms and fire salamanders. Nothing in the skill is specific to programming. Mission, resources, zone of proximal development and drill work the same way in any domain. Within code, users report the most value from getting oriented in an unfamiliar codebase or a new team's stack, more than from learning a language from scratch.
我该用哪个模型运行它? There is no canonical answer, and the reported differences are large. Users report that higher 推理投入 produces better lessons than the medium setting. One user ran the same skill through Copilot CLI with Codex and got a single 30-line HTML card where Claude Code produced a full lesson. It runs unmodified in Claude Cowork, if your organisation lets you add skills there. If the lessons come out thin, change model, 运行框架 或投入,再重写你的提示词。
做到以下就算成功
- 它在空目录里做的第一件事是审问你为什么想要这个,而不是产出课程。
RESOURCES.md比课程更早装满,而且每节课都点名一份值得你自己读的第一手来源。- 课程中的论断都要带出链接。没有引用的课程,就是技能在凭记忆教学。
- 一节课用一次坐下就能完成,让你学会一件之前不会的事。
- 在文件夹里开全新会话并说「下一课」,会继续课程而不是重新开始。
learning-records/增长,课程就不再重复教你已展示过的东西。- The lessons look like one course: they link the stylesheet in
assets/而不是各自携带自己的。 - 需要判断力的问题,会得到指向论坛、subreddit 或课程的指引,而不只是一个答案。
在流程中的位置
teach 是一个 随时可调用的独立技能. It is not a step in a build chain and shares no artifacts with the engineering flow; it works in its own directory for as long as you study the topic.
它唯一真正的邻居是 handoff. Together they answer "what do I do if I'm being grilled about something I don't understand?" Don't stop the grilling to learn. /handoff to a teaching workspace, learn the topic there with /teach, then go back and continue where you left off. The nearby alternative is research,用于当你想要带引用的文档而不是课程和记忆留存时。当你不确定哪个技能或流程合适时, ask-matt 为你规划整套流程。
技能操作
npx skills@latest add mattpocock/skills安装整套技能,然后在智能体中输入 /teach 来调用它。