Scaffold Exercises

Scaffold Exercises

by:

@OpenSourceBuffGuy

📚 Education & Research

Creates course exercise folder structures with sections, problems, solutions and explainers, then runs a linter until the structure passes.

Skill files2 files

agents/

SKILL.md107 lines
1
---
2
name: scaffold-exercises
3
description: Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.
4
---
5
6
# Scaffold Exercises
7
8
Create exercise directory structures that pass `pnpm ai-hero-cli internal lint`, then commit with `git commit`.
9
10
## Directory naming
11
12
- **Sections**: `XX-section-name/` inside `exercises/` (e.g., `01-retrieval-skill-building`)
13
- **Exercises**: `XX.YY-exercise-name/` inside a section (e.g., `01.03-retrieval-with-bm25`)
14
- Section number = `XX`, exercise number = `XX.YY`
15
- Names are dash-case (lowercase, hyphens)
16
17
## Exercise variants
18
19
Each exercise needs at least one of these subfolders:
20
21
- `problem/` - student workspace with TODOs
22
- `solution/` - reference implementation
23
- `explainer/` - conceptual material, no TODOs
24
25
When stubbing, default to `explainer/` unless the plan specifies otherwise.
26
27
## Required files
28
29
Each subfolder (`problem/`, `solution/`, `explainer/`) needs a `readme.md` that:
30
31
- Is **not empty** (must have real content, even a single title line works)
32
- Has no broken links
33
34
When stubbing, create a minimal readme with a title and a description:
35
36
```md
37
# Exercise Title
38
39
Description here
40
```
41
42
If the subfolder has code, it also needs a `main.ts` (>1 line). But for stubs, a readme-only exercise is fine.
43
44
## Workflow
45
46
1. **Parse the plan** - extract section names, exercise names, and variant types
47
2. **Create directories** - `mkdir -p` for each path
48
3. **Create stub readmes** - one `readme.md` per variant folder with a title
49
4. **Run lint** - `pnpm ai-hero-cli internal lint` to validate
50
5. **Fix any errors** - iterate until lint passes
51
52
## Lint rules summary
53
54
The linter (`pnpm ai-hero-cli internal lint`) checks:
55
56
- Each exercise has subfolders (`problem/`, `solution/`, `explainer/`)
57
- At least one of `problem/`, `explainer/`, or `explainer.1/` exists
58
- `readme.md` exists and is non-empty in the primary subfolder
59
- No `.gitkeep` files
60
- No `speaker-notes.md` files
61
- No broken links in readmes
62
- No `pnpm run exercise` commands in readmes
63
- `main.ts` required per subfolder unless it's readme-only
64
65
## Moving/renaming exercises
66
67
When renumbering or moving exercises:
68
69
1. Use `git mv` (not `mv`) to rename directories - preserves git history
70
2. Update the numeric prefix to maintain order
71
3. Re-run lint after moves
72
73
Example:
74
75
```bash
76
git mv exercises/01-retrieval/01.03-embeddings exercises/01-retrieval/01.04-embeddings
77
```
78
79
## Example: stubbing from a plan
80
81
Given a plan like:
82
83
```
84
Section 05: Memory Skill Building
85
- 05.01 Introduction to Memory
86
- 05.02 Short-term Memory (explainer + problem + solution)
87
- 05.03 Long-term Memory
88
```
89
90
Create:
91
92
```bash
93
mkdir -p exercises/05-memory-skill-building/05.01-introduction-to-memory/explainer
94
mkdir -p exercises/05-memory-skill-building/05.02-short-term-memory/{explainer,problem,solution}
95
mkdir -p exercises/05-memory-skill-building/05.03-long-term-memory/explainer
96
```
97
98
Then create readme stubs:
99
100
```
101
exercises/05-memory-skill-building/05.01-introduction-to-memory/explainer/readme.md -> "# Introduction to Memory"
102
exercises/05-memory-skill-building/05.02-short-term-memory/explainer/readme.md -> "# Short-term Memory"
103
exercises/05-memory-skill-building/05.02-short-term-memory/problem/readme.md -> "# Short-term Memory"
104
exercises/05-memory-skill-building/05.02-short-term-memory/solution/readme.md -> "# Short-term Memory"
105
exercises/05-memory-skill-building/05.03-long-term-memory/explainer/readme.md -> "# Long-term Memory"
106
```
107

© Matt Pocock · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 6,373 prompts

More by @OpenSourceBuffGuy

See all
Website Clone Architect prompt image

Website Clone Architect

Reverse-engineers a website section by section, writes component specs, and hands them to parallel builder agents in git worktrees to rebuild it.

agent-skill, orchestrator, parallel-agents, multi-agent, plan-then-execute, web-development, frontend, codebase-analysis, scaffolding, css, html, nextjs, typescript, git, mcp, claude-code, for-developers, for-designers, long-form, advanced, technical-spec, task-decomposition, structured-output, design-systems, ui-ux, tool-use, checklist, report, vibe-coding

Italian Terrace Cafe Candid Portrait prompt image

Italian Terrace Cafe Candid Portrait

Generates a photorealistic candid shot of a woman in a white corset dress laughing at a sunny hotel terrace cafe, written as detailed JSON.

image-prompt, json-prompt, structured-output, photorealistic, portrait, woman, candid, fashion, cottagecore, natural-light, golden-hour, bokeh, summer, travel, cityscape, mountains, medium-shot, vibrant-colors, for-photographers, nano-banana, fashion-shoot, luxury

Night Street Photo With Leashed Cat prompt image

Night Street Photo With Leashed Cat

Generates a flash-lit night street photo of a blonde woman in a retro track jacket walking a hissing tabby cat on a leash.

image-prompt, json-prompt, nano-banana, structured-output, portrait, woman, animals, pet-portrait, night-scene, street-photography, candid, editorial, fashion, dramatic-lighting, photorealistic, vertical-format, medium-shot, graffiti, for-photographers, for-content-creators

1 view

Reviews

Loading reviews…

Discussion

Loading comments…