# Scaffold Exercises

Scaffold a graded problem set with sections, problems, worked solutions, and short "why...

- Repository: https://github.com/pedrohcgs/claude-code-my-workflow (1676 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-09-27
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add pedrohcgs/claude-code-my-workflow --skill scaffold-exercises -g -a claude-code -y`
Codex: `npx skills add pedrohcgs/claude-code-my-workflow --skill scaffold-exercises -g -a codex -y`
Cursor: `npx skills add pedrohcgs/claude-code-my-workflow --skill scaffold-exercises -g -a cursor -y`
Gemini CLI: `npx skills add pedrohcgs/claude-code-my-workflow --skill scaffold-exercises -g -a gemini-cli -y`

## Description

Scaffold a graded problem set with sections, problems, worked solutions, and short "why this matters" explainers across analytical, empirical, and coding types. Use when user says "make a problem set on X", "scaffold exercises for this lecture", "create practice problems", "generate homework with a solution key", "build a graded assignment on topic Y". Emits a clean student set plus a separate solution key, NOT for grading submissions or auto-checking student answers.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# `/scaffold-exercises`, Problem Set Scaffolder

Generate a graded problem set as two files: a clean **student set** (problems only) and a **solution key** (worked solutions + a one-line explainer per problem). Pattern imported from `mattpocock/skills`, adapted for economics teaching, the primary lens is graded coursework that mixes derivation, estimation, and code.

**Input:** `$ARGUMENTS`, a topic (e.g., "instrumental variables", "consumer theory", "quantile regression") and optional flags. See [Flags](#flags).

---

## When to use

- You have a lecture or reading and want a matching assignment with an answer key.
- You want a mix of problem types (derive, estimate, code) at a controlled difficulty, with solutions emitted **separately** so the student file stays clean.

Do **not** use this to grade submissions, auto-check answers, or build a timed exam, it scaffolds *practice/graded* material, not assessment infrastructure.

---

## Problem types

| Type | What the student does | Solution artifact |
| --- | --- | --- |
| **analytical** | Derive / prove / characterize (theory: optimization, identification, comparative statics) | Step-by-step derivation with the key lemma named |
| **empirical** | Estimate + interpret on a provided or simulated dataset | Expected estimate, sign/magnitude reasoning, common-mistake note |
| **coding** | Implement an estimator or simulation in R or Stata | Runnable reference snippet + expected output shape |

If no dataset is supplied for an empirical problem, generate a small **simulated** one with a fixed seed (YYYYMMDD) so the answer key is deterministic and reproducible.

---

## Workflow

### Phase 0: Set topic, difficulty, counts, types (Pre-Flight)

Read any source material the user points at (lecture `.tex`/`.qmd`, a paper, a dataset header) and produce a Pre-Flight Report **before** generating problems:

```markdown
## Pre-Flight Report, Problem Set

The rest: https://github.com/pedrohcgs/claude-code-my-workflow/blob/HEAD/.claude/skills/scaffold-exercises/SKILL.md
