Skip to content
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,41 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.4.0] - 2026-01-24

### Added
- **Intelligent Source Filtering** - LLM-based relevance scoring before each query
- Uses Gemini or Claude to score each source (1-10) based on semantic relevance
- Automatically deselects irrelevant sources in browser for faster responses
- Fallback chain: Gemini CLI → Claude CLI → keyword matching
- Configurable threshold (`--threshold N`) for filtering sensitivity
- `--keyword-filter` flag to use keyword matching instead of LLM
- `--no-filter` flag to disable filtering entirely

- **Source Summary Caching** - Automated extraction and caching of source metadata
- New `source_extractor.py` - Click-based extraction of Source Guide content
- New `source_filter.py` - LLM scoring and browser checkbox automation
- Auto-extracts source summaries when adding notebooks
- Cached in `data/library-source-summary/{notebook-id}.md`
- Incremental updates - only fetches NEW sources not in cache

- **Source Management Commands**
- `update-sources --id ID` - Update source summary for a notebook
- `update-sources --id ID --force` - Re-extract all sources
- `update-sources --all` - Update all notebooks
- `show-sources --id ID` - Display cached source summaries

### Changed
- **Python 3 Enforcement** - All scripts now use `python3` instead of `python`
- **Browser Switch** - Changed from Chrome to Chromium for better compatibility
- **ask_question.py** - Now integrates source filtering before each query

### Fixed
- **Checkbox Automation** - Uses Playwright native clicks for reliable Angular interaction
- JavaScript `.click()` didn't trigger Angular change detection
- Now uses `checkbox.click(force=True)` for proper event handling
- Each deselection is verified after clicking

## [1.3.0] - 2025-11-21

### Added
Expand Down
85 changes: 70 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,21 +161,30 @@ This is a **Claude Code Skill** - a local folder containing instructions and scr

```
~/.claude/skills/notebooklm/
├── SKILL.md # Instructions for Claude
├── scripts/ # Python automation scripts
│ ├── ask_question.py # Query NotebookLM
│ ├── notebook_manager.py # Library management
│ └── auth_manager.py # Google authentication
├── .venv/ # Isolated Python environment (auto-created)
└── data/ # Local notebook library
├── SKILL.md # Instructions for Claude
├── scripts/ # Python automation scripts
│ ├── ask_question.py # Query NotebookLM with source filtering
│ ├── notebook_manager.py # Library + source summary management
│ ├── auth_manager.py # Google authentication
│ ├── source_filter.py # LLM-based relevance scoring
│ ├── source_extractor.py # Extract source summaries from notebooks
│ ├── add_source.py # Add sources (files, URLs, text)
│ ├── list_sources.py # List sources via UI scraping
│ ├── remove_source.py # Remove sources (with safety confirmation)
│ ├── audio_generator.py # Generate Audio Overviews
│ └── video_generator.py # Generate Video Overviews
├── .venv/ # Isolated Python environment (auto-created)
└── data/ # Local notebook library + source summaries
```

When you mention NotebookLM or send a notebook URL, Claude:
1. Loads the skill instructions
2. Runs the appropriate Python script
3. Opens a browser, asks your question
4. Returns the answer directly to you
5. Uses that knowledge to help with your task
3. **Scores source relevance** using Gemini/Claude LLM
4. **Deselects irrelevant sources** in the browser
5. Opens a browser, asks your question
6. Returns the answer directly to you
7. Uses that knowledge to help with your task

---

Expand All @@ -190,6 +199,39 @@ No copy-paste between browser and editor. Claude asks and receives answers progr
### **Smart Library Management**
Save NotebookLM links with tags and descriptions. Claude auto-selects the right notebook for your task.

### **Intelligent Source Filtering**
Before each query, the skill analyzes which sources are relevant:
- **LLM-based scoring**: Uses Gemini or Claude to semantically score each source (1-10)
- **Automatic deselection**: Unchecks irrelevant sources in the browser
- **Faster responses**: NotebookLM only searches relevant documents
- **Fallback support**: Gemini → Claude → keyword matching

### **Source Summary Caching**
When you add a notebook, the skill automatically:
- Extracts summaries for each source document
- Caches them locally for instant relevance scoring
- Updates incrementally (only fetches new sources)

### **Source Management**
Add, list, and remove sources directly from Claude Code:
- **Add sources**: Upload PDFs, paste URLs (websites/YouTube), or add text directly
- **List sources**: View all sources in a notebook via reliable UI scraping
- **Remove sources**: Permanently delete sources with safety confirmation

### **Audio Overview Generation**
Generate podcast-style audio summaries of your notebook content:
- **Formats**: Deep Dive, Brief, Critique, Debate
- **Lengths**: Short, Default, Long
- **Multi-language support**: English, Spanish, Japanese, and more
- **Custom instructions**: Guide what the AI hosts focus on

### **Video Overview Generation**
Generate video summaries with customizable visual styles:
- **Formats**: Explainer, Brief
- **Visual styles**: Auto, Classic, Whiteboard, Kawaii, Anime
- **Multi-language support**
- **Custom instructions**: Target specific use cases or audiences

### **Automatic Authentication**
One-time Google login, then authentication persists across sessions.

Expand All @@ -206,10 +248,18 @@ Uses realistic typing speeds and interaction patterns to avoid detection.
| What you say | What happens |
|--------------|--------------|
| *"Set up NotebookLM authentication"* | Opens Chrome for Google login |
| *"Add [link] to my NotebookLM library"* | Saves notebook with metadata |
| *"Add [link] to my NotebookLM library"* | Saves notebook with metadata + extracts source summaries |
| *"Show my NotebookLM notebooks"* | Lists all saved notebooks |
| *"Ask my API docs about [topic]"* | Queries the relevant notebook |
| *"Ask my API docs about [topic]"* | Queries with intelligent source filtering |
| *"Use the React notebook"* | Sets active notebook |
| *"Update sources for my notebook"* | Re-fetches source summaries |
| *"Show sources in my notebook"* | Displays cached source summaries |
| *"Add this PDF to my notebook"* | Uploads file as a new source |
| *"Add this URL to my notebook"* | Adds website or YouTube video as source |
| *"List sources in my notebook"* | Shows all sources via UI scraping |
| *"Remove [source] from my notebook"* | Permanently deletes a source (with confirmation) |
| *"Generate an audio overview"* | Creates podcast-style audio summary |
| *"Generate a video overview"* | Creates video summary with visuals |
| *"Clear NotebookLM data"* | Fresh start (keeps library) |

---
Expand Down Expand Up @@ -264,11 +314,16 @@ All data is stored locally within the skill directory:

```
~/.claude/skills/notebooklm/data/
├── library.json - Your notebook library with metadata
├── auth_info.json - Authentication status info
└── browser_state/ - Browser cookies and session data
├── library.json - Your notebook library with metadata
├── auth_info.json - Authentication status info
├── browser_state/ - Browser cookies and session data
└── library-source-summary/ - Cached source summaries
└── {notebook-id}.md - Source titles and summaries for each notebook
```

**Source Summary Files:**
Each notebook gets a markdown file with summaries of all sources. These are used for intelligent source filtering - the LLM scores each source's relevance to your question before querying.

**Important Security Note:**
- The `data/` directory contains sensitive authentication data and personal notebooks
- It's automatically excluded from git via `.gitignore`
Expand Down
Loading