canvas-homework
Skill1 starsChanged 2 months agoMITView on GitHub
Check Canvas for outstanding assignments and either surface the assignment, or draft a response in Max's voice. Use whenever Max asks what assignments / homework / coursework he still has to do, asks to pull an assignment's instructions or files from Canvas, or asks to start/draft an assignment. Orchestrates the canvas MCP, the canvas.mjs file-download helper, the built-in docx and pdf readers, and the writing-voice skill.
In this repository4 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- canvas-quizSkill
- mylab-pearsonSkill
- myopenmathSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 6 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Prefer this for "what am I taking right now."
- Very specific: line 48
Call canvas_list_active_courses to get your current courses (and their IDs — you'll need IDs later).
- Very specific: line 50
Call search_assignments filtered to not submitted / not completed, ideally within an upcoming due-date window (e.g.
- Very specific: line 60
Call get_assignment (markdown) for the assignment Max picks.
- Distinctive: line 66
Look for an attached file, cheapest path first:
- Distinctive: line 78
If you find one, download it:
- Very specific: line 92
Read the entire DOCX with the docx skill (extract text).
- Distinctive: line 93
Do NOT edit the file: Leave it exactly as downloaded.
- Distinctive: line 96
After printing, offer (one line): *"Want me to draft a response in your voice?"* — if yes, continue into Branch B using this DOCX's …
- Distinctive: line 111
Read the context files: If the assignment references a reading or attaches a
- Very specific: line 149
Never edit a downloaded assignment file: Read it; don't write back to it.
- Very specific: line 152
If the canvas MCP isn't connected, say so and fall back to node scripts/canvas.mjs courses / files to confirm credentials work, then point …
- Very specific: line 155
If credentials are missing, canvas.mjs prints exactly what to set — relay that.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Canvas homework workflow ("Chip")
This is the harness. It connects four things: the canvas MCP server (lists and
reads assignments), the scripts/canvas.mjs helper (downloads files the MCP
can't), the built-in docx and pdf skills / Read tool (read the files), and
the writing-voice skill (draft in Max's voice). Follow the steps in order.
Tools you will use
From the canvas MCP server (this is its complete toolset):
canvas_list_active_courses— fast list of your current courses (dashboard API). Prefer this for "what am I taking right now."list_courses— all courses; use flags for completed/all. Use when you need a course that isn't on the active dashboard.search_assignments— search assignment titles/descriptions; filter by due-date range, course, and completion/submission status. Use this to find what's not done.get_assignment— full details for one assignment; ask for markdown output so the description and any embedded file links come through cleanly.
The canvas MCP cannot download attachments. That gap is filled by:
node scripts/canvas.mjs assignment-files <courseId> <assignmentId>— start here. Finds every file linked from the assignment description, its attachments, and any file sitting in the same module. Dedupes and tells you where each one came from.node scripts/canvas.mjs files <courseId> [nameFilter]— list downloadable files in a course, optionally filtered by a substring of the filename. Follows pagination, so it sees past the first 100 files.node scripts/canvas.mjs download <fileId|url> [outPath]— download one file intooutput/(resolves Canvas's signed download URL using the API token).
Reading files (all built in — do not install an MCP for these):
.docx→ thedocxskill (extract full text; never edit the source file)..pdf→ theReadtool (use thepagesparameter) or thepdfskill.
Checking a finished draft:
node scripts/lint-draft.mjs <path>— mechanically enforces the writing-voice hard guardrails (no em dashes, no markdown). Exits non-zero and prints a line:col for every violation. This is not optional; see Branch B step 4.
Step 1 — List outstanding assignments
- Call
canvas_list_active_coursesto get your current courses (and their IDs — you'll need IDs later). Fall back tolist_coursesif you need a non-active course. - Call
search_assignmentsfiltered to not submitted / not completed, ideally within an upcoming due-date window (e.g. now → +30 days). If the filter options don't cleanly express "incomplete," pull the candidates and filter by submission status / due date yourself. - Show Max a clean list: course → assignment title → due date → points. Sort by soonest due. If he just asked "what do I have left," stop here and let him pick one. Don't auto-start drafting everything.
Step 2 — Pull the chosen assignment
Call get_assignment (markdown) for the assignment Max picks. Read the description
in full. Note: the deliverable type (essay, discussion post, worksheet, short
answer), the length/format requirements, the due date, and any rubric text.
Step 3 — Find a downloadable file (usually a DOCX)
Look for an attached file, cheapest path first:
- Ask directly —
node scripts/canvas.mjs assignment-files <courseId> <assignmentId>. This covers the two cases below in one call, including files that are only reachable through the assignment's module rather than the course Files tab. Usually this is the whole step. - In the description from
get_assignment— scan for links to Canvas files (URLs containing/files/<id>orinstructure_file_linkanchors). Grab the file id or URL. - In the course files — run
node scripts/canvas.mjs files <courseId> <nameFilter>and look for a file whose name matches the assignment (e.g.files 1234 essay). Drop the filter to see everything.
If you find one, download it:
node scripts/canvas.mjs download <fileId|url> output/<sensible-name.ext>Then decide which branch you're in based on what the file actually is.
Step 4 — Branch on what you found
Branch A — a DOCX exists AND it contains the assignment
This is the "just show it to me" path.
- Read the entire DOCX with the
docxskill (extract text). - Do NOT edit the file. Leave it exactly as downloaded.
- Print the full assignment text to the console (into the chat), verbatim and complete — not a summary. If it's long, print all of it anyway; that's the point.
- After printing, offer (one line): "Want me to draft a response in your voice?" — if yes, continue into Branch B using this DOCX's contents as the prompt.
"Contains the assignment" means the DOCX is the actual prompt/instructions or a worksheet to read. If the DOCX is empty, or is just a rubric/cover sheet and the real task lives in the Canvas description, treat it as Branch B instead.
Branch B — no DOCX, the DOCX isn't the assignment, or Max asked for a draft
This is the "do it in my voice" path.
- Figure out the task. From the
get_assignmentdescription, determine exactly what has to be produced: the deliverable type, the prompt/question, required length, format, citation style, and any rubric criteria. State it back in one or two sentences so Max can confirm you understood the assignment. - Read the context files. If the assignment references a reading or attaches a
PDF (or any other format), download it via
canvas.mjs downloadand read it with theReadtool (pages) orpdfskill. Pull out the facts, quotes, and specifics you'll need so the draft is grounded in the actual source material. - Draft in Max's voice. Load the
writing-voiceskill (.claude/skills/writing-voice/SKILL.md) and write the response following it: stance-first, myth-busting, concrete numbers/examples, his punctuation and idiom habits, register matched to the assignment (academic vs. business/opinion). Hit the required length and rubric points. Obey the writing-voice hard guardrails: the draft must contain no em dashes and no markdown formatting (plain prose only). Scan the finished draft for "—", "*", "_", "#", and backticks before printing. - Save, lint, then print — in that order:
- Save it to
output/<course>-<assignment-slug>.md. - Run the guardrail linter on it:
It prints a line:col for every em dash and every markdown character, and exits non-zero if it finds any. Fix each one, save, and re-run until it printsnode scripts/lint-draft.mjs output/<course>-<assignment-slug>.mdClean. Do not print the draft to Max until the linter passes. Your own scan in step 3 is the first pass; this is the backstop, and it is the one that actually decides. - Print the full draft to the console (into the chat).
- Save it to
- Tell Max where it saved, the word count, and which rubric requirements it covers.
Step 5 — Hand-off note
End every Branch B draft with a short, honest reminder (one line, not a lecture): "This is a first draft in your voice. Read it, make it yours, and check your course's policy on AI assistance before submitting." This is Max's own writing style applied to his own assignments; the point is to beat the blank page and study, not to submit unread.
Guardrails & tips
- Never edit a downloaded assignment file. Read it; don't write back to it.
Drafts go in
output/, originals stay untouched. - Print, don't just summarize, in Branch A. Max wants the whole thing surfaced.
- If the canvas MCP isn't connected, say so and fall back to
node scripts/canvas.mjs courses/filesto confirm credentials work, then point Max atREADME.mdsetup. - If credentials are missing,
canvas.mjsprints exactly what to set — relay that. - Course IDs from
list_coursesare whatcanvas.mjs files <courseId>needs; keep track of them as you go.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

