Skip to content

Scaffolds numbered course section and exercise directories with explainer, problem, and solution stubs that pass the linter.

CCM score
66 of 100
skills.sh installs
5.8K
GitHub stars
6.2K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers creating section folders (XX-section-name) and exercise folders (XX.YY-exercise-name) in dash-case from a course plan
  • Creates problem/, solution/, and explainer/ variants per exercise, defaulting to explainer/ when no variant is specified
  • Enforces that each variant has a non-empty readme.md with no broken links, checked by pnpm ai-hero-cli internal lint
  • Provides git mv guidance for renumbering or moving exercises so git history is preserved, then re-running lint

Install

$ npx -y skills add vinvcn/mattpocock-skills-zh-cn --skill scaffold-exercises -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

搭建练习

创建能通过 pnpm ai-hero-cli internal lint 的 exercise directory structures,然后用 git commit 提交。

目录命名

  • Sections:exercises/ 下的 XX-section-name/(例如 01-retrieval-skill-building)
  • Exercises:section 下的 XX.YY-exercise-name/(例如 01.03-retrieval-with-bm25)
  • Section number = XX,exercise number = XX.YY
  • Names 使用 dash-case(小写、连字符)

Exercise 变体

每个 exercise 至少需要这些 subfolders 中的一个:

  • problem/ - student workspace,包含 TODOs
  • solution/ - reference implementation
  • explainer/ - conceptual material,不含 TODOs

创建 stub 时,除非 plan 指定其他 variant,否则默认使用 explainer/。

必需文件

每个 subfolder(problem/、solution/、explainer/)都需要一个 readme.md,要求:

  • 非空(必须有真实内容,即使只有一行 title 也可以)
  • 没有 broken links

创建 stub 时,生成带 title 和 description 的最小 readme:

# Exercise Title

Description here

如果 subfolder 有 code,还需要 main.ts(>1 行)。但对 stubs 来说,readme-only exercise 可以接受。

工作流

  1. Parse the plan - 提取 section names、exercise names 和 variant types
  2. Create directories - 对每个 path 执行 mkdir -p
  3. Create stub readmes - 每个 variant folder 一个带 title 的 readme.md
  4. Run lint - 执行 pnpm ai-hero-cli internal lint 验证
  5. Fix any errors - 迭代直到 lint 通过

Details

Repository
github.com/vinvcn/mattpocock-skills-zh-cn
Categories
Learning & Teaching, Technical Documentation
First seen
Jun 3, 2026

Questions

What does the scaffold-exercises skill do?

It creates exercise directory structures with sections, exercises, answers and explainers, and makes sure they pass linting. It works on course chapters, exercise stubs and new course sections in the mattpocock-skills-zh-cn repository. After creating the stubs it runs the lint command and commits the result with git.

How do I install the scaffold-exercises skill?

Run npx -y skills add vinvcn/mattpocock-skills-zh-cn --skill scaffold-exercises -y inside a project. Once installed, the agent can create exercise stubs from a course plan that you describe.

Which skills lead the scaffold-exercises skill in the Learning & Teaching category?

scaffold-exercises ranks in the top 25 on the Learning & Teaching category page. The skills listed alongside it there are teach, show-me, gws-classroom and recipe-create-classroom-course. It is most useful when you need the folder layout and lint compliance for a course.

More from vinvcn/mattpocock-skills-zh-cn

All 24

Similar to Scaffold Exercises

More Learning & Teaching