scaffold-exercises

Creates lint-compliant course exercise directory structures with sections, variants, and readme stubs.

Updated Jul 30, 2026
One-click install
npx skills add https://github.com/j172/bid --skill scaffold-exercises-j172
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scaffold-exercises
Source: https://github.com/j172/bid/tree/main/agent/skills/scaffold-exercises
Command: npx skills add https://github.com/j172/bid --skill scaffold-exercises-j172

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up new course exercises by hand is error-prone: directories must follow strict numeric naming, each exercise needs specific variant subfolders, and every subfolder needs a non-empty readme that passes the project's linter. This Skill automates that scaffolding so the structure 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 stub generation: Adds problem/, solution/, and explainer/ subfolders, each with a minimal non-empty readme.md that satisfies lint rules. - Lint-driven validation: Runs pnpm ai-hero-cli internal lint, interprets failures (empty readmes, .gitkeep files, broken links, missing main.ts), and iterates until clean. - Safe renumbering: Uses git mv to move or renumber exercises while preserving git history, then re-validates. - Use Case: Given a course plan listing Section 05 with three exercises, generate all folders and readme stubs in one pass, run the linter, and commit the result. ## Quick Start Ask the agent to scaffold the exercises from your course plan into the exercises directory and run the lint check until it passes.

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?

Parse your course plan for section and exercise names, create dash-case folders like exercises/05-memory/05.01-intro/explainer with mkdir -p, add a non-empty readme.md to each variant subfolder, then run pnpm ai-hero-cli internal lint and fix any reported errors.

What folder structure does an exercise need to pass the linter?

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 longer than one line.

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

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

Why does the exercise linter fail on my new exercise?

Common causes are empty readme.md files, leftover .gitkeep or speaker-notes.md files, broken links in readmes, pnpm run exercise commands in readme text, or a missing main.ts in subfolders that contain code.

When should I use explainer versus problem and solution variants?

Use explainer/ for conceptual material with no TODOs, problem/ for the student workspace, and solution/ for the reference implementation. When stubbing exercises from a plan, default to explainer/ unless the plan specifies otherwise.