/notebooklm-course:repo-teardown-to-coursefrom NotebookLM Course Builder
Turn any public GitHub repo into a NotebookLM course — packed sources, architecture-tour podcast, onboarding video, mind map, quiz, and teardown brief. Trigger when the user asks to turn a repo into a course, tear down a repo to NotebookLM, or make a podcast or course from a repo URL. Requires the notebooklm MCP server (notebooklm-py) and repomix.
Ships in NotebookLM Course Builder. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Pipeline: pack → publish ∥ → generate (two waves) → deliver early, confirm late. Each step maps to one tool surface so the engine is swappable (see ADR-001). The notebook is the single home of the course — nothing is downloaded to the user's machine unless they explicitly ask.
Latency contract (v0.2+): the user gets the notebook link and the first usable artifacts at roughly the 10-minute mark; only the slow media (audio, video) is confirmed afterward. Never hold the whole delivery hostage to the slowest artifact. The only synchronization bought deliberately is one cheap validation gate in front of the quota-capped artifacts — everything else runs as parallel as the engine allows.
repomix --version works (else: npm i -g repomix).notebooklm MCP tools are available and authenticated — call
server_info; on stale/failed auth tell the user to run notebooklm login.
(server_info with include_account=true also reveals the tier: a
50-source limit is free; infer the tier from this instead of asking.)Run python3 {skill_dir}/repo2course.py <REPO_URL> --tier <tier> --out out.
--tier pro
or a scoped run; do not proceed silently.out/<repo>/manifest.json. Sanity-check: at least one code source
covering the main package; docs source present if the repo has docs. Report
totals (sources / words / dropped) to the user before publishing.notebook_list BEFORE notebook_create, every
run, no exceptions. If a notebook titled exactly
"<repo> — Codebase Course" exists, REUSE it and skip sources already
present (source_list); create only when no match exists. Skipping this
check creates duplicate notebooks and silently re-spends capped
audio/video quota on content that already exists (observed failure).
Reruns must be idempotent, never duplicating.source_add
without wait, then issue ONE source_wait covering all of them. Upload
wall-clock is the largest file, not the sum. Do NOT upload sequentially
with per-source blocking waits; that was v0.1's single biggest overhead
(~4× slower on a typical 5-source repo). Docs-first is a priority for
which upload to fire first, not a barrier.
path; over a bridge where the packer's
filesystem is unreachable, pass content as source_type=text (delegate
to a subagent running uploads in parallel if the content must transit
an agent context).RATE_LIMITED (retriable) back off and retry once; on hard failure,
report which sources landed and stop — never generate against a partial
notebook silently.ready — the notebook keeps its own
copy; staged files are not a deliverable.ready — it is a lagging, unreliable
readiness signal (observed: >25 min lag while report generation grounded
perfectly). The grounding gate is the report itself (Step 3, Wave 1). At
most, fire one chat question as a non-blocking diagnostic and move on
regardless of the answer; never sleep-and-retry on chat.Generation blends sources with the model's training priors: acronyms get the industry-common expansion instead of the repo's, overloaded terms (e.g. "low-code" as a platform category vs. an implementation style) resolve to their popular meaning, familiar frameworks get imported to organize the summary, and thin sections get padded with plausible generic content (observed: "SDD" expanded to "Solution Design Document" in a repo where it means "Spec-Driven Development"). The countermeasure is a per-repo framing contract, built once and injected into every generation:
{thesis} — the repo's own 1–2 sentence self-description, including
what it replaces/evolves from and its central tradeoff if the docs state
one.{glossary} — every acronym the repo uses and any term the repo
uses in a non-standard or easily-confused way, each with the repo's own
definition. Scan the README and doc headings; if the repo name itself
contains a loaded term, ALWAYS define it.{skill_dir}/course_templates.md and prepend that preamble VERBATIM to
every studio_generate instruction (report, audio, video, quiz).Focus instructions come from {skill_dir}/course_templates.md with {repo},
{audience}, {thesis}, and {glossary} substituted (grounding preamble
first — see Step 2.5).
Wave 1 — fire IMMEDIATELY when all sources are ready, all concurrent:
studio_generate report ("Teardown Brief") — this is the grounding
gate for Wave 2. It is cheap/uncapped and exercises the same grounding
path as the expensive artifacts.Validation read (report only): fetch the report text (inline content
where the transport returns it; otherwise download to a temp path and remove
the file — or tell the user exactly what to remove — after reading). Check
TWO things:
{glossary}; {thesis}
is reflected in the positioning section; every stated limitation names a
source document; no imported frameworks/taxonomies absent from the
sources. A violation here ⇒ tighten the preamble (add the violated term or
guard), regenerate the REPORT only, and re-validate before firing Wave 2 —
the same drift would otherwise be baked into the non-refundable media
(prompt problem, not packing). Residual minor drift is acceptable; note it
to the user in the delivery.Early delivery (do this NOW, before Wave 2 completes — see Step 4): the notebook link, the validated report, the quiz, and the mind map are already usable. Deliver them.
Wave 2 — the capped artifacts, fired together after the report validates:
Polling — adaptive, not fixed: poll studio_status with intervals matched
to each artifact's latency profile: report ~30–60 s; quiz ~30–60 s; audio
first check at ~4 min then every 60–90 s; video first check at ~8 min then
every 90–120 s. Never use a flat 5-minute sleep for everything — overshoot on
the tail adds minutes for nothing. If the session supports it, prefer ending
the turn with a scheduled check-in over holding a long synchronous wait.
If RATE_LIMITED/quota errors arrive, report what completed and schedule the
remainder for the user; do not spin.
Do not download artifacts. The notebook is the deliverable.
At the ~10-minute mark (Wave 1 done): give the user
https://notebooklm.google.com/notebook/<id>),When Wave 2 lands: confirm the completed media (a short follow-up — in
session if still open, otherwise via a scheduled check-in/notification), plus
remaining daily audio/video quota if any generation was skipped or is worth
offering. Quota is account-level and shared across sessions and notebooks
(and deleting a notebook does not refund it) — report headroom from
server_info(include_account=true), never by counting only this session's
own generations (observed failure: a rerun reported "2 of 3 left" while the
account had already spent slots in another session the same day).
Downloading and saving artifacts is the user's choice: only call
studio_download when the user explicitly asks for specific artifacts, to the
location they name. Suggest the next repo only if asked.
Private repos; non-GitHub forges; multi-repo courses; remote/tunnel deploys; unsolicited local copies of sources or artifacts.
{thesis} + {glossary} preamble prepended
to every generation) countering prior-blending — wrong acronym expansions,
overloaded-term drift, imported taxonomies, padded limitations; report
template gains an origin/tradeoff slot and docs-only limitations rule;
validation read now checks the framing contract and regenerates the report
(cheap) instead of letting drift reach the capped media; reuse check made
an explicit mandatory step (duplicate-notebook failure observed); quota
reported account-level from server_info(include_account=true) (per-session
counting failure observed).source_wait; chat spot-check demoted from
gate to non-blocking diagnostic (it lags generation grounding); report-only
gating scoped to the capped artifacts (quiz + mind map fire at
sources-ready); adaptive per-artifact polling; early link delivery with
late media confirmation; tier inferred from server_info instead of asked.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub mohantyajitesh/claude_notebooklm_integrator --plugin notebooklm-course