
Scaffold Exercises
This scaffolds exercise directory structures for what looks like an AI Hero course repository, creating the section and exercise folders with the right numeric prefixes, generating stub readme files, and running a linter to make sure everything's valid before you commit. It handles the three exercise variants (problem, solution, explainer) and knows all the lint rules like non-empty readmes, no broken links, and when you need a main.ts file. The workflow is parse your plan, mkdir everything, stub out readmes with titles, lint, fix, repeat. Saves you from manually creating dozens of folders and forgetting which exercises need which variants, then discovering lint failures after the fact.
- skills.sh installs
- 5.7K
- GitHub stars
- 5.7K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add vinvcn/mattpocock-skills-zh-cn --skill scaffold-exercises --agent claude-codeInstalls into .claude/skills of the current project.
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,包含 TODOssolution/- reference implementationexplainer/- 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 可以接受。
工作流
- Parse the plan - 提取 section names、exercise names 和 variant types
- Create directories - 对每个 path 执行
mkdir -p - Create stub readmes - 每个 variant folder 一个带 title 的
readme.md - Run lint - 执行
pnpm ai-hero-cli internal lint验证 - Fix any errors - 迭代直到 lint 通过
Sponsors
Details
- Repository
- github.com/vinvcn/mattpocock-skills-zh-cn
- Category
- Automation & Workflows
- First seen
- Jun 3, 2026
More from vinvcn/mattpocock-skills-zh-cn
All 39- Setup Pre Commit5.7K
- Migrate To Shoehorn5.6K
- Teach5.4K
- Grilling4.7K
- Domain Modeling4.4K
- Code Review4.4K
- Ask Matt4.4K
- Diagnosing Bugs4.4K
- Implement4.3K
- Codebase Design4.3K
- Research4.2K
- Writing Shape3.7K
- Writing Fragments3.7K
- Writing Beats3.7K
- Resolving Merge Conflicts3.5K
- To Prd2.2K
- Design An Interface2.1K
- To Issues2.1K
- Qa2.1K
- Edit Article2.1K
- Obsidian Vault2.1K
- Request Refactor Plan2.1K
- Ubiquitous Language2.1K
- Writing Great Skills2.1K