How to turn your docs into a course with Claude Code
Published
To turn your docs into a course with Claude Code, have it read the docs, map them into a graph of concepts and prerequisites, write a lesson, worked example and practice questions for each concept, then run an automated review before anyone sees the result. Graspful is an adaptive learning platform that gives Claude Code a CLI and an MCP server for exactly this: it defines the course file, checks it with 10 quality checks, and runs the published course with a diagnostic, mastery gating and spaced review.
This guide uses real commands and real output from the Graspful CLI. You can draft and review the whole course on your machine without an account. You only sign in to import and publish.
Why not just ask Claude Code for a course?
You can. Ask Claude Code to "make a course from these docs" and it will write pages of lessons and a quiz. The problem shows up a week later. A folder of HTML or a SCORM package doesn't know what each learner already knows, doesn't stop them from moving on before they get the basics, and doesn't bring a topic back when they start to forget it. Nothing checks that every lesson has enough practice, or that the questions test what the lessons teach.
The fix is to give the agent a target with rules. In Graspful that target is a course YAML file: concepts, prerequisites, knowledge points, lessons and problems in a fixed schema. Claude Code is good at filling a schema. The CLI is good at telling it exactly what is missing.
Step 1: Install the CLI and connect Claude Code
Install the CLI. You need it for every step below.
bun add -g @graspful/cliTo let Claude Code call Graspful tools directly, add the MCP server. graspful init does it for you: it opens a browser sign-up, saves an API key, and writes the server into Claude Code's config. If you prefer to wire it by hand, the MCP setup guide has the one-line claude mcp add command. The MCP server gives Claude Code tools like graspful_scaffold_course, graspful_fill_concept, graspful_validate and graspful_review_course. The scaffold, fill, validate and review tools run offline.
Step 2: Give Claude Code one source of truth
Put the docs in the project folder as Markdown, text or PDF. Pick the official version: your handbook, the product docs, the runbook your team really follows. Leave out marketing pages and old drafts. The course will only be as accurate as what you give it.
Then tell Claude Code what you want, in plain words:
Read everything in ./docs. Build a Graspful course for new support
engineers. Start with the concept graph: list the concepts, what each one
depends on, and which doc each comes from. Don't write lessons yet.Asking for the graph first matters. A course is a set of concepts in an order where each one only needs what came before it. Graspful uses that knowledge graph to decide what each learner sees next, so a wrong prerequisite means learners get material they can't follow yet.
Step 3: Scaffold the course file
The CLI creates a valid skeleton. The --source flag records where the content came from, so reviewers and future editors can check it.
$ graspful create course --topic "Acme onboarding handbook" --hours 3 \
--source "Acme employee handbook, 2026 edition" -o course.yaml
Scaffold written to course.yamlThis is the top of the file it writes:
course:
id: acme-onboarding-handbook
name: Acme onboarding handbook
description: Adaptive course on Acme onboarding handbook
estimatedHours: 3
version: '2026.1'
sourceDocument: Acme employee handbook, 2026 edition
sections:
- id: foundations
name: Foundations
- id: application
name: Application
concepts:
- id: acme-onboarding-handbook-intro
name: Introduction to Acme onboarding handbook
section: foundations
difficulty: 2
prerequisites: []
knowledgePoints: []Now Claude Code replaces the placeholder concept with the graph from Step 2. Each concept gets an id, a section and a list of prerequisites.
Step 4: Fill one concept at a time
Each concept splits into knowledge points: small steps a learner can take one at a time. Each knowledge point follows the same pattern: a short lesson, a worked example, then practice problems. Ask Claude Code to fill one concept, check it, then move to the next. Quality drops fast when an agent writes 40 concepts in one go.
graspful fill concept course.yaml <concept-id>This adds stubs (three knowledge points with three problems each, by default) for Claude Code to write over. A good prompt for this step:
Fill the concept "refund-policy" from docs/refunds.md. Write a short
lesson for each knowledge point, one worked example, and at least three
practice problems per knowledge point at two difficulty levels. Every answer
must be checkable against the doc. Then run graspful validate.Step 5: Validate and review until it scores 10/10
graspful validate checks the file against the schema. graspful review runs the review gate: the same 10 checks that run when you publish. Here is the real output for the scaffold above, before any content is written:
$ graspful validate course.yaml
PASS course validation
fileType: course
concepts: 1
knowledgePoints: 0
problems: 0
$ graspful review course.yaml
FAIL
Score: 9/10
Stats: 1 concepts (0 authored, 1 stubs), 0 KPs, 0 problems
Failures:
[FAIL] publication_readiness: "acme-onboarding-handbook-intro" has no authored knowledge pointsEach failure names the concept and what is missing, so Claude Code can fix it and run the review again without you. These are the 10 checks:
| Check | What it catches |
|---|---|
| yaml_parses | Structure and answer keys match the course schema. |
| unique_problem_ids | Every problem ID is unique across the course. |
| publication_readiness | Every concept has teaching content and no placeholder text. |
| question_deduplication | No two questions at the same difficulty say the same thing. |
| difficulty_staircase | Each concept has problems at two or more difficulty levels. |
| problem_teaching_alignment | Questions test material the lessons actually teach. |
| problem_variant_depth | Each knowledge point has at least three practice problems. |
| instruction_formatting | Lessons over 100 words are broken up with content blocks. |
| worked_example_coverage | At least half of the concepts include a worked example. |
| import_dry_run | IDs are unique and prerequisites exist with no cycles. |
Step 6: Check the facts yourself
The review gate checks structure and coverage. It can't tell you whether a refund window is 14 days or 30. Before you publish, read the answer keys against your docs, or ask a second Claude Code session to check each answer against the source and list anything it can't find. This is the step that makes the course safe to put in front of new hires.
Step 7: Import a draft, then publish
Sign in once with graspful login (or graspful register if you skipped init). Then import the course as a draft into your org:
graspful import course.yaml --org <your-org-slug>When the draft looks right, publish it. Add --publish to the import, or run graspful publish <courseId>. Publishing runs the review gate again on the server, so a course that fails a check stays a draft.
A real example: PostHog's onboarding docs
The public Graspful repo includes a course built this way from PostHog's official documentation: technical onboarding for Technical Account Managers. Its source is recorded in the file, and anyone can run the same checks on it:
$ graspful describe content/courses/posthog-tam-onboarding.yaml
Course: "PostHog TAM Technical Onboarding" (v2026.2)
Concepts: 37 (37 authored, 0 stubs)
KPs: 79, Problems: 240
Graph depth: 11
$ graspful review content/courses/posthog-tam-onboarding.yaml
PASS
Score: 10/10
Stats: 37 concepts (37 authored, 0 stubs), 79 KPs, 240 problemsA graph depth of 11 means the longest chain of prerequisites is 11 concepts long. A learner who already knows data modeling skips the early part of that chain after the diagnostic. A learner who doesn't starts at the bottom.
What your learners get
Once published, the course runs like a tutor, not a reading list. Each learner starts with a short diagnostic that places them in the graph. They move to a new concept only after they show mastery of its prerequisites. Concepts they learned come back on a spaced review schedule, so the onboarding sticks after the first week.
| Claude Code alone | Claude Code with Graspful | |
|---|---|---|
| Output | Web pages, slides or a SCORM package | Course YAML in a fixed schema |
| Quality check | You read it | 10 automated checks, then you check facts |
| Starting point | Same for everyone | Set by a diagnostic |
| Moving on | Next page | After the prerequisites are mastered |
| Review | None unless you build it | Scheduled spaced review |
If you want a one-off reference page from your docs, Claude Code alone is enough. If people need to learn the material and keep it, give the agent a course format that can track what they know. The AI course builder overview covers the same workflow for Cursor and Codex.