agentleFS
imMamdouhaboammarimMamdouhaboammar/matts-skills-into-chatgpt/skills/scaffold-exercises/SKILL.md

scaffold-exercises

Skill8 starsChanged 2 months agoMITView on GitHub

Scaffold course, workshop, or tutorial exercises following repository conventions. Use when creating exercise folders, problem/solution/explainer variants, numbered lesson files, or workshop boilerplate — even if the user says \"add a new exercise\". Do NOT use for routine application feature scaffolding.

We split this skill into the rules it gives an agent

5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 79 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Mandatory Variant Subfolders: Every exercise must contain at least one of problem/, solution/, or explainer/ (defaulting to explainer/ for …

    line 17
  2. Very specific:

    Non-Empty Readme Standards: Every variant folder must contain a non-empty readme.md with a clean # Title, description, and zero broken …

    line 18
  3. Distinctive:

    Git-Aware Moves: Always use git mv instead of raw filesystem renames when renumbering or restructuring existing exercises to preserve …

    line 19
  4. Very specific:

    Action: Create folders (mkdir -p) and populate readme.md stubs with titles and descriptions.

    line 46
  5. Very specific:

    Key Point: If code execution is involved, generate a non-empty main.ts.

    line 47

“Common” is measured: kept by at least 6 in 10 of the 79 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Scaffold Exercises

Scaffold standardized educational exercise directories, problem/solution/explainer variant subfolders, and boilerplate TypeScript modules that strictly pass repository linter rules.


Core Invariants

  1. Strict Dash-Case Numeric Hierarchy:
    • Section folders: exercises/XX-section-name/ (2-digit zero-padded number).
    • Exercise folders: exercises/XX-section-name/XX.YY-exercise-name/ (section.exercise format).
  2. Mandatory Variant Subfolders: Every exercise must contain at least one of problem/, solution/, or explainer/ (defaulting to explainer/ for stubs).
  3. Non-Empty Readme Standards: Every variant folder must contain a non-empty readme.md with a clean # Title, description, and zero broken links.
  4. Git-Aware Moves: Always use git mv instead of raw filesystem renames when renumbering or restructuring existing exercises to preserve commit history.
  5. Mandatory CLI Lint Gate: Execute and verify pnpm ai-hero-cli internal lint before concluding the scaffolding step.

Architecture & Map of Content (MOC)

[ Curriculum Plan / Outline ] ──► [ Generate Numbered Directories ] ──► [ Scaffold Variant Subfolders ] ──► [ Lint & Commit Gate ]
Variant FolderStudent PurposeRequired Files
problem/Active student workspace with // TODO: markersreadme.md, main.ts
solution/Complete reference implementationreadme.md, main.ts
explainer/Conceptual deep-dive without code tasksreadme.md

Step-by-Step Procedure (TWI)

Step 1: Parse Curriculum Plan & Compute Hierarchy

  • Action: Extract section names, exercise titles, and required variant types from the provided outline.
  • Key Point: Formulate proper 2-digit numeric prefixes (01, 02, 01.01, 01.02).
  • Why: Consistent numbering ensures exercises display in correct chronological order in the CLI and UI.

Step 2: Scaffold Directory Tree and Variant Files

  • Action: Create folders (mkdir -p) and populate readme.md stubs with titles and descriptions.
  • Key Point: If code execution is involved, generate a non-empty main.ts.
  • Inline Checklist:
    • Dash-case directory naming strictly enforced
    • Non-empty readme.md created in each variant subfolder
    • No forbidden .gitkeep or speaker-notes.md files introduced

Step 3: Run Internal Linter & Fix Issues

  • Action: Execute pnpm ai-hero-cli internal lint to validate the exercise structure.
  • Key Point: Iterate on any reported broken links or missing files until the linter passes completely.
  • Why: Pre-commit linting prevents breaking curriculum builds and automated runner harnesses.

Anti-Rationalization Guardrails

Tempting RationalizationBinding RuleEngineering Rationale
"Use raw mv when renumbering exercises."Mandatory git mv for all renames and moves.Raw moves break Git blame and make diffs unreadable in PR reviews.
"Create empty .gitkeep files in exercise folders."Forbidden. Populate meaningful readme.md stubs.Linter rules forbid .gitkeep files in exercise packages.
"Skip running pnpm ai-hero-cli internal lint on stubs."Mandatory green linter verification.Missing title headers or invalid subfolder names break downstream test runners.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.