Canvas-Agent: Instructions file for Claude Code

CLAUDE.md

Canvas-Agent CLAUDE.md is an instructions file for Claude Code from hughsibbele/Canvas-Agent. It costs 3,110 tokens per session, scanned D, original, MIT.

A project instruction file describing Canvas Agent, an MCP service that lets educators manage Canvas courses through natural-language requests. Canvas is a learning-management system used for courses, assignments, grades, and related work.

In plain words
What is it for?
Use it as guidance when developing or maintaining Canvas Agent and its teaching, administration, and extra course-management services.
Why use it?
It gives the coding agent the project’s audience, architecture, services, and setup context needed to work on the repository consistently.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions Claude Code.

This is hughsibbele/Canvas-Agent's own configuration. It tells Claude Code how to work on Canvas-Agent itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Canvas-Agent configures →

Reuse

Borrowing it

Nothing to install: this file belongs to hughsibbele/Canvas-Agent. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/hughsibbele/Canvas-Agent/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/hughsibbele/Canvas-Agent

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Canvas-Agent CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/hughsibbele/canvas-agent/claude-md.svg)](https://agentmods.dev/instructions/hughsibbele/canvas-agent/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/hughsibbele/canvas-agent/claude-md"><img src="https://agentmods.dev/badge/instructions/hughsibbele/canvas-agent/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,110 This file is loaded in full into every session.
When invoked 3,110 The same file — it is already loaded in full.
Security scan D 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.03110 $0.03110
Opus 5 $0.01555 $0.01555
Sonnet 5 $0.00622 $0.00622
Haiku 4.5 $0.00311 $0.00311

Measured 8d ago against content hash 41ff9844212b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade D, and why

Canvas-Agent CLAUDE.md scanned grade D with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- `src/vault.ts` — per-course token store at `~/.canvas-agent/vault/<host>/<course_id>.json` (chmod 600). Tracks role (`student`/`teacher`/`unknown`) merged monotonically (`teacher > student > unknown`). Known teachers s

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf ~/.npm/_npx
CLAUDE.md · 118 lines

How it starts

The opening of the file, as written. The whole thing — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Canvas Agent

Project Overview

Canvas Agent is an MCP (Model Context Protocol) server that connects Claude AI to Instructure Canvas LMS. It allows teachers and administrators to manage their Canvas courses through natural language — creating assignments, grading submissions, organizing modules, and more — just by asking Claude.

The target audience is non-technical educators. Many users will be setting up Claude for the first time. The project prioritizes ease of setup and clear, jargon-free communication.

Architecture

As of v2, Canvas Agent ships three MCP servers from one npm package, split by intent:

  • canvas-agent (core, 80 tools) — daily teaching/grading workbench. The default bin.
  • canvas-agent-admin (18 tools) — course/section/enrollment lifecycle. Mounted for setup work.
  • canvas-agent-extras (36 tools) — outcomes, groups, pages, files, classic quizzes, late policy, messaging, announcements.

The split is registration-time only — all three share the same import graph, vault, anonymizer, etc. Routing rationale and inventory live in V2_BUILD_PLAN.md.

  • Server entry points (src/servers/{core,admin,extras}.ts) — Each imports only the registrars matching its bucket and starts an MCP stdio server. cli.ts no-subcommand path delegates to servers/core.ts.
  • CLI dispatcher (src/cli.ts) — npx canvas-agent starts the core server; setup/reveal/vault-gc subcommands stay on the same bin (shared utilities, not server-mode commands). The canvas-agent-admin and canvas-agent-extras bins point directly at their server files. Don't try to "clean up" cli.ts's dual role — preserving the npx canvas-agent UX is load-bearing.
  • Canvas API client (src/canvas-client.ts) — Thin wrapper with automatic pagination, rate-limit backoff, and bearer token auth. Reads CANVAS_API_URL and CANVAS_API_TOKEN from environment variables. Routes every response through the privacy pipeline (anonymizer → name detector → sandbox) before returning. Two paginators: canvasAll(path, params) for endpoints that return a flat JSON array, and canvasAllWrapped(path, arrayKey, params) for endpoints that wrap their array under a key ({outcome_results: [...], linked: {…}}, {rollups: [...], meta: {…}}) — concatenates the array across pages and merges sibling metadata deduped by id.
  • Tool modules (src/tools/*.ts) — One file per Canvas domain. Mixed-bucket files export per-bucket registrars (e.g. registerCoursesCore + registerCoursesAdmin); single-bucket files export one (e.g. registerAssignmentsCore, registerOutcomesExtras). The meta tool describe_canvas_mcps lives in src/tools/meta.ts and is core-only — it's how the AI discovers admin/extras when a user asks for a tool that isn't loaded.
  • Privacy pipeline — Three stages, all hooked off the chokepoint in canvas-client.ts:
    • src/anonymizer.ts — token-swaps user-shaped objects (name, email, sortable_name, login_id, sibling grader_*/assessor_*/editor_* pairs, nested user/graded_by/edited_by/assessor).
    • src/name-detector.ts — replaces known student names inside free-text fields with their tokens; uses Unicode-aware word boundaries.
    • src/sandbox.ts — wraps free-text fields with per-process nonce delimiters so a downstream LLM treats student-authored content as data, not instructions.
    • src/vault.ts — per-course token store at ~/.canvas-agent/vault/<host>/<course_id>.json (chmod 600). Tracks role (student/teacher/unknown) merged monotonically (teacher > student > unknown). Known teachers skip tokenization. extractUserId(user) is the canonical "which user does this row reference?" helper — prefers user_id over id to handle Canvas's pattern of { id: <entry_id>, user_id: <real_user_id> } correctly.
  • Setup wizard (src/setup.ts) — Interactive CLI that guides users through connecting Canvas to Claude. Validates credentials, registers all three v2 bins (canvas-agent, canvas-agent-admin, canvas-agent-extras) into Claude Code / Claude Desktop / Antigravity CLI. The BINS constant + mcpServerEntry() helper at the top of the file are the seam — adding/removing bins is one place.
  • Tool-routing assertion harness (scripts/assert-tool-routing.mjs) — Boots all three split servers via the MCP SDK and asserts each exposes exactly its bucket (80 / 18 / 36) with no cross-server name collisions; also verifies the canvas-agent bin equals the core server. Run via npm test. The ADMIN/EXTRAS lists in this script are the executable contract for routing — keep in sync with V2_BUILD_PLAN.md.
  • Landing site (docs/) — Static GitHub Pages site with setup guide, feature overview, and FAQ.

Read the full file on GitHub · 118 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 118 lines · 3,110 tokens per session scan D 41ff9844212b

Subscribe to this mod's changes

Canvas-Agent CLAUDE.md is an instructions file published in the GitHub repository hughsibbele/Canvas-Agent (1 stars, last pushed 21d ago), licensed MIT. It adds 3,110 tokens to every session, about $0.0155 per session on Opus 5. A static security scan graded it D with 2 findings (asks for root, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens