Scaffold Exercises

SkillDev tools

scaffold-exercises is a skill that lets an AI agent create exercise directory structures for a courses repository. It builds numbered dash-case section and exercise folders with readme stubs for problem, solution, or explainer variants, then runs a lint command to check the result. Use it when you want to scaffold exercises, create exercise stubs, or set up a new course section.

Use Scaffold Exercises in Claude, ChatGPT or Ahel Desktop

Free. Sign in, add Scaffold Exercises and connect your AI. About a minute.

Also: Claude Code · Cursor · Codex

Then ask your AI: use the Scaffold Exercises skill

Details

Instructions available. Your AI can read the instructions. Execution depends on the setup they require.

Have a courses repository with an exercises/ directory and the pnpm ai-hero-cli tool available.

Scaffold ExercisesStart free

What your AI can do with it

  • Create numbered section folders like 01-retrieval-skill-building inside exercises/
  • Create exercise folders like 01.03-retrieval-with-bm25 inside a section
  • Add problem/, solution/, or explainer/ subfolders with readme stubs
  • Run pnpm ai-hero-cli internal lint and fix errors until it passes
  • Commit the new structure with git commit
  • Rename or renumber folders with git mv to preserve history

Getting started

  1. Have a courses repository with an exercises/ directory and the pnpm ai-hero-cli tool available.
  2. Give the agent a plan that lists section names, exercise names, and which variants each exercise needs.
  3. Let the agent create the directories and stub readmes for each variant folder.
  4. Run pnpm ai-hero-cli internal lint and have the agent fix any errors until lint passes.
  5. Commit the result with git commit, or use git mv when renumbering existing exercises.

What this skill tells your AI

The instructions your AI receives, as published by mattpocock/skills in skills/misc/scaffold-exercises/SKILL.md and read by ahel’s review.

Create exercise directory structures that pass pnpm ai-hero-cli internal lint, then commit with git commit.

Directory naming

  • Sections: XX-section-name/ inside exercises/ (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 TODOs
  • solution/ - reference implementation
  • explainer/ - 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

  1. Parse the plan - extract section names, exercise names, and variant types
  2. Create directories - mkdir -p for each path
  3. Create stub readmes - one readme.md per variant folder with a title
  4. Run lint - pnpm ai-hero-cli internal lint to validate
  5. 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/, or explainer.1/ exists
  • readme.md exists and is non-empty in the primary subfolder
  • No .gitkeep files
  • No speaker-notes.md files
  • No broken links in readmes
  • No pnpm run exercise commands in readmes
  • main.ts required per subfolder unless it's readme-only

Moving/renaming exercises

When renumbering or moving exercises:

  1. Use git mv (not mv) to rename directories - preserves git history
  2. Update the numeric prefix to maintain order
  3. 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"

Signals

GitHub stars
273k
Forks
23k
Last commit
Sep 2026
Installs
413k installs

Questions

What does the skill create for each exercise?
It creates numbered dash-case section and exercise folders, each with at least one of problem/, solution/, or explainer/ subfolders, and a non-empty readme.md in each variant folder.
Which variant does it stub by default?
It defaults to explainer/ unless the plan specifies otherwise.
How does it handle linting?
It runs pnpm ai-hero-cli internal lint, then fixes errors and iterates until lint passes.
Advanced
Item type
skill
Key
scaffold-exercises-mattpocock
Source
github.com/mattpocock/skills