From mattpocock-skills
Creates exercise directory structures (sections, problems, solutions, explainers) that pass lint checks, with templates and git-move support for renumbering.
How this skill is triggered — by the user, by Claude, or both
Slash command
/mattpocock-skills:scaffold-exercisesThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
创建能通过 `pnpm ai-hero-cli internal lint` 检查的练习目录结构,然后使用 `git commit` 提交。
创建能通过 pnpm ai-hero-cli internal lint 检查的练习目录结构,然后使用 git commit 提交。
exercises/ 下的 XX-section-name/ 格式(例如 01-retrieval-skill-building)XX.YY-exercise-name/ 格式(例如 01.03-retrieval-with-bm25)XX,练习编号 = XX.YY每个练习至少需要以下子文件夹之一:
problem/ — 学生工作区,包含 TODOsolution/ — 参考实现explainer/ — 概念讲解材料,不包含 TODO创建模板时,除非计划另有说明,否则默认使用 explainer/。
每个子文件夹(problem/、solution/、explainer/)需要一个 readme.md,要求:
创建模板时,创建一个包含标题和描述的极简 readme:
# Exercise Title
Description here
如果子文件夹包含代码,还需要一个 main.ts(超过 1 行)。但对于模板来说,仅有 readme 的练习也是可以的。
mkdir -p 创建每个路径readme.md,包含标题pnpm ai-hero-cli internal lint 进行验证linter(pnpm ai-hero-cli internal lint)检查以下内容:
problem/、solution/、explainer/)problem/、explainer/ 或 explainer.1/ 其中之一readme.md 且不为空.gitkeep 文件speaker-notes.md 文件pnpm run exercise 命令main.ts,除非仅有 readme在重新编号或移动练习时:
git mv(而不是 mv)重命名目录 — 这样可以保留 git 历史示例:
git mv exercises/01-retrieval/01.03-embeddings exercises/01-retrieval/01.04-embeddings
给定一个计划如:
Section 05: Memory Skill Building
- 05.01 Introduction to Memory
- 05.02 Short-term Memory (explainer + problem + solution)
- 05.03 Long-term Memory
创建:
mkdir -p exercises/05-memory-skill-building/05.01-introduction-to-memory/explainer
mkdir -p exercises/05-memory-skill-building/05.02-short-term-memory/{explainer,problem,solution}
mkdir -p exercises/05-memory-skill-building/05.03-long-term-memory/explainer
然后创建 readme 模板:
exercises/05-memory-skill-building/05.01-introduction-to-memory/explainer/readme.md -> "# Introduction to Memory"
exercises/05-memory-skill-building/05.02-short-term-memory/explainer/readme.md -> "# Short-term Memory"
exercises/05-memory-skill-building/05.02-short-term-memory/problem/readme.md -> "# Short-term Memory"
exercises/05-memory-skill-building/05.02-short-term-memory/solution/readme.md -> "# Short-term Memory"
exercises/05-memory-skill-building/05.03-long-term-memory/explainer/readme.md -> "# Long-term Memory"
npx claudepluginhub devcxl/mattpocock-skills-zhCreates exercise directory structures with sections, numbered exercises, and variant folders, generates stub readmes, and validates with lint. For scaffolding course exercises or stubs.
Creates exercise directories, readmes, and variant stubs that pass AI Hero CLI lint. Useful for scaffold tooling and course content automation.
Generates a file of graded practical exercises with hidden solutions for users to practice a topic or code artefact. Verifies answers against real code.