scaffold-exercises

Creates lint-compliant course exercise directory structures with sections, problems, solutions, and explainers.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Fatih0234/mattpocock-skills-pi --skill scaffold-exercises-fatih0234
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: scaffold-exercises
Source: https://github.com/Fatih0234/mattpocock-skills-pi/tree/main/skills/misc/scaffold-exercises
Command: npx skills add https://github.com/Fatih0234/mattpocock-skills-pi --skill scaffold-exercises-fatih0234

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up course exercise folders by hand is error-prone: naming conventions, required readme files, and lint rules are easy to get wrong, causing failed validation runs. This Skill scaffolds the entire directory tree correctly the first time and verifies it with the linter. ## Core Features & Use Cases - Directory Scaffolding: Creates section folders (XX-section-name) and exercise folders (XX.YY-exercise-name) with problem/, solution/, and explainer/ variants following dash-case naming conventions. - Lint-Validated Output: Generates non-empty readme.md stubs and runs pnpm ai-hero-cli internal lint, iterating on fixes until validation passes. - Safe Renumbering: Uses git mv to move or renumber exercises while preserving git history, then re-validates. - Use Case: Given a course plan outlining a new section on memory skill building with three exercises, generate the full folder tree with stub readmes, pass lint, and commit the result in one workflow. ## Quick Start Scaffold the exercises from my course plan into the exercises directory and make sure they pass lint.

Frequently Asked Questions about scaffold-exercises

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scaffold course exercise directories from a plan?▼

Parse the plan to extract section names, exercise names, and variant types, then create directories with mkdir -p following the XX-section and XX.YY-exercise naming pattern. Add a stub readme.md to each variant folder and run the lint command to validate.

What files are required for a course exercise to pass linting?▼

Each exercise needs at least one of problem/, solution/, or explainer/ subfolders, and the primary subfolder must contain a non-empty readme.md with no broken links. Subfolders with code also need a main.ts file, though readme-only stubs are acceptable.

How do I rename or renumber exercises without losing git history?▼

Use git mv instead of mv to rename exercise directories, which preserves git history. Update the numeric prefix to maintain ordering, then re-run pnpm ai-hero-cli internal lint to confirm the structure still validates.

Why does exercise linting fail on newly created folders?▼

Lint fails when readme.md files are empty or missing, when .gitkeep or speaker-notes.md files exist, when readmes contain broken links or pnpm run exercise commands, or when no problem, solution, or explainer subfolder exists.

Which exercise variant should I use when stubbing content?▼

Default to the explainer/ variant when stubbing unless the plan specifies otherwise. Explainers hold conceptual material without TODOs, while problem/ is the student workspace and solution/ holds the reference implementation.