Explains lecture slides using Claude. For when you have the slides but not the lecture.
Project description
chalk
When self-studying university courses (e.g. CMU 15-411, MIT 6.1810), you often get lecture slides but no lecture videos. The slides alone are rarely self-contained: professors design them as visual aids for a spoken lecture, not as standalone reading material. So you scroll through a PDF, hit a slide you don't understand, and have no way to hear the explanation that was supposed to go with it.
chalk fills that gap. Point it at a lecture PDF, tell it which slides you're stuck on, and it generates a professor-style explanation. It reads all prior slides for context (not just the ones you asked about), so it understands the narrative arc of the lecture before explaining your target slides.
Two ways to use it
Claude Code (recommended)
If you use Claude Code,
the /slides skill lets Claude read the slide images directly, no API key
needed:
/slides lecture.pdf 15
/slides lecture.pdf 10-15
/slides lecture.pdf 3,7,12 What is the connection between these three slides?
This extracts pages 1 through the last requested page as PNGs, loads them into Claude's context, and explains the target slides with full awareness of everything that came before.
To make /slides available, copy the bundled skill to your global Claude
config:
mkdir -p ~/.claude/skills/slides
cp skills/slides/SKILL.md ~/.claude/skills/slides/SKILL.md
Standalone CLI
For terminal use without Claude Code. Requires an Anthropic API key:
export ANTHROPIC_API_KEY="sk-ant-..."
chalk lecture.pdf 15
chalk lecture.pdf 3-7
chalk lecture.pdf 1,3,5
chalk lecture.pdf 1-3,5,7-9
The CLI sends all slides from page 1 through your last requested page to Claude's vision API and streams the explanation to stdout.
Options:
--model MODEL Claude model to use (default: claude-sonnet-4-6)
--prompt PROMPT Custom prompt (default: "Explain these slides.")
--max-tokens N Maximum tokens in the response (default: 8192)
Examples:
chalk lecture.pdf 12 --prompt "Summarize the key equations on this slide."
chalk lecture.pdf 1-10 --max-tokens 16384
Installation
Requires Python 3.12+.
# From PyPI
pip install chalk-pypi
# or
uv tool install chalk-pypi
# From source
uv tool install git+https://github.com/fadli0029/chalk.git
Development
git clone https://github.com/fadli0029/chalk.git
cd chalk
uv sync
# Run quality checks
uv run ruff check src/ tests/
uv run ruff format --check src/ tests/
uv run mypy
uv run pytest
License
MIT. See LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chalk_pypi-0.1.0.tar.gz.
File metadata
- Download URL: chalk_pypi-0.1.0.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e9330ea5da7fb80af4dfc5f31b6b7e961e62bfcf761337b0ec4d2b51b454aec
|
|
| MD5 |
7fb952ba1bd450ed1c57b5b0d705f396
|
|
| BLAKE2b-256 |
90a25691d454d57c2b70928573d8cbb8083e9cc014cf3caf94f6201378a5fa18
|
File details
Details for the file chalk_pypi-0.1.0-py3-none-any.whl.
File metadata
- Download URL: chalk_pypi-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e78a7ce75a033f1f8f50c022f03769b471f23d239bc3223d3cfef4138a06062
|
|
| MD5 |
4080296ac3bbe4b1f3b03cdf306735da
|
|
| BLAKE2b-256 |
0f179eced9051174a6345b84351b714f66b7edd9f01de551c0de9558dd2185da
|