Builds and syncs Canvas course content to/from local files using canvas_sync and blueprint_sync. Handles module prerequisites, multi-course orchestration, and offline .imscc editing.
Ships in canvas-toolbox. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Manage Canvas course content as code: mirror to local files, edit locally, and update Canvas with the approved changes through the Canvas REST API.
The constitution (AGENTS.md) binds you: confirm scope before any write, and Canvas writes go through the toolkit (never a hand-rolled API call). This skill is the content-sync how.
The course folder is authoritative; Canvas is the target. Refresh from Canvas to mirror it, edit locally, update Canvas to apply. Canvas has no version history — the local files + git are your history.
This holds only if changes are made through the toolbox. Faculty who also edit in Canvas by hand break the chain. The rule for the instructor, in plain language:
canvas_sync.py --pull)
before any local edit or update. An update leaves alone any item changed in
Canvas since the last refresh and says so (Not tried), rather than erasing the Canvas
edit (#646). It replaces Canvas's version only with --overwrite <file>, and only
when the instructor says so for that file.blueprint_sync). The Master is a
preserved second copy in Canvas; the course folder stays the source of truth. A course
lives in two places, and neither is the live Course Section students are using.One course = one folder = one .env = one IDE window. At session start, read
.env, state which course ID(s) are in scope, and act on nothing else.
.env
that doesn't match: stop and ask. Do not switch, and do not "also" update the
other course.~/.canvas/config, in the user
profile with CANVAS_API_TOKEN and CANVAS_BASE_URL only (owner-only; _env_loader
reads it as a fallback). Each course keeps its own CANVAS_COURSE_ID in that
folder's .env. A course ID in the token file is ignored on purpose, so a repo with
a missing .env can't inherit the last-configured course. To enter a token, tell the instructor
the token popup is opening, then run cb_enter_token.py --popup --base-url <address>
in the background or with an 11-minute timeout (they paste it into the popup; it's
checked and saved); where no popup exists, --open, then
--check. To move one already in a .env, cb_secure_token.py (preview, then
--apply). Never read the token file, and never ask for a token in chat.enforce() refuses writes from there..env exits 2
(reads only warn). CB_COURSE_SWITCH=<id> overrides it for one command; use it only
when the instructor explicitly names that course.canvas_course_guard; restate course + target
(Master / Blueprint / Course Section) before every write.module_settings_sync's --yes skips only its typed confirmation; the course check
still runs (2.7.2).Canvas calls sometimes drop, especially in long tasks. A request that dropped may have already succeeded.
One stop rule for every tool that changes Canvas (#606): a run stops after 3 calls in a row get no answer, or are still busy after their retries. A refusal is an answer: it never counts toward the stop, and a change Canvas answers (done or refused) starts the count again. A read that answers doesn't, since Canvas can take reads and still not take changes. The run then reports Done, Not done, Unsure and Not tried (glossary: Changing Canvas). The tools below count calls, or items for the ones that send several calls per item; the rule is the same.
canvas_sync does steps 1–3 itself since 2.15.0 (#445). It retries a read or an
update through a dropped connection, printing one "trying again" line per pause. It
never re-sends a create that may have reached Canvas. Its closing lines tell you what to say:
Since 2.15.4, a file upload (canvas_sync --upload, and sync_to_new when it uploads
from local files) also sends the file again after a dropped connection. Canvas replaces
the earlier copy (same name, same folder), so a file never appears twice.
Since 2.21.1, blueprint_sync --update (master → blueprint) also retries through a
dropped connection and ends with "Not done" and "Unsure" lists, but its Unsure
advice differs from canvas_sync's: both lists are safe to run again as they are.
Its only creates are a new page and its link into a module. When a reply to one is
cut, it looks for it (the page by title, the link in its module) after 5 and 20 seconds
instead of sending it again, and the next run looks first too, so nothing is made
twice. It follows the stop rule above, and lists what it didn't try.
Since 2.21.2, the peer review tools do the same. peer_review_setup looks for a
create whose reply was cut (the assignment by title, the rubric on the assignment)
instead of sending it again; on Unsure the same command is safe to run again.
peer_review_assign doesn't send a pairing again after a lost reply; its closing line
counts what's in Canvas from a read-back. It stops after 3 pairings in a row get no
answer, and says so if it couldn't read the pairings back. Running it again is always
safe: existing pairs are skipped, and Canvas gives back the same pairing (L45).
Since 2.21.3, grading_scheme_setup does the same. Canvas can't edit a scheme, so a
create whose reply was cut is looked for by title, never sent again; on Unsure
the same command is safe to run again. If it can't check for an existing scheme, or
can't count the scored work on an assignment it was asked to attach, it stops before
changing anything that depends on that check.
| Term | What | .env id | Folder |
|---|---|---|---|
| Master | Template course where authoring happens | MASTER_COURSE_ID | master/ (or course/ legacy) |
| Blueprint | The Canvas Blueprint the Course Sections are updated from (online programs) | BLUEPRINT_COURSE_ID | blueprint/ |
| Course Section | Live per-semester course (S1, S2…) | S1_COURSE_ID, … | s1/, s2/ |
Confirm scope before every write: Master vs Blueprint vs Course Section. A stale
.env can silently target the wrong course (Canvas API lesson L12); canvas_course_guard
defends against it, but naming the target explicitly is on you.
--updateis the write flag (since 2.13.0, #493).--pushis its old spelling: it still works and prints a one-line note. Write--update.
| Task | Tool |
|---|---|
| Mirror one course (pull/update/build) | canvas_sync.py --pull / --update / --build |
| Master → Blueprint propagation | blueprint_sync.py |
| Validate a blueprint sync | validate_blueprint_sync.py + blueprint_exception_report.py |
| Module prerequisites / completion | module_settings_sync.py |
| Create a custom grading scheme, optionally attach it to assignments | grading_scheme_setup.py --preset performance-tiers [--assignment-ids 1,2] --apply (or --title ... --tiers ...) |
| Create a peer-review assignment + peer rubric (unpublished) | peer_review_setup.py --title ... --criteria "Prepared?:yesno;Effort:1-5" --apply — enrolled course needs --allow-enrolled, only on the instructor's explicit say-so |
| Pair group members as peer reviewers of each other (counts-only output) | peer_review_assign.py --title ... --group-set-id N --apply — same --allow-enrolled rule; re-run after late submissions or group changes |
| Remove a criterion from a shared rubric for some assignments only | rubric_clone_without_criterion.py --rubric-id N --drop "<criterion>" --move <aid>,<aid> (preview) → --apply; same --allow-enrolled rule as above. Refuses an assignment that already has rubric scores. |
| Report per-student peer rating averages (read-only, user_id-keyed, no names) | peer_review_summary.py --title ... [--csv out.csv] |
| Multi-course wrapper | sync_context.sh |
| Structural audit after updating Canvas | course_quality_check.py (then hand off to the audit skill) |
Always run course_quality_check.py after updating Canvas to catch duplicates, floating
items, and date-window problems the write may have introduced.
The full catalog is lib/agents/knowledge/canvas_api_lessons_learned.md.
The ones that matter here:
due_at/lock_at/unlock_at trio (L3); discussions use
todo_date, not due_at (L7).late_policy PATCH is admin-only — 403 for teacher tokens (L4).quiz_id + assignment_id); points_possible
reads 0 until questions are sent (L5, L6)..newquiz.json sidecars and --update writes their settings and question
items back (on by default; CANVAS_SYNC_ALLOW_NEWQUIZ_WRITE=false opts out,
deletions need CANVAS_SYNC_ALLOW_NEWQUIZ_DELETE=true). Stimulus/Bank/BankEntry
items are read-only.-N slug orphan Pages
and silently revert a Course Section's page bodies (L13, L14) — blueprint_orphan_pages.py detects both.-2/-4 (L15).Adding content is a two-step operation (course item + module item) — a page/ assignment isn't visible to students until it's also a module item.
New items are created unpublished and matched by title, never by id (#349):
canvas_shell_create makes one, --place puts it in modules, and --publish publishes
it once the instructor has checked it (2.21.15).
Tools read a local course/ (from canvas_sync --pull or offline_import of a
.imscc) and run identically online/offline. Offline, the .imscc is what goes back
to Canvas; course/ is the working folder. imscc_record patches your course/ edits back
into the sidecar .imscc faithfully (quiz questions / files / LTI preserved
byte-for-byte) for re-import via the Canvas UI.
| Ask | Command |
|---|---|
| "Refresh the course from Canvas" | canvas_sync.py --pull |
| "Update Canvas with my changes" | canvas_sync.py --update |
| "Update the Blueprint from the Master" | blueprint_sync.py |
| "Fix module prerequisites" | module_settings_sync.py |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
canvas-lms, course-content, blueprint-sync, content-mirroring, imscc
9 skills in this plugin
/accommodationsUse for per-student interventions in Canvas — SAS/disability accommodations, quiz time extensions, late-work grace, assignment/date exemptions, group-override recalculation, and submitting on a student's behalf. All are keyed by an opaque --deid-code or --user-id the INSTRUCTOR supplies (you never look up the name). Load this when the task is "give student X extra time / late grace / an override / an exemption", NOT grading and NOT course content./auditUse for READ-MOSTLY analysis of a Canvas course's design quality — one-command health checks (course_audit), structural checks after updating Canvas (course_quality_check), the 8-framework instructional-design audit stack, rubric quality/coverage, and blueprint exception reports. Load this when the task is "check / audit / report on" a course's structure or instructional design. (For Title IV engagement / unofficial-withdrawal compliance, use the `title-iv` skill instead.)Other plugins' skills for the same job
/ferpa-deid/canvas-toolbox:course-buildfrom canvas-toolbox
npx claudepluginhub chaz-clark/canvas-toolbox --plugin canvas-toolbox