npx skills add ...
npx skills add willbooster/exercode-problem-utils --skill generate-course-materials
Use when asked to generate Exercode course materials (Exercodeの教材) such as lectures, textbooks, or embedded quizzes. Not for use outside Exercode/Judge.
npx skills add willbooster/exercode-problem-utils --skill generate-course-materials
Read these references before authoring any file:
course.yaml, and material frontmatter schemas.Confirm the course parameters with the user: topic, target audience, number of lectures, target programming language(s), and the output directory. If any are missing, ask before generating when the user is available; otherwise choose reasonable values from the context and list them as open decisions in the final report.
Write an outline first: a nested markdown bullet list covering all lectures, each bullet ending with a one-line summary. Show it to the user for approval when the user is available; otherwise proceed with your best outline.
Create the course directory structure per references/course-format.md:
<courseId>/course.yaml listing every lecture (id, name, description).<courseId>/<lectureId>/ directory per lecture. Prefix lecture IDs with zero-padded sequence numbers in course order (01_, 02_, ...), followed by a descriptive name.<courseId>/problems/<problemId>/.Write markdown material files inside each lecture directory, prefixing them with zero-padded sequence numbers that restart at 01_ in every lecture (01_, 02_, ...), following references/material-authoring.md. Write material bodies in Japanese unless the user requests another language.
Embed quiz questions in the material bodies as fenced yaml question blocks per references/question-authoring.md. Insert questions right after each newly introduced concept, not in a batch at the end.
Decide whether writing, modifying, or executing code is part of the course's learning objective. If it is, create one or more course-scoped Judge problems at meaningful checkpoints with generate-judge-problems. Each problem must require learners to apply concepts already introduced in the course; embedded questions and complete code examples do not satisfy this requirement. Link each problem near its prerequisite material as [表示名](problems/<problemId>). Every linked problem directory must exist under the same course's problems/ directory. For a course without executable coding objectives, create Judge problems only when the request requires them. Never reference another course's problems.
Validate with the exercode-problem CLI (it ships with @exercode/problem-utils, which must be a declared repository dependency — see setup-exercode-course-repository) and fix until clean:
For a course without Judge problems, omit --problems-dir (an explicitly given directory must exist); the validator then resolves problem references against the problems inside the course directory, so a dangling reference is an error. Fix every reported error and rerun. Repeat until the command reports success. Address warnings too unless they are intentional; if you keep a warning, tell the user why in the final report.
Report the created course directory, the lecture list, and any open decisions (e.g., outline items you chose without user confirmation, intentionally kept warnings).