scaffold-exercises

Creates lint-compliant course exercise directories with problem, solution, and explainer subfolders.

1|Updated Jul 23, 2026
One-click install
npx skills add https://github.com/sanjanb/my-agent-harness --skill scaffold-exercises-sanjanb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scaffold-exercises
Source: https://github.com/sanjanb/my-agent-harness/tree/main/skills/mp-scaffold-exercises
Command: npx skills add https://github.com/sanjanb/my-agent-harness --skill scaffold-exercises-sanjanb

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up course exercise structures manually is error-prone: directories must follow strict naming conventions, each variant folder needs a non-empty readme, and the project linter rejects missing files, broken links, or leftover placeholder files. This Skill automates the scaffolding so every exercise passes pnpm ai-hero-cli internal lint on the first run. ## Core Features & Use Cases - Directory scaffolding: Creates section folders (XX-section-name/) and exercise folders (XX.YY-exercise-name/) with dash-case naming under exercises/. - Variant stubs: Generates problem/, solution/, and explainer/ subfolders, each with a minimal non-empty readme.md containing a title and description. - Lint validation and fixing: Runs pnpm ai-hero-cli internal lint and iterates on errors until the structure passes. - Safe renumbering: Uses git mv to rename or reorder exercises while preserving git history. - Use Case: Given a course plan listing sections and exercises, scaffold the entire 05-memory-skill-building section with explainer, problem, and solution stubs, then validate and commit. ## 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 that pass linting?

Create section folders named XX-section-name and exercise folders named XX.YY-exercise-name under exercises/, add problem, solution, or explainer subfolders each containing a non-empty readme.md, then run pnpm ai-hero-cli internal lint to validate.

What files are required in each exercise subfolder?

Each problem, solution, or explainer subfolder needs a non-empty readme.md with no broken links. If the subfolder contains code, it also needs a main.ts file with more than one line; 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 the lint command to confirm the new structure is valid.

Why does the exercise lint check fail on my new folders?

Lint failures commonly come from empty readme files, .gitkeep or speaker-notes.md files, broken links, pnpm run exercise commands in readmes, or a missing problem/explainer subfolder. Fix each reported issue and re-run the linter.

When should I use explainer versus problem and solution folders?

Use explainer for conceptual material with no TODOs, problem for the student workspace, and solution for the reference implementation. When stubbing from a plan without details, default to explainer-only folders.