# canvas-lms-api

The canvas-lms-api skill guides Python work with the Canvas LMS REST API, from updating course modules and pages to uploading files. Use it to build or troubleshoot course content sync scripts.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf (Devin Desktop), Claude.ai · ★ 165 repo stars
- Author: aspi6246
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/aspi6246/Claude-Code-Skills-for-Academics/tree/HEAD/canvas-lms-api/SKILL.md
- Updated: 2026-08-21
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/canvas-lms-api

## What it does

The skill is a reference for using Python to manage course content through the Canvas LMS REST API. It covers creating and editing modules and pages, uploading files, and placing those files in modules. Its examples also describe syncing local HTML content against a course structure configuration.

The patterns use API requests authenticated with an access token and course ID. Before creating an object, the examples check whether it already exists, which helps avoid duplicates on repeated runs. List requests need pagination handling. For a page module item, pass its slug as `page_url`; using `content_id` causes the operation to fail silently.

Canvas access requires a domain, course ID, and API token. The examples keep credentials in `config.py` and warn against committing that file to GitHub. They create modules and pages as unpublished, so publication status matters when adapting the patterns.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add aspi6246/Claude-Code-Skills-for-Academics --skill canvas-lms-api -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/canvas-lms-api/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/canvas-lms-api/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add aspi6246/Claude-Code-Skills-for-Academics --skill canvas-lms-api -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/canvas-lms-api/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add aspi6246/Claude-Code-Skills-for-Academics --skill canvas-lms-api -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/canvas-lms-api/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install aspi6246/Claude-Code-Skills-for-Academics canvas-lms-api
```

2. **Manually: put the files in place**
- File: `.github/skills/canvas-lms-api/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add aspi6246/Claude-Code-Skills-for-Academics --skill canvas-lms-api -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/aspi6246/Claude-Code-Skills-for-Academics --path canvas-lms-api
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/canvas-lms-api/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/aspi6246/Claude-Code-Skills-for-Academics/tree/HEAD/canvas-lms-api/SKILL.md

## When to use it
- create or update course modules through the API
- sync local HTML pages with Canvas
- upload files and attach them to a module
- retrieve paginated API results

## Example prompts
- Write a Python script to sync my course's HTML pages with Canvas LMS.
- Add the uploaded files to the right module, checking for existing items first.
- Handle pagination when fetching modules through the Canvas API.

## Similar
- [canvas-lms-mcp](https://affpapa.org/en/nevibecode/mcp/canvas-lms-mcp.md) — MCP server · ★ 10 repo stars
- [canvas-mcp](https://affpapa.org/en/nevibecode/mcp/canvas-mcp.md) — MCP server · ★ 335 repo stars
- [Canvas](https://affpapa.org/en/nevibecode/mcp/canvas.md) — MCP server · 197 installs
- [cuopt-server-api-python](https://affpapa.org/en/nevibecode/skills/cuopt-server-api-python.md) — skill · 2200 installs
- [flask-api-development](https://affpapa.org/en/nevibecode/skills/flask-api-development.md) — skill · 1400 installs
- [django-rest-api-development](https://affpapa.org/en/nevibecode/skills/django-rest-api-development.md) — skill · 921 installs

From the same set: [aspi6246/claude-code-skills-for-academics](https://affpapa.org/en/nevibecode/by/aspi6246/claude-code-skills-for-academics.md) — 17 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
