Prompt file imported from stevekinney/stevekinney.net (
.claude/commands/create-course.md). Copyright stays with the author.
You are creating a new course in the courses/ directory. Each course follows a consistent structure. Your job is to gather the required information from the user and then scaffold the course.
Step 1: Gather Information
Use AskUserQuestion to collect the following from the user. Ask all questions in a single call when possible.
- Course title — The human-readable title (e.g., "Introduction to Testing", "React Performance").
- Course slug — The kebab-case directory name (e.g.,
testing,react-performance). Suggest one derived from the title but let the user override. - Course description — A brief description of the course content.
- Initial sections — Ask for the high-level section names that will appear in
index.toml(e.g., "The Basics", "Advanced Topics", "Next Steps"). These are just organizational headers — all lesson files live flat in the course root. - Repository URL — Optional link to a practice/lab repository on GitHub.
- Frontend Masters URL slug — Optional. If this course is on Frontend Masters, the URL path segment (e.g.,
testingforfrontendmasters.com/courses/testing/).
Step 2: Create the Course Directory
Create courses/<slug>/ with the following files:
package.json
{
"name": "@stevekinney/<slug>",
"private": true,
"type": "module",
"scripts": {
"manifest": "bun run ../../packages/scripts/generate-course-manifest.ts",
"build": "bun run manifest"
}
}
README.md
The main course landing page. Use layout: page in frontmatter.
---
title: <Course Title>
description: >-
<Course Description>
layout: page
date: <current ISO 8601 date>
modified: '<current ISO 8601 date>'
---
<If Frontend Masters URL is provided:>
The material in this course is intended to go along with the [<Course Title>](https://frontendmasters.com/courses/<fem-slug>/?utm_source=kinney&utm_medium=social&code=kinney) course with [Frontend Masters](https://frontendmasters.com/?utm_source=kinney&utm_medium=social&code=kinney).
<Course description, expanded into a paragraph.>
<If repository URL is provided:>
## Important Things
- [Practice Lab Repository](repository-url)
<Sections from index.toml mirrored here with absolute paths like `/courses/<slug>/lesson-name`>
index.toml
The table of contents file. This file organizes lessons into sections using TOML.
[[section]]
title = "<Section Name>"
[[section.item]]
title = "Lesson Title"
href = "lesson-slug.md"
Items can have optional related links for exercises and solutions:
[[section.item]]
title = "Some Topic"
href = "some-topic.md"
[[section.item.related]]
title = "Exercise"
href = "some-topic-exercise.md"
[[section.item.related]]
title = "Solution"
href = "some-topic-solution.md"
Start with the section headers the user provided. Leave them empty (no lesson links yet) — the user will add lessons later.
Step 3: Register the Workspace Dependency
Add the new course package to applications/website/package.json under "dependencies" (keep alphabetical order):
"@stevekinney/<slug>": "workspace:*"
Then run bun install from the repo root to update the lockfile and verify Turbo picks up the new workspace.
Step 4: Generate the Manifest
After creating the files, run the manifest generation script:
cd courses/<slug> && bun run manifest
Step 5: Confirm
Tell the user what was created and remind them:
- Lesson files are individual
.mdfiles placed directly in the course root (flat structure, no subdirectories for sections). - Each lesson needs frontmatter with
title,description,date, andmodifiedfields. - Optional fields:
published(boolean),tags(array of strings). - Exercises and solutions follow the pattern:
topic-exercise.mdandtopic-solution.md. - Images go in an
assets/subdirectory. - After adding lessons, link them in
index.tomlwith relative.mdhrefs and inREADME.mdwith absolute paths (/courses/<slug>/lesson-slug). - Run
bun run manifestfrom the course directory to regeneratemanifest.jsonafter changes.
