Skip to main content

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:

chalk --install-skill

Or, if working from a local clone:

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

chalk_pypi-0.2.0.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chalk_pypi-0.2.0-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file chalk_pypi-0.2.0.tar.gz.

File metadata

  • Download URL: chalk_pypi-0.2.0.tar.gz
  • Upload date:
  • Size: 10.3 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

Hashes for chalk_pypi-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8933bd287c6964669cb829e01f1aa4e7c3bf4ea7d817557a7e070c1b42e6e59a
MD5 17eebd09ce118f7ebe5dd0121ec24162
BLAKE2b-256 4501e12db79a3d69cfd61f7566803bdc20d87f8826c159b66d772c5431e17a06

See more details on using hashes here.

File details

Details for the file chalk_pypi-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: chalk_pypi-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.3 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

Hashes for chalk_pypi-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d33055862710b0bd15b7a251ad43ab118cccc90c427ebf0416729c99a09ae998
MD5 5d8af5d44f43248a058507a2d315125c
BLAKE2b-256 84bc2ef20bac9af5eb80a2f0267ae82fec51f1331543c46f567e11356108c25c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page