SkillsGrove
SkillsGrove/Production vidéo/leinfinitr/sjtu-canvas-skill/sjtu-canvas-skill

sjtu-canvas-skill

Installation

$npx skills add https://github.com/leinfinitr/sjtu-canvas-skill --skill sjtu-canvas-skill
$git clone --depth 1 https://github.com/leinfinitr/sjtu-canvas-skill.git /tmp/sjtu-canvas-skill && mkdir -p ~/.claude/skills && cp -r /tmp/sjtu-canvas-skill/. ~/.claude/skills/sjtu-canvas-skill
Installe pour moi cette Agent Skill : https://github.com/leinfinitr/sjtu-canvas-skill/tree/d6a3cdd06eb51e83a61787ecceae7a084e58acfe/ — lis d’abord son SKILL.md et ses scripts, et ne l’installe dans mon dossier de compétences qu’après avoir vérifié qu’elle est sûre.

Résumé

Description d’origine · MITAccess SJTU Canvas courses, assignments, files, classroom videos and subtitles, and prepare lecture review notes from course materials. Use for Shanghai Jiao Tong University Canvas tasks and course revision.
Le SKILL.md ci-dessous est reproduit depuis leinfinitr/sjtu-canvas-skill (commit d6a3cdd) sous licence MIT. Le texte est inchangé ; seules les métadonnées d’en-tête du fichier sont omises, les images sont affichées sous forme de liens et les fichiers très longs sont tronqués. Copyright 2026 leinfinitr. Licence : LICENSE. Seul le fichier d’instructions est affiché ; consultez le dépôt d’origine pour les éventuels scripts.

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, optional BASE_URL (default https://oc.sjtu.edu.cn), and OC_COOKIE from the skill directory's .env or the process environment. Existing environment values take precedence.
  • All subcommands currently pass through the Canvas token check, including video commands. Top-level --help needs no credentials. Missing TOKEN prompts only with an interactive terminal; non-interactive calls fail instead of waiting for input.
  • study-note --workspace reads OC_COOKIE from that workspace's .env first, falling back to the skill/process value. It does not load TOKEN from that workspace.
  • Before querying, check only whether credentials are present. Never print their values or read a whole .env into model context. Direct users to the credential guide when setup is missing.
  • Prefer --json before the subcommand. Check the returned JSON status / message as 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

  1. 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.
  2. Find lectures with uv run main --json list-videos <course_id>; match lecture numbers to returned titles and video IDs.
  3. Find materials with uv run main --json list-files <course_id>. Use the returned file URL with download-file and save into the course workspace's materials/. If a signed URL expires, query a fresh one.
  4. 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'
  1. Read the resulting study_note.md and transcript.txt and write the requested review notes. study_note.md preserves raw material text and subtitles; it is not a completed LLM summary. See workspace and output layout.
  2. 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

Keep course content and credentials private. Respect Canvas access controls and the user's requested scope. See SECURITY.md.

Voir le texte intégral de la licence (MIT)
MIT License

Copyright (c) 2026 leinfinitr

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.