SJTU Canvas Skill
Use the bundled CLI to retrieve Canvas resources and prepare local review context. The host agent turns that context into finished study notes using its selected model provider.
Setup and credentials
Install the complete repository, including scripts/, references/, docs/, pyproject.toml, and uv.lock; a raw SKILL.md download is insufficient. Run commands from the installed skill directory. See CLI setup for dependency installation and command details.
- The CLI loads
TOKEN, optionalBASE_URL(defaulthttps://oc.sjtu.edu.cn), andOC_COOKIEfrom the skill directory's.envor the process environment. Existing environment values take precedence. - All subcommands currently pass through the Canvas token check, including video commands. Top-level
--helpneeds no credentials. MissingTOKENprompts only with an interactive terminal; non-interactive calls fail instead of waiting for input. study-note --workspacereadsOC_COOKIEfrom that workspace's.envfirst, falling back to the skill/process value. It does not loadTOKENfrom that workspace.- Before querying, check only whether credentials are present. Never print their values or read a whole
.envinto model context. Direct users to the credential guide when setup is missing. - Prefer
--jsonbefore the subcommand. Check the returned JSONstatus/messageas well as the process exit status: some existing commands report errors in JSON while exiting with code 0.
Optional OrcaRouter provider
When the user chooses OrcaRouter, read docs/orcarouter.md and use the configuration example for their host agent. The repository contains actual provider snippets in docs/providers/; installing the skill alone does not activate them.
Keep provider choice with the user. Use their own OrcaRouter API key in the host agent's credential store or environment, separately from Canvas credentials. Changing BASE_URL changes the Canvas server, not the model endpoint. The Canvas CLI does not consume ORCAROUTER_API_KEY or call model APIs.
The OrcaRouter signup link in the guide is a project referral link; disclose that the maintainer may receive a share of referred usage. Do not promise free access, a fixed model lineup, or successful revenue attribution. Only send course content to a cloud model when that use is permitted; never include credentials in prompts.
Course review workflow
- Resolve a Chinese course name with
uv run main --json list-courses. Never guess course IDs. If several courses match, show IDs and terms and ask which one to use. - Find lectures with
uv run main --json list-videos <course_id>; match lecture numbers to returned titles and video IDs. - Find materials with
uv run main --json list-files <course_id>. Use the returned file URL withdownload-fileand save into the course workspace'smaterials/. If a signed URL expires, query a fresh one. - Build context for each lecture using the matching local material:
uv run main --json study-note <course_id> --video-id '<video_id>' --material 'hand15.pdf' --workspace '/path/to/course-workspace'
- Read the resulting
study_note.mdandtranscript.txtand write the requested review notes.study_note.mdpreserves raw material text and subtitles; it is not a completed LLM summary. See workspace and output layout. - Verify generated files before reporting completion. Reuse existing materials and transcripts when available. If a lecture or subtitle is unavailable, clearly mark the gap and use only the evidence actually obtained.
download-subtitle writes transcript.txt and metadata.json. review-video is currently an alias for that workflow; neither creates an SRT or a finished review note. study-note adds study_note.md. The CLI does not automatically download a missing course material: use list-files / download-file first.
Review-note quality
Unless the user requests a shorter format, produce detailed Chinese study notes with definitions, intuition, proof logic, algorithmic motivation, complexity analysis, pitfalls, and self-test questions. Combine slide structure with the teacher's explanations and cite actual page/slide labels and video timestamps. Mark missing or noisy evidence rather than inventing citations.
Work in small verified batches (for example, one or two lectures). For existing notes, update the relevant content and stale caveats without creating competing copies. Refresh an index only from files actually present.
Other commands
The CLI also provides get-me, list-assignments, list-folders, and submit. See docs/cli.md for arguments and examples. Submit an assignment only when the user requests submission and the course, assignment, and files are identified.
Read the relevant reference when needed
- Local installation and DNS: incomplete Hermes installs, credential checks, and Windows DNS failures.
- Review workflow: course/video/material discovery, local extraction, and missing-video pitfalls.
- Batch guide workflow: a
guide.mdmapping many materials to lecture numbers, cache reuse, and index generation. - Incremental review updates: fill missing subtitles in existing notes and remove stale caveats.
- Early lecture review: combine local lecture files and teacher subtitles, handling noisy or student-report segments.
- Local rewrite and index refresh: improve existing notes from local sources and rebuild the index.
- Per-lecture workflow: one review file per course-day/lecture mapping.
- Windows review pitfalls: Git Bash paths, tool backends, and nested subtitle directories.
Keep course content and credentials private. Respect Canvas access controls and the user's requested scope. See SECURITY.md.