scaffold-exercises

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

Updated May 9, 2024
One-click install
npx skills add https://github.com/AceCodePt/dotfiles --skill scaffold-exercises-acecodept
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: scaffold-exercises
Source: https://github.com/AceCodePt/dotfiles/tree/main/.config/opencode/skills/scaffold-exercises
Command: npx skills add https://github.com/AceCodePt/dotfiles --skill scaffold-exercises-acecodept

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Manually creating course exercise folders that satisfy strict linting rules is error-prone and repetitive. This Skill scaffolds section and exercise directories with the correct naming, subfolders, and readme stubs so they pass pnpm ai-hero-cli internal lint on the first run. ## Core Features & Use Cases - Directory Scaffolding: Creates numbered section folders (XX-section-name) and exercise folders (XX.YY-exercise-name) with dash-case naming. - Variant Support: Generates problem/, solution/, and explainer/ subfolders, each with a non-empty readme.md stub. - Lint Validation: Runs pnpm ai-hero-cli internal lint and iterates on errors until the structure passes. - Safe Renaming: Uses git mv to renumber or move exercises while preserving git history. - Use Case: Given a course plan listing sections and exercises, scaffold the entire exercises/ tree with stub readmes, validate it with the linter, and commit the result. ## Quick Start Scaffold the exercises from my course plan into the exercises directory and make sure they pass linting.

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 numbered section folders like `01-retrieval/` containing exercise folders like `01.03-embeddings/`, each with a `problem/`, `solution/`, or `explainer/` subfolder holding a non-empty `readme.md`. Then run `pnpm ai-hero-cli internal lint` to validate the structure.

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` with more than one line, though readme-only stubs are acceptable.

Why does the exercise linter reject my directory structure?▼

Common failures include empty readme files, `.gitkeep` or `speaker-notes.md` files, broken links, `pnpm run exercise` commands in readmes, or missing `problem/`/`explainer/` subfolders. Fix each reported error and re-run the lint command.

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

Use `git mv` instead of `mv` to rename exercise directories, which preserves version history. Update the numeric prefix to maintain ordering, then re-run the linter to confirm the new structure still passes.

When should I use explainer versus problem subfolders?▼

Use `explainer/` for conceptual material without TODOs and `problem/` for student workspaces containing tasks. When stubbing exercises from a plan, default to `explainer/` unless the plan explicitly specifies other variants.