Skills / Skills / Notebooklm Sync
All skills

/ skill

notebooklm-sync

Skills/notebooklm-sync.md

Refresh a library's cached summary and reconcile its source list with the NotebookLM notebook.

Open as raw file

Run this skill

Runs with bypassPermissions — local dev only.

notebooklm-sync

Keep Wiki/Libraries/{slug}.md in sync with the underlying NotebookLM notebook. Three things happen each run:

  1. Source-list reconciliation — confirm every source in the wiki Sources table is in the notebook (and vice versa). Surface drift.
  2. Cached summary refresh — ask NotebookLM "what is this notebook about? summarize the key themes" and write the answer into ## Cached summary. Lets agents read fast context without live queries for routine questions.
  3. Source-count update — rewrite source_count in frontmatter to match.

Pre-flight checks

  1. If library_slug provided: Wiki/Libraries/{library_slug}.md exists.
  2. NotebookLM session valid (Phase 2+). If unavailable: log + skip with synced: []; don't error out other operations.

Procedure

1. Resolve the library set

  • If library_slug provided: just that one.
  • Else: walk Wiki/Libraries/*.md, filter status: active.

2. For each library

a. Pull the source list from NotebookLM (Phase 2+). b. Compare against the Sources table in the wiki node: - In NLM but not in wiki: add a row to the Sources table (NLM-side authority for source_id). - In wiki but not in NLM: flag as drift in drift_report — likely means source was deleted in NLM UI directly. Don't auto-remove; ask Adam. - In both: OK. c. Update source_count in frontmatter. d. Send a fixed prompt to NotebookLM: "What is this notebook about? Summarize the most important themes in 5–8 bullet points." e. Replace the body content under ## Cached summary with the response. Add a small footer: _Last summarized: {today}_. f. Update frontmatter: last_synced: {today}, last_summarized: {today}.

3. Append Log entry per library

  • input: library={slug}
  • output: sources_added={N}, drift={N}, cached_summary_chars={N}
  • artifacts: <a class="wikilink wikilink-broken" href="#">Wiki/Libraries/{slug}</a>
  • notes: any drift warnings

4. Aggregate drift report

Return a single-string drift_report summarizing any libraries that have drift.

Cadence

  • Manual: /library sync or /library sync {slug}.
  • Recommended: weekly cron (Phase 4) — same cadence as lint-wiki.
  • Auto-trigger: after any /library add-source or /library deep-research.

Hard rules

  • Never delete a wiki Sources row automatically — drift is reported, not auto-resolved.
  • Never overwrite the wiki node body sections OTHER than ## Cached summary — the rest is human-curated.
  • If a library hasn't been synced in 30+ days, flag in lint-wiki as MEDIUM severity stale.

Failure modes

  • NotebookLM rate-limited mid-sync — partial completion is OK; record synced: [...] with what succeeded and surface the failures.
  • Library has zero sources — skip the summary step (NotebookLM has nothing to summarize); just update last_synced and note in Log.