scaffold-exercises
Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.
Install command
Run on your own machine to install this skill.
npx skills add https://github.com/mattpocock/skills --skill scaffold-exercises
Use this in your own environment. Copying text here does not run it.
How to use it
- Run the install command in your project folder.
- Restart your AI client so it picks up the skill.
- Ask for a task that matches the description to try it.
SKILL.md
The instructions your assistant reads, from mattpocock/skills/skills/misc/scaffold-exercises/SKILL.md. Its authors wrote it, so read it before you install.
name: scaffold-exercises description: Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.
Scaffold Exercises
Create exercise directory structures that pass pnpm ai-hero-cli internal lint, then commit with git commit.
Directory naming
- Sections:
XX-section-name/insideexercises/(e.g.,01-retrieval-skill-building) - Exercises:
XX.YY-exercise-name/inside a section (e.g.,01.03-retrieval-with-bm25) - Section number =
XX, exercise number =XX.YY - Names are dash-case (lowercase, hyphens)
Exercise variants
Each exercise needs at least one of these subfolders:
problem/- student workspace with TODOssolution/- reference implementationexplainer/- conceptual material, no TODOs
When stubbing, default to explainer/ unless the plan specifies otherwise.
Required files
Each subfolder (problem/, solution/, explainer/) needs a readme.md that:
- Is not empty (must have real content, even a single title line works)
- Has no broken links
When stubbing, create a minimal readme with a title and a description:
# Exercise Title
Description here
If the subfolder has code, it also needs a main.ts (>1 line). But for stubs, a readme-only exercise is fine.
Workflow
- Parse the plan - extract section names, exercise names, and variant types
- Create directories -
mkdir -pfor each path - Create stub readmes - one
readme.mdper variant folder with a title - Run lint -
pnpm ai-hero-cli internal lintto validate - Fix any errors - iterate until lint passes
Lint rules summary
The linter (pnpm ai-hero-cli internal lint) checks:
- Each exercise has subfolders (
problem/,solution/,explainer/) - At least one of
problem/,explainer/, orexplainer.1/exists readme.mdexists and is non-empty in the primary subfolder- No
.gitkeepfiles - No
speaker-notes.mdfiles - No broken links in readmes
- No
pnpm run exercisecommands in readmes main.tsrequired per subfolder unless it's readme-only
Moving/renaming exercises
When renumbering or moving exercises:
- Use
git mv(notmv) to rename directories - preserves git history - Update the numeric prefix to maintain order
- Re-run lint after moves
Example:
git mv exercises/01-retrieval/01.03-embeddings exercises/01-retrieval/01.04-embeddings
Example: stubbing from a plan
Given a plan like:
Section 05: Memory Skill Building
- 05.01 Introduction to Memory
- 05.02 Short-term Memory (explainer + problem + solution)
- 05.03 Long-term Memory
Create:
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
Then create readme stubs:
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"
Security checks
Automated checks, last run Nov 30, 2026. They can miss problems and do not guarantee a listing is safe. Read the source and what you are asked to run before you use it.
6 of 6 checks passed
- PassedSetup commands and descriptionLayer 1
The install commands and description match none of the risky patterns we look for.
Source: AIWantsThis screening rules
- PassedSkill instructions (SKILL.md)Layer 1
The skill file shows no hidden text, no instruction-override phrases and no risky commands.
Source: AIWantsThis screening rules
- PassedGen Agent Trust Hub auditLayer 2
Gen Agent Trust Hub reported a pass for this skill.
Evidence (1)
- Risk level
- SAFE
- PassedSnyk auditLayer 2
Snyk reported a pass for this skill.
Evidence (2)
- Risk level
- LOW
- Audited
- Sep 15, 2026
Source: Snyk, as shown on skills.sh
- PassedSocket auditLayer 2
Socket reported a pass for this skill.
Evidence (1)
- Audited
- Sep 15, 2026
Source: Socket, as shown on skills.sh
- PassedSource repositoryLayer 2
The repository is public, not archived and has recent activity.
Evidence (3)
- Last push
- 2026-11-30
- Archived
- no
- License
- MIT
Source: GitHub