Handles Canvas grading workflows: fetching submissions, running consensus grading, reviewing feedback, updating grades/comments, de-identifying/re-identifying student data (FERPA), and managing grade standing. Includes human-in-the-loop protocol and safety gates before updating Canvas.
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.
Grading with AI is decision support, not autonomy. A human decides every grade that reaches a student. This skill is the operating manual for that discipline.
When the instructor says any of the phrases in this skill's description, run the readiness check FIRST, before asking which assignment:
uv run python lib/tools/grader_setup.py — read-only. Relay each line in plain
language. If it lists steps still to do, run it again with --apply (it only creates
the missing local pieces: guardian hook, grading/ with its own .gitignore, and
grading/.deid_master.csv). If it reports needs you, say what the line says and
stop — do not work around it (a token that Canvas rejects, a grading package not yet
installed by the toolkit update, an invalid local-only pattern). A course installed with cb_init.py --grading
has already done this once; re-running is safe. Only when it prints "Ready to grade"
ask which assignment and continue below.
Toolkit grading is done by the agent in this session (desktop app or an IDE extension, VS Code preferred) using the instructor's own AI subscription. There is no API key and no separate AI provider: the data stays in the course folder and is read by the session the instructor is already using. That is the sanctioned path, not an egress to avoid. If the instructor says "don't send this to an AI provider, just grade it," they mean no extra service beyond this session — so grade it yourself; don't refuse.
grader_grade.py. It is an optional key-holder tool that sends text to the
Anthropic API, a different vendor from the session. Faculty don't use it.A grading decision is only as good as the data under it. A stale cache — a
_computed_grades.csv from an earlier sync, a day-old export — has produced
confidently-wrong conclusions ("KC3 blocker" when 19/31 had actually completed it).
So: pull fresh Canvas data before you reason about grades, and never trust a
cache without checking its age.
The toolkit already builds this in — do NOT hand-roll a verify_data_freshness.sh or
a timestamped CSV:
grader_fetch_gradebook.py mirrors the whole gradebook, stamps it with
fetched_at, and skips the fetch only if the cache is younger than
--max-age-hours (default 6) — --force always refreshes. Use it (or its cache)
as the source of truth for gradebook-wide reasoning.grader_fetch.py re-fetches an assignment's submissions; when in doubt, re-run it
rather than reusing an old fetch.If a course keeps a computed file (final grades, standings), regenerate it from a fresh fetch each run — never read a cached custom CSV whose age you can't see.
The constitution (AGENTS.md) already binds you at all times: never read FERPA local-only files, and grades reach Canvas ONLY through a sanctioned
lib/tools/writer. This skill is the how; those are the never.
A student's grade-request letter (or self-assessment, reflection — any prose where they make a case) is comprehension data, not structured data. Never regex/NLP-extract the requested grade, the evidence, or any claim you'll repeat back to them. A parser on prose fabricates: a field script "extracted" "you requested an A" for students who asked for a C, and it reached them before anyone caught it.
Principle HG-5 of the hybrid grading architecture: the agent drafts; the instructor reviews and confirms; only then does anything post.
A TA may be that reviewer, if the instructor has authorized TA review for the course.
The gate is a human who read the work and the draft, and the instructor decides who that
may be. Nothing else changes: the same review, the same two approvals, the same tools. The
one extra rule is honesty about who reviewed: a TA's review is sent with a -ta
disclosure tag (— AI drafted, TA reviewed), never with a tag that says the instructor
reviewed. You never choose a -ta tag on your own judgment, and never to get around the
instructor: ask who is reviewing, and use the tag that is true.
You are not blocked from updating Canvas, but you may not skip the review. Run the whole flow yourself (never send the instructor to a terminal), and the instructor answers a permission prompt at TWO points: to confirm the review, and to update grades in Canvas. You cannot answer either for them, and you cannot confirm the review yourself.
grader_fetch.py --challenge-dir grading/<name> → 3-pass consensus:
you run the three passes (see "How grading runs" below), each writing
feedback/_grader<n>.csv, then grader_consensus.py. Single-pass LLM grading
drifts; consensus is the default.feedback/_all_comments.md + the per-student <KEY>.md and the old→new grade
preview right here in chat. This IS the review. Do not run
--mark-reviewed until you have actually shown the comments. Then stop and wait
for the instructor's reply (#610): grade_guardian refuses a confirm in the same
turn the review was shown, with "Read the comments first, then tell me when you're
ready."grader_push.py --challenge-dir grading/<name> --mark-reviewed --yes.
The grade_guardian hook asks a permission prompt: the instructor clicks Allow to
confirm they read _all_comments.md (Deny if you skipped showing it, #265). The
.reviewed marker records the confirmed review (it's undone if a file changes).grader_push.py --challenge-dir grading/<name> --update --yes. The
grade_guardian hook asks a second permission prompt; the instructor clicks Allow,
and that click authorizes the write (#264). No terminal, ever.grader_push --update now holds first, by default. On an AUTOMATIC posting policy
(the Canvas default) every grade and comment would be student-visible the instant it
lands, so --update switches the assignment to MANUAL posting (verified by read-back,
old policy recorded in .canvas/) before writing anything. Grades and comments are
entered and visible to the instructor in SpeedGrader, hidden from students. If the policy
can't be read or the hold doesn't stick, the run stops with nothing written (fail closed).
Except on a submission already posted (a regrade over a grade the student has seen, or
over a placeholder 0 posted earlier): Canvas shows a new grade or comment there at once,
whatever the posting policy (L51). grader_push, grader_correct and grader_push_comments
still send to those students, but name each one by key or user id in the preview and again
after sending, and the status counts them as already posted. Tell the instructor plainly
which students will see the change straight away, before they approve the run.
grader_push.py ... --mark-reviewed ... --update # holds first; entered but hidden
# (review in SpeedGrader)
grader_post_policy.py --assignment-id <id> --release --apply # post graded work; stays manual
# (--after-posting put-back puts the old policy back;
# CANVAS_AFTER_POSTING=put-back in .env makes that the default)
grader_post_policy.py --assignment-id <id> --restore --apply # OR abandon: restore without posting
grader_post_policy.py --assignment-id <id> # status: policy + hidden count (read-only)
After a held update, tell the instructor plainly: the work is in SpeedGrader, students can't
see it yet (apart from any already-posted students the run named), and posting grades is a
separate step they approve. --release --apply is the only
student-visible step and grade_guardian prompts the instructor to click before it runs;
if posting fails it does NOT restore the policy, so the work stays hidden. It prints counts
only and writes no grades or comments.
Opt out with --publish-now (no review hold) or --post (update grades, then post
grades immediately) — only when the instructor asks for that. Never add either on your own.
--allow-enrolled applies as for the other writers.
--yes is honored on every path — including AI-drafted comments (#264). You run
--mark-reviewed --yes, then, after the instructor's next message, --update --yes.
Do not tell the instructor to open a terminal or type reviewed/update canvas at a
shell; do not pipe answers on stdin.grader_push, grader_correct and
grader_post_policy take whole flag names only, so --upd can't slip past the
permission prompt as --update. Write every flag in full.--force sends rows again that the grading log says were already sent (2.10.1).
--comments-only and --regrade reuse logged rows on purpose too, each behind its own
check. Use --force only when the instructor asks for that exact re-send.grade_guardian returns an ask at BOTH --mark-reviewed and
--update, so Claude Code prompts the instructor to click at each. --yes does not
bypass these — the hook fires above the tool. This is what stops an agent from running
--mark-reviewed --yes and confirming a review the human never saw.grader_standing: the human computed them, and the prompt says so.)--regrade admits ONLY
genuine resubmissions. A comment is replaced (the toolkit's earlier one deleted) only
on the same attempt; the comment on an earlier attempt stays, and the new attempt's
comment goes beside it (#654).--regrade), rows that would LOWER an existing
grade (--allow-lower), and inactive/Test students (#61 — --include-inactive). The
fix is always a flag on the tool; a hand-written requests/python -c write skips
every safeguard and the guardian blocks it anyway.[OUTSIDE-POINTS]), and sends nothing when the
assignment's grading rubric totals something else, or when RUBRIC.md gives a
criterion different points from the Canvas rubric. Fix the grade, or fix the
assignment or rubric in Canvas (then grader_rubric_fetch.py for a fresh RUBRIC.md);
tell the instructor which numbers disagree. Never edit the points to make a grade fit.RUBRIC.md (#665).
When the assignment grades from its rubric, grader_fetch downloads nothing, and
grader_push sends nothing, until RUBRIC.md has every Canvas criterion with its
ratings and no criterion Canvas lacks (each criterion gets a rating, #583). It names
each difference; bring the rubric in again with grader_rubric_fetch.py (move the
old RUBRIC.md aside first), or the instructor fixes the rubric in Canvas.
grader_rubric_fetch.py --check runs the same check on its own and changes nothing.--comments-only. To attach feedback to
ALREADY-GRADED work (grade now, comment later) or replace a wrong comment, use
--comments-only: it sends the comment, leaves the grade untouched, bypasses the
regrade gate, and replaces the earlier comment on the same attempt so nothing stacks. Never clear
grades to "get past" the gate — that's destructive and re-opens the sync-mismatch bugs.--roster-csv. The file-keyed
update can't see a student with no submission file. --roster-csv <user_id,comment>
sends a comment only, straight to /submissions/<user_id>; their empty submission
object still accepts it. Grade untouched, and the permission prompt still asks. For an
instructor-written note there, pass --disclosure script (it's not AI-drafted).The in-chat review is the gate, not a rubber-stamp. The failure an
RCA was written about was
students getting AI-drafted grades with no review. --yes --update is the sanctioned
path now — but only because the review moved into the conversation and the guardian
prompt makes the instructor consciously approve the write. So actually show the comments
and the old→new grades and get a real "yes" before you update Canvas; never stack overrides to
skip a gate you hit.
Grades and comments reach Canvas only through grader_push.py (feedback) or
grader_standing.py (the standing column), or grader_correct.py (instructor-directed
corrections to already-graded work) — never a custom requests/curl
script, an inline python -c, or a /tmp/*.py. A direct write skips every
safeguard at once: the review gate, the duplicate-comment Andon, Test-Student
exclusion (#61), grade validation, canvas_course_guard, the disclosure tag.
Duplicate comments, grades on Test Student, and wrong grade scales in the field
were all hand-written scripts bypassing the tool.
The grade_guardian PreToolUse hook enforces this deterministically — it blocks
creating such a script (Write), editing one (Edit), and running one
(python x.py whose body writes to Canvas). If it blocks you: use the tool, or
surface the blocker to the instructor. Do not route around it.
--disclosure picks the provenance tag appended to each comment:
| kind | tag students see | when |
|---|---|---|
ai (default) | — AI drafted, instructor reviewed | AI suggested grade + wrote comment |
hybrid | — script graded, AI-drafted comment, instructor approved | script graded, AI wrote the comment |
script | — script graded, instructor reviewed | script graded, no AI in the comment |
ai-ta | — AI drafted, TA reviewed | as ai, and a TA (authorized by the instructor) did the review |
hybrid-ta | — script graded, AI-drafted comment, TA approved | as hybrid, reviewed by a TA |
script-ta | — script graded, TA reviewed | as script, reviewed by a TA |
A course that grades one way every time can set CANVAS_DISCLOSURE_DEFAULT=hybrid
in its .env and skip the flag; an explicit --disclosure still wins. The chosen
tag prints in the banner before anything is sent. It won't stack if you switch graders mid-stream.
grader_push, grader_push_comments and grader_correct all take --disclosure and
the course setting (grader_push_comments since 2.16.1, #453). A course whose TA
reviews every time sets CANVAS_DISCLOSURE_DEFAULT=ai-ta (or hybrid-ta, script-ta),
only when the instructor has authorized TA review. Words already in Canvas aren't sent
again under a different tag; to fix a wrong tag, remove that comment first
(grader_push --retract), then send it again.
When the instructor finds wrong grades on work that is already graded and not
resubmitted (grader_push --regrade refuses it), use grader_correct.py. Input is an
explicit CSV — user_id, new_grade, optional comment (instructor-supplied text). No
inference, no "all students". The preview prints a user_id-only old → new list (UP / DOWN /
FIRST / same). --update needs the grade_guardian click; overwriting a different existing
grade needs --allow-change (up or down). Comments are supersede-safe (re-runs never
stack), every write is logged to grading/.grade_corrections.md (old + new value), and the
grades are re-read from Canvas and verified. Test Student / inactive enrollments are refused
(sandbox validation only: --test-user <id> allows exactly the course's real Test Student).
Which tool updates the grades? Ask: does the assignment take a student submission?
Yes (online upload / text / quiz) → grader_push (keyed on submission files).
No (a No-Submission "Your Grade" / standing column) → grader_standing (roster-keyed
by user_id, overwrites freely, no regrade gate). Using grader_push on a No-Submission
column hits the regrade gate and dead-ends — grader_push now detects this and refuses
with a pointer here, but pick the right tool up front.
For a No-Submission column (often weighted 100%) that you compute from a syllabus
table and refresh weekly: instructor-computed, grades only, roster-keyed. It
sidesteps Canvas's auto-zero and the regrade gate. It computes nothing — your
script produces the values (from the gradebook — grader_fetch_gradebook.py mirrors
it locally, de-identified and cached, as that upstream input); the tool sends them,
a preview by default, with strict
guards (unmatched/ambiguous key → hard fail; out-of-bounds → abort; big drop →
abort unless --allow-swings).
Confirming a standing update: use --yes, NOT a terminal. Because standing is
grades only and instructor-computed (no AI-drafted feedback to review), --yes is
allowed here — the safe side of HG-5, unlike grader_push. The right flow: run the
preview, show the instructor the old → new list, and when they confirm
(e.g. they say "yes, update Canvas"), re-run with --yes yourself. Do not tell the
instructor to open a terminal and type update canvas — our audience is non-technical
faculty; that's a dead end. Their confirmation of the preview is the approval;
--yes captures it. (You still never generate the grades yourself and --yes them —
the values come from the instructor's script/CSV.)
grader_standing.py --csv standing.csv --assignment-id <id> # dry-run diff
grader_standing.py --csv standing.csv --assignment-id <id> --update --allow-enrolled
grader_standing.py --csv standing.csv --assignment-id <id> --update --yes --allow-enrolled # weekly
grader_fetch.py de-identifies submissions (strips names → opaque keys) before
anything reaches the LLM. Names live only in the gitignored keymap/master.grader_reidentify.py maps
key → user_id via .keymap.json, and is duplicate-aware (user_id → [keys]) —
one student legitimately has many keys across submission batches. Positional /
sort-order mapping is wrong and will misattribute grades.build_deid_master.py builds the course-wide .deid_master.csv (one row per
student, keyed by user_id; dedups multi-section students)..deid_master.csv, .keymap.json, .known_names.txt,
.review.csv, submissions_raw/, feedback/_grader*.csv) are never read or
displayed. Verify with wc -l / ls, never cat/head/grep._computed_grades.csv,
_gradebook_canvas.csv, _actual_grades.csv) carry names. Reading them is fine;
echoing a name out of them is not — report every student as user_id or
deid_code. See the constitution's FERPA section (named working files).A course that lists a whole directory in .claude/local_only.txt can end up
blocking the instructor-authored files inside it — the rubric, the assignment spec.
RUBRIC.md and assignment_spec.md are exempt by default. For anything else:
cat, no copying the file elsewhere).!
line, e.g. !grading/.*/PROCESS\.md. Edit .claude/local_only.txt only after
they approve.cb_update's exemption count afterward.Some courses run on another LMS entirely (Brightspace/D2L) with no API and no export — inputs are local-only: the instructor's notes/posts as files, and a roster CSV. The Canvas de-id/re-id pipeline above doesn't apply (there's no fetch step to hook a rename into), but the re-identify half does, adapted:
.claude/local_only.txt
is not Canvas-specific — it's a per-course extension point (#278). A
non-Canvas course has different name-bearing files than a Canvas one
(a roster CSV, a mixed discussion export, per-student submission .txt
files) and MUST list them there before any of this applies. An installed
hook covering none of your files is worse than no hook.local_feedback_join.py. Work
from codes: the roster's own id column (a D2L Classlist export's
OrgDefinedId, not a name) plays the same role Canvas's user_id does
elsewhere in this skill — draft results keyed by that code, never a name.local_feedback_join.py joins names back in at output time: first name
only by default, "First L." only for students who actually share a first
name (computed against the whole roster, so a student's display name is
stable run to run). Its own console output, preview and --apply alike,
never prints a name; the joined text exists only in the file --output
writes, for the instructor to open themselves.local_feedback_join.py only covers the
re-identify side once you already have code-keyed results.grade_guardian doesn't need new awareness for this: its Canvas-
write bypass detector requires BOTH an HTTP write verb (requests.post,
.put(, etc.) AND Canvas-specific submission/grade-endpoint context
(posted_grade, /assignments/.../submissions). A purely local script —
reads a roster CSV, writes a local file, makes no network calls — never
matches either, so it's never mistaken for a hand-written Canvas bypass.
The roster/notes files are still protected, generically, by the ordinary
local-only path-read block once declared above.A "final letter" workflow has two Canvas writes; do NOT hand-write a fix_push.py
(the grade_guardian hook blocks it, correctly). Keep your course-specific
computation (the letter-grade/stretch logic in calc_final_grades.py), and route both writes:
grader_standing.py: emit a
user_id,final_grade CSV, then --update --yes (instructor-computed, grades only).grader_letter_comments.py — a user_id,comment CSV → comment-only writes, no
grade change. --yes allowed because these are the instructor's own notes.AI-drafted per-student feedback is NOT a final-letter comment — that goes through
grader_push (the HG-5 review gate). grader_letter_comments is for instructor-
authored notes only.
A classic quiz with an essay/file-upload question auto-scores on submission
(workflow_state: graded) but stays in the instructor's To-Do because the manual
question is pending_review. Do NOT reach for grader_push — regrade_gate
correctly refuses (it's already graded; this isn't a grade update), and stacking
--force/--regrade is the wrong move. If that manual question is worth 0 points,
use grader_quiz_clear_pending.py: it posts a 0 to the 0-point manual question to
clear the flag — and it can't change a grade because it only ever touches 0-point
questions. If the pending question is worth points, that's real grading → SpeedGrader.
New Quizzes (since 2.16.0, #427) show the same To-Do item differently: the whole
submission is waiting (pending_review), and no API scores one question. The same
command handles it. When every essay or file-upload question is worth 0, no question
bank is used, and the quiz's grade displays as points or percentage, it sends each
waiting student's own score (entered_score) to Canvas again, which marks the
submission graded. Canvas applies the course's current late policy to that
score, so the tool works out the grade first. If the policy changed after the quiz
was scored, it leaves that student unchanged and says to use SpeedGrader. After
writing, it checks the grade Canvas returns and reports any change with ⛔. The New
Quiz's own grading view still shows the 0-point essay as not graded; only the Canvas
To-Do and gradebook are cleared. A pointed essay, a question bank, or a quiz whose
grade displays as a letter is refused with the reason, and nothing changes.
--updateis the write flag (since 2.13.0, #493).--pushis its old spelling: it still works and prints a one-line note. Thegrade_guardianpermission prompts ask on either spelling. Write--updatein every command you run.
| Ask | Command |
|---|---|
| Get ready to grade (first time, or "is it set up?") | grader_setup.py (check) → grader_setup.py --apply |
| Grade an assignment | grader_fetch.py --challenge-dir grading/<name> → consensus |
| Confirm the review | grader_push.py --challenge-dir grading/<name> --mark-reviewed |
| Update feedback in Canvas | grader_push.py --challenge-dir grading/<name> --update |
| Re-grade a resubmission | add --regrade |
| Update the "your grade" column | grader_standing.py --csv <f> --assignment-id <id> --update |
| Correct already-graded grades to exact values (up or down) | grader_correct.py --csv <f> --assignment-id <id> (preview) → --update --allow-change |
Bring an assignment's Canvas rubric into RUBRIC.md | grader_rubric_fetch.py --assignment-id <id> --challenge-dir grading/<name> (preview) → --apply |
| Rebuild the de-id master | build_deid_master.py --force |
| Mirror the live gradebook locally (feeds standing/reconcile) | grader_fetch_gradebook.py |
| Clear an auto-scored quiz (Classic or New) stuck on a 0-point manual question | grader_quiz_clear_pending.py --assignment-id <id> (preview) → --apply |
| Review in SpeedGrader before students see anything | automatic: grader_push --update holds first; then grader_post_policy.py --assignment-id <id> --release --apply |
| Join names into code-keyed feedback (no-Canvas-API course) | local_feedback_join.py --roster <csv> --results <csv> --output <csv> --apply |
Full grading knowledge: lib/agents/knowledge/grader_hybrid_architecture.md
and lib/agents/knowledge/toolkit_reuse_knowledge.md.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
/canvas-toolbox:gradingfrom canvas-toolbox
npx claudepluginhub chaz-clark/canvas-toolbox --plugin canvas-toolbox9 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.)/course-buildUse for building and syncing Canvas course CONTENT — mirroring a course to/from local files (canvas_sync --pull / --update / --build), updating the Blueprint from the Master and Course Sections from the Blueprint (blueprint_sync), module prerequisites/completion settings (module_settings_sync), multi-course orchestration, and offline (.imscc) editing. Load this when the task is "make Canvas match the course folder" or "update the Blueprint and Course Sections" — NOT grading and NOT read-only auditing./ferpa-deidUse for the de-identification / re-identification WORKFLOW — building the course-wide de-id master, de-identifying submissions or a gradebook (docx/pdf/xlsx/jupyter/databricks/text/comments) before anything reaches the LLM, re-identifying keyed results back to students, and scanning for name leaks. Load this when preparing student artifacts for AI processing or turning keyed results back into a named report. The FERPA *discipline* (never read local-only files) is constitutional and always applies; this skill is the *how* of the de-id machinery./improveUse to log, prioritize, move, or review COURSE IMPROVEMENTS — the local kanban backlog in the course's `IMPROVEMENTS.md`. Load whenever an audit surfaces findings, the user notes something to fix / try / revisit, a handoff lands action items, or you're asked "what's on the board / what's next / show the backlog / log this". Each improvement is a card that moves Backlog → Ready → In Progress → In Review → Done. This is CONTINUOUS IMPROVEMENT (kaizen) for the course — NOT continuous integration / CI pipelines / GitHub Actions./scheduled-peer-reviewSet up and validate the opt-in GitHub Actions scheduler for deterministic Canvas group peer-review pairing.