Extract an online video course (Dometrain, Teachable; Pluralsight/Udemy recognized without adapter) lesson by lesson into repository recommendations. Use when: 'digest a course', 'analyze an extracted course', 'resume a course digest', or given a course URL (extract/analyze/status/resume). Not for one public video: /knowledge:video-digest.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Course Digest?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/melodic-software-course-digest)
---
description: "Extract an online video course (Dometrain, Teachable; Pluralsight/Udemy recognized without adapter) lesson by lesson into repository recommendations. Use when: 'digest a course', 'analyze an extracted course', 'resume a course digest', or given a course URL (extract/analyze/status/resume). Not for one public video: /knowledge:video-digest."
argument-hint: "[extract|analyze|status|resume|continue] [url|slug]"
user-invocable: true
disable-model-invocation: false
shell: bash
---
# Course Digest
**Arguments.** `[extract|analyze|status|resume|continue] [url|slug]`. e.g., /knowledge:course-digest `<url>`, /knowledge:course-digest extract `<url>`, /knowledge:course-digest resume `<slug>`, /knowledge:course-digest status
## Pre-computed context
```!
printf 'course-extraction deps: '; node -e "const fs=require('fs'),path=require('path'),p=process.argv[1];console.log(p&&fs.existsSync(path.join(p,'node_modules','@melodic','video-digestion'))?'installed':'MISSING - run setup-deps.mjs (see Prerequisites)')" "${CLAUDE_PLUGIN_DATA}" 2>/dev/null || echo "MISSING - node not found (see Prerequisites)"
printf 'Playwright Chromium: '; node -e "const fs=require('fs'),path=require('path');const b=process.env.PLAYWRIGHT_BROWSERS_PATH||(process.argv[1]&&path.join(process.argv[1],'ms-playwright'));const ok=b&&fs.existsSync(b)&&fs.readdirSync(b).some(n=>n.startsWith('chromium'));console.log(ok?'installed':'MISSING - run setup-deps.mjs (see Prerequisites)')" "${CLAUDE_PLUGIN_DATA}" 2>/dev/null || echo "MISSING - node not found (see Prerequisites)"
printf 'ffmpeg: '; command -v ffmpeg >/dev/null 2>&1 && ffmpeg -version 2>/dev/null | head -1 || command -v ffmpeg >/dev/null 2>&1 || echo "MISSING — install ffmpeg (see Prerequisites)"
printf 'ImageMagick: '; command -v magick >/dev/null 2>&1 && magick -version 2>/dev/null | head -1 || command -v magick >/dev/null 2>&1 || echo "MISSING — install ImageMagick 7 (see Prerequisites)"
```
Transform online video courses into structured knowledge and actionable repo recommendations, without watching a single video.
## How it works
Uses browser automation (Playwright, driven by the extraction scripts) to navigate course platforms, extract transcripts, capture screenshots of code/slides, and collect downloadable resources. Synthesizes raw content into analysis focused on what applies to the current repository.
Where this skill says "deeper research," use whatever external-research capability your project provides. Repo conventions override course claims. Surface convention conflicts explicitly; never silently adopt a course's shortcut over team rules.
## Emit checklist
For any course digest run (multi-phase content acquisition + distillation + repo-applicability analysis), copy `templates/checklist.md` into `<work-root>/.work/<slug>/course-digest-checklist.md`. Tick each phase as completed.
`<work-root>` follows the knowledge plugin's one rule, `${CLAUDE_PLUGIN_ROOT}/reference/work-root.md`. Resolve it once, before the first write, from the session's working directory; a non-zero exit (an unset variable in the value) fails the run:
```bash
node "${CLAUDE_PLUGIN_ROOT}/scripts/work-root.mjs" --library-dir '${user_config.library_dir}'
```
**Paid content stays private.** Course material is paid content kept for personal use, so it never
lands where a commit could publish it. Every action but `status` checks the work root right after
resolving it, before any write, the checklist included:
```bash
node "${CLAUDE_PLUGIN_ROOT}/scripts/repo-visibility.mjs" "<work-root>"
```
The JSON line it prints names the work root's `visibility`:
- `public` or `unknown`: stop before writing anything. Tell the person that course material is
paid content kept for personal use, and to set this plugin's `library_dir` to their private
corpus checkout (for example `${KNOWLEDGE_CORPUS_DIR}`) or to run from a private repository.
- `private`, `internal` or `local` (no remote, so nothing is published): proceed.
`status` skips the check because it only reads existing `course.json` files and runs no extraction
script. The extraction launcher `run.mjs` makes the same check on every `--course-dir` and
`--output-dir` it is given, and exits 1 without running the script unless each one reads
`private`, `internal` or `local`.
Two paths per course, both under `<work-root>`:
- `<work-root>/.work/<slug>/course-digest-checklist.md` is the phase checklist, a working file. `<work-root>/.work/` self-ignores (a `.gitignore` containing `*`) and is never committed; nested `<epic>/<slug>/` sub-slices are sanctioned there.
- `<work-root>/courses/<platform>/<slug>/` is the course directory: every course file in [context/storage-schema.md](context/storage-schema.md) lives there, and it is the `--course-dir` every extraction script takes.
Slug conformance is form-only (kebab-case `[a-z0-9-]`, ≤ 40 chars, Windows-reserved base names take an `-x` suffix).
## Prerequisites (verify before starting)
1. **course-extraction deps**. `node "${CLAUDE_PLUGIN_ROOT}/skills/course-digest/extraction/setup-deps.mjs" --data-dir "${CLAUDE_PLUGIN_DATA}"`. Installs the pipeline's node dependencies into `${CLAUDE_PLUGIN_DATA}` (persists across plugin updates) and provisions Playwright's Chromium into `${CLAUDE_PLUGIN_DATA}/ms-playwright`. Idempotent. Safe to re-run, and re-run after a plugin update.
2. **Platform auth**. Set `COURSE_EMAIL`/`COURSE_PASSWORD` (Dometrain → Clerk) or `TEACHABLE_EMAIL`/`TEACHABLE_PASSWORD` (Teachable) in your shell before invoking; they inherit into the pipeline's node subprocess. The env-var prefix is course-config-driven via `platformConfig.authEnvPrefix`. Session cookies persist under `${CLAUDE_PLUGIN_DATA}/auth/<platform>.auth-state.json` and are reused across runs. **Interactive manual login is the fallback** when no credentials are set. It opens a browser window for you to log in. NOTE: the manual-login prompt (`node:readline` + headed browser) may not function under headless plugin execution; env-var + cookie-reuse carry the skill regardless, and manual login is a known limitation there, not a blocker. These credentials live in shell environment variables, not in plugin `userConfig`: this plugin's `userConfig` options are non-secret scalars. Where option values are kept: <https://code.claude.com/docs/en/plugins/manifest-reference#where-values-are-stored>.
3. **ffmpeg**, required for video frame extraction (scene detection, interval capture). Check: `ffmpeg -version`. Floor 7.1+ (newer codecs, AV1, Opus, degrade or fail below this). Packages and builds: [ffmpeg download](https://ffmpeg.org/download.html#get-packages).
4. **ImageMagick 7**, required by `classify-frames.js` for contact sheet generation (`magick montage`). Check: `magick -version`. Install: `winget install ImageMagick.ImageMagick` (Windows), `brew install imagemagick` (macOS), `sudo apt install imagemagick` (Linux). When the distro package is below 7, use an install fallback from `/knowledge:video-digest`'s Prerequisites section ("When the usual install falls short").
5. **A browser tool for Phase 1 (course discovery)**, picked by the browser-tool rubric `/testing:run-e2e` (if enabled) owns; otherwise the first browser tool the session offers, named in the run report. A missing tool is a prerequisite gap to report, not a reason to switch tools. Frame extraction needs no browser tool: the scripts read HLS URLs themselves.
If any prerequisite fails, stop and inform the user. Re-run `setup-deps.mjs` for the node dependencies + Chromium; the media binaries (ffmpeg, ImageMagick) are OS-level installs via the download pointer and platform package commands above, or, for ImageMagick below 7, the install fallback item 4 names.
## Running the pipeline scripts
Every extraction script runs through the launcher, which resolves the vendored node dependencies from the data directory its leading `--data-dir` names and pins Playwright's browser path:
```bash
node "${CLAUDE_PLUGIN_ROOT}/skills/course-digest/extraction/run.mjs" --data-dir "${CLAUDE_PLUGIN_DATA}" <script.js> [args…]
```
Gate on `setup-deps.mjs` first (Prerequisites above).
### Consolidated extraction (Phases 1-2)
The Playwright batch script handles transcripts, video frame extraction, and course metadata in a single run:
```bash
# Full extraction: transcripts + frames + metadata
node "${CLAUDE_PLUGIN_ROOT}/skills/course-digest/extraction/run.mjs" --data-dir "${CLAUDE_PLUGIN_DATA}" extract-course.js --course-dir <path-to-course-data> --extract-frames
# Transcripts only (faster, no ffmpeg needed)
node "${CLAUDE_PLUGIN_ROOT}/skills/course-digest/extraction/run.mjs" --data-dir "${CLAUDE_PLUGIN_DATA}" extract-course.js --course-dir <path-to-course-data>
# Frames only (skip transcripts already extracted)
node "${CLAUDE_PLUGIN_ROOT}/skills/course-digest/extraction/run.mjs" --data-dir "${CLAUDE_PLUGIN_DATA}" extract-course.js --course-dir <path-to-course-data> --extract-frames --skip-transcripts
# Course metadata only
node "${CLAUDE_PLUGIN_ROOT}/skills/course-digest/extraction/run.mjs" --data-dir "${CLAUDE_PLUGIN_DATA}" extract-course.js --course-dir <path-to-course-data> --metadata-only
```
Script uses Playwright's bundled Chromium with a fresh temp context, never the installed Chrome or its default profile. Auth handled via `addCookies()` after context launch: with credentials set it logs in and saves state; subsequent runs inject cached cookies automatically. Skips already-extracted lessons (crash-safe, resumable). Runs headless by default (`--show-browser` to show the browser).
- **Pointer**: when deciding whether the installed Chrome could stand in for the bundled Chromium, fetch <https://developer.chrome.com/blog/remote-debugging-port> live; it covers remote debugging against Chrome's default data directory.
**Key technical details:**
- Uses `--disable-blink-features=AutomationControlled` to bypass automation detection on course platform logins
- Chrome profiles are not used. Playwright's own Chromium with a dedicated temp context dir in the OS temp directory
- Auth state saved to `${CLAUDE_PLUGIN_DATA}/auth/<platform>.auth-state.json` (session expiry depends on the platform's auth provider, configured in `platformConfig.authWarnDays`)
- HLS video URLs captured via DOM read from the video player element (selector from `platformConfig.videoPlayerSelector`). No claude-in-chrome needed
- Frame extraction via ffmpeg scene detection (threshold 0.1), with interval fallback for sparse results
- Content type derived from extraction results (scene detection = code, interval + high dup = talking head). No manual tagging
- Progress tracking with per-lesson elapsed time, ETA, structured `run-report.json` output
- SIGINT handler saves progress on Ctrl+C. No work lost on interruption
**Long-running extractions (50+ lessons):** a large course can outlast a single Bash call, so run the
extraction as one `run_in_background` Bash call so the harness tracks the task. It resumes by
rerunning the same command. The
log goes to `<work-root>/.work/<slug>/`, which is never committed, so the shell creates no file in
the course directory before `run.mjs` has checked its visibility. Start this command as one
background call:
```bash
node "${CLAUDE_PLUGIN_ROOT}/skills/course-digest/extraction/run.mjs" --data-dir "${CLAUDE_PLUGIN_DATA}" extract-course.js --course-dir <course-dir> > <work-root>/.work/<slug>/extraction.log 2>&1
```
In an unattended session, pass a `timeout` sized for the course (limits and which sessions they
apply to: the time-limit pointer below). Then run each of these as its own foreground call while the task runs:
```bash
# Monitor progress periodically
tail -20 <work-root>/.work/<slug>/extraction.log
# Check run report after completion
cat <course-dir>/run-report.json
```
If the run is stopped, or reaches the background time limit, start the same command again: it skips
lessons already extracted.
- **Pointer**: for the current foreground timeout, fetch
<https://code.claude.com/docs/en/tools-reference#timeout-and-output-limits> live; for the
background time limit's default and maximum, fetch
<https://code.claude.com/docs/en/tools-reference#time-limit-for-background-commands> live.
## Platform detection and adapter architecture
Extraction pipeline uses a **provider adapter pattern**. Platform-specific code lives in adapter modules (`extraction/adapters/{platform}.js`). The orchestrator (`extract-course.js`) delegates to adapters via a contract. Zero platform-specific code in the orchestrator.
**Architecture:**
```text
extraction/
adapters/
adapter-contract.js # JSDoc interface + validation + factory
registry.js # Static platform-id to adapter map; an unknown id resolves to no adapter and fails closed
dometrain.js # Thin adapter: composes mux (player) + clerk (auth)
teachable.js # Thin adapter: composes hotmart (player) + teachable-sso (auth)
lib/
players/
hotmart.js # Hotmart HLS: intercept, iframe subtitle fetch, canvas frames
mux.js # Mux: DOM src read from mux-player element
auth/
clerk.js # Clerk two-step login flow
teachable-sso.js # Teachable simple form login flow
auth-store.js # Resolves per-platform auth-state path under ${CLAUDE_PLUGIN_DATA}
browser.js # Shared Playwright launch, cookie injection, auth age check
validators.js # extraction validators
config.js # platformConfig validation, adapter resolution
# shared kernel + transcript: @melodic/video-digestion (vendored plugin-wide under ../../../vendor/)
extract-course.js # Orchestrator only — delegates to adapter + lib
discover-resources.js # Discovery tool — uses adapter.detectResources()
download-resources.js # Download lesson resources (ZIPs, PDFs) from resources.json
build-course-json.js # Teachable-specific: scaffold course.json from curriculum page
classify-frames.js # Frame classification (provider-agnostic, no adapter needed)
generate-manifests.js # Manifest generation (provider-agnostic, no adapter needed)
utils.js # Provider-agnostic utilities only
```
Adapters are thin composition layers. Delegate to shared `lib/players/` and `lib/auth/` modules for reusable tech-layer concerns, keeping only platform-specific DOM selectors, URL patterns, and orchestration logic.
**Every adapter method returns `Result`** (`ok`/`fail` from `@melodic/video-digestion/shared/result`). Explicit success/failure with timing, operation name, context. No silent catches, no null returns.
| URL pattern | Platform | Adapter | Reference |
|---|---|---|---|
| `dometrain.com` | Dometrain | `adapters/dometrain.js` | [reference/adapters/dometrain.md](reference/adapters/dometrain.md) |
| `*.teachable.com`, `courses.*.tech` | Teachable (Hotmart video) | `adapters/teachable.js` | [reference/adapters/teachable.md](reference/adapters/teachable.md) |
| Single public YouTube videos | | use /knowledge:video-digest | |
| `pluralsight.com` | Pluralsight | no adapter | Report that no adapter exists and stop; adding one starts at [reference/adapters/discovery-checklist.md](reference/adapters/discovery-checklist.md) |
| `udemy.com` | Udemy | no adapter | Report that no adapter exists and stop; adding one starts at [reference/adapters/discovery-checklist.md](reference/adapters/discovery-checklist.md) |
**To add a new platform adapter:** follow [Provider Discovery Checklist](reference/adapters/discovery-checklist.md) to explore the platform systematically, then create `adapters/{platform}.js` implementing the 5 required methods (`extractTranscript`, `extractHlsUrl`, `detectResources`, `deriveLandingUrl`, `buildLessonUrl`). Compose from shared modules where the tech stack matches, e.g., a new platform using Hotmart video + Clerk auth would `import * as hotmart from "../lib/players/hotmart.js"` and `import * as clerk from "../lib/auth/clerk.js"`, then delegate player/auth methods while implementing only platform-specific DOM selectors and URL patterns. Register it in `adapters/registry.js` (a static import plus an entry keyed by the platform id), then set that id in the `course.json` `platform` field; a name the registry does not hold fails closed. The discovery checklist also serves as regression guide when existing adapters break.
## The pipeline
Follow the 8-phase workflow in [context/workflow.md](context/workflow.md), each building on the previous. Discover → Extract → Process Frames → Analyze Code Repo → Validate → Synthesize → Analyze → Recommend (phases 1, 2, 2b, 2c, 2d, 3, 4, 5). Phases 1-2d are extraction (browser + CLI); 3-5 are analysis (LLM-heavy, parallelizable across modules). Storage runs continuously throughout.
All context (transcripts + frames + code repo) must be gathered before Phase 3.
Module summaries note their context level: `[transcript-only]`, `[transcript+frames]`, `[full-context]`.
### Phase 3 modalities (`[full-context]` requires all three)
Synthesis combines three modalities. Transcript (`transcript.md`), visual frames (PNG files + `manifest.json`), and companion code (`code/repo/<section>/`). Each module gets parallel agents (transcript + visual + code exploration), then a synthesis pass. Full modality table + multi-agent approach: [context/workflow.md](context/workflow.md) Phase 3.
Multi-modal extraction gaps beyond these three (code OCR from frames, slide-text extraction, audio re-transcription) are evaluated with priority and effort in [context/multimodal-evaluation.md](context/multimodal-evaluation.md).
### Dedup semantics
Dedup phase (`classify-frames.js --phase dedup`) **reports** near-duplicates but does not
delete frame files. Actual frame curation happens in `generate-manifests.js` which sets
`keep: true/false` per frame. Frame PNG files remain on disk. Manifests define which frames to use
during synthesis.
### Phase tracking
`course.json` includes a `phases` object recording which pipeline phases have completed and
when. Each phase is `null` (not started) or an object with `completedAt` timestamp and
phase-specific metrics. On resume, check which phases are non-null to skip completed work.
### Repo freshness caveat
Companion GitHub repos may be updated after course publication; classify transcript/code discrepancies per [context/workflow.md](context/workflow.md) "Freshness verification". **All course action items require external research verification before adoption**. Course content is a starting point for research, not a final answer.
## Invocation patterns
Skill supports different scopes:
| User says | Action |
|---|---|
| `/knowledge:course-digest <url>` | Full pipeline. Discover + extract all + analyze |
| `/knowledge:course-digest extract <url>` | Phases 1-2 only. Extract raw content, skip analysis |
| `/knowledge:course-digest analyze <slug>` | Phases 3-5 only. Analyze previously extracted content |
| `/knowledge:course-digest status` | Show all digested courses and their completion state |
| `/knowledge:course-digest resume <slug>` | Resume extraction from where it left off (reads course.json phases) |
| `/knowledge:course-digest continue <slug>` | Continue from a prior session. Reads continuation prompt file |
| `/knowledge:course-digest` (no args) | Auto-detect: check for in-progress courses, resume the most recent |
### Session continuation protocol
After every module, and whenever a session ends mid-pipeline:
1. **Write a continuation prompt** to `<course-dir>/continuation-prompt.md`
2. Include: what was completed, what remains, task-by-task breakdown, known issues, quality notes
3. Update `course.json` phase markers with timestamps
At a module boundary, route the next step with `/session-flow:workflow` (if enabled). Give it the facts a
compaction focus needs: the course slug, the next module, and the `course.json` path. A new
session resumes with `/knowledge:course-digest continue <slug>`.
Without session-flow, the user picks the next step from the docs.
- **Pointer**: for when context fills up, see
<https://code.claude.com/docs/en/context-window#when-your-context-fills-up>.
The `continue` action reads the continuation prompt and reconstructs task context. No args defaults to checking `course.json` for the most recent in-progress course.
## Pacing and user interaction
Courses can have 60+ lessons. Processing all in one session may hit context limits.
- **After discovering course structure** (Phase 1): present module/lesson list and ask user which modules to process, or confirm "all"
- **After each module completes**: save progress immediately, a crash shouldn't lose work
- **At a module boundary**: follow the [session continuation protocol](#session-continuation-protocol)
## Analysis output format
Repo-applicability analysis follows the template in [reference/analysis-template.md](reference/analysis-template.md). Key deliverables:
- **`repo-candidates.md`**. Specific patterns/practices from the course that could improve the repository, with references to where in the course they're taught
- **`action-items.md`**. Concrete next steps: rule candidates, skill suggestions, architecture patterns, testing practices, work-item candidates
## Reference index. Load on demand
| File | Load when |
|------|-----------|
| [reference/screenshot-strategy.md](reference/screenshot-strategy.md) | Before capturing frames in Phase 2 or curating them in Phase 2b. What earns a screenshot and what never does, the ffmpeg scene-detection pipeline with its threshold calibration, vision classification, and manifest generation |
| [reference/analysis-template.md](reference/analysis-template.md) | Writing the Phase 5 repo-applicability analysis |
| [reference/adapters/discovery-checklist.md](reference/adapters/discovery-checklist.md) | Adding a platform adapter, or an existing adapter broke and needs the same systematic walk as a regression guide |
| [reference/adapters/dometrain.md](reference/adapters/dometrain.md) | Working on Dometrain extraction: selectors, auth, player specifics |
| [reference/adapters/teachable.md](reference/adapters/teachable.md) | Working on Teachable or Hotmart-video extraction: selectors, auth, player specifics |
## Spoke paths
The `context/` files write this skill's directory as `<skill-dir>`, which is `${CLAUDE_SKILL_DIR}`,
and the plugin data directory as `<plugin-data>`, which is `${CLAUDE_PLUGIN_DATA}`. Put those paths
in place of the placeholders before running a command. Those files arrive through the Read tool as
plain bytes, so a `${…}` token in them would reach the Bash tool unsubstituted, and the Bash tool's
environment has no `CLAUDE_SKILL_DIR` to expand it from.
Every `run.mjs` and `setup-deps.mjs` command takes the leading `--data-dir` flag shown above.
The Bash tool's environment does not carry this plugin's `CLAUDE_PLUGIN_DATA`, and another
plugin's SessionStart hook can put its own data directory there under that name. The scripts
therefore take the directory from the flag, and accept an inherited value only when it names this
plugin. Basis: the plugins reference,
<https://code.claude.com/docs/en/plugins/manifest-reference#where-each-variable-resolves>, verified
2026-10-07; recheck when that table adds supporting files to where a `${…}` reference resolves, or
lists the Bash tool among the processes that receive the variables.
## Next
- Verify course claims before adoption: /discovery:research.
- Scope verified action items into work: /planning:interview.
## Related
- Single public YouTube or X video: /knowledge:video-digest.
- Routing module-boundary session continuation: /session-flow:workflow.
## Storage
Generated course output lands under `<work-root>` ([Emit checklist](#emit-checklist)) as `courses/<platform>/<slug>/`, one self-contained directory per course slug. See [context/storage-schema.md](context/storage-schema.md) for the full directory structure.
Rules:
- No video or audio files. Transcripts and screenshots capture the content
- Screenshots are PNG files. Keep small (resize to 1280px wide max)
- Save progress incrementally, never buffer an entire course in memory
- Each course is self-contained under its own slug directory