Skip to content

Instantly share code, notes, and snippets.

@khengyun
Last active February 26, 2026 05:51
Show Gist options
  • Select an option

  • Save khengyun/3ad656c8b9eea4f1c141389c962f5297 to your computer and use it in GitHub Desktop.

Select an option

Save khengyun/3ad656c8b9eea4f1c141389c962f5297 to your computer and use it in GitHub Desktop.

Install NotebookLM Experts Agent Skill

Auto-install instruction: When you share this link with any AI agent, it will automatically fetch and install the NotebookLM Experts skill to the correct location on your system.

Compatible with: Claude Code · GitHub Copilot · OpenAI Codex CLI · Gemini CLI · and other agent frameworks


Installation Instruction

Skill Name: notebooklm-experts-skill
Repository: https://github.com/khengyun/notebooklm-experts-skill

Steps for Agent to Execute

Step 0: Ask User About Their Agent Environment

REQUIRED: Before proceeding with installation, ask the user:

"Which AI agent are you using?
1. Claude Code
2. GitHub Copilot
3. OpenAI Codex CLI
4. Gemini CLI
5. Other (specify)

Also, do you prefer:
- Project-local installation (only for this workspace)
- User-level installation (available for all projects)"

Wait for user response before proceeding.

Step 1: Determine Installation Path

Based on user's answer, select the appropriate installation directory:

User's Agent Project-Local Path User-Level Path
Claude Code .claude/skills/notebooklm-experts-skill/ ~/.claude/skills/notebooklm-experts-skill/
GitHub Copilot .github/skills/notebooklm-experts-skill/ ~/.github/skills/notebooklm-experts-skill/
OpenAI Codex CLI .codex/skills/notebooklm-experts-skill/ ~/.codex/skills/notebooklm-experts-skill/
Gemini CLI N/A ~/.gemini-cli/skills/notebooklm-experts-skill/
Other .agents/skills/notebooklm-experts-skill/ ~/.agents/skills/notebooklm-experts-skill/

Note:

  • User-level path uses ~ (home directory) on macOS/Linux or %USERPROFILE% on Windows
  • Project-local path is relative to current workspace root

Step 2: Clone Repository

ACTION: git clone https://github.com/khengyun/notebooklm-experts-skill.git
INTO: temporary directory (e.g., /tmp/notebooklm-experts-skill or %TEMP%\notebooklm-experts-skill)

Step 3: Create Target Directory

ACTION: Create the target directory determined in Step 1
EXAMPLE: mkdir -p ~/.claude/skills/notebooklm-experts-skill/

If directory creation fails, report error and suggest checking permissions.

Step 4: Copy Skill Files

ACTION: Copy all files from temporary clone directory
TO: target directory from Step 1
PRESERVE: File permissions and directory structure

Step 5: Clean Up

ACTION: Remove temporary clone directory

Step 6: Verify Installation

CHECK: File exists at <target-directory>/SKILL.md
CHECK: SKILL.md contains valid YAML frontmatter (name: notebooklm-experts)
CHECK: File exists at <target-directory>/scripts/ask_question.py

Step 7: Report to User

If ALL checks pass:
"✅ NotebookLM Experts skill installed successfully!

📁 Location: <full-path-to-installation>
🔧 Agent: <user's-agent-name>
📦 Scope: <project-local OR user-level>

Next steps:
1. Reload your AI agent environment:
   - Claude Code: Cmd+R / Ctrl+Shift+P → Developer: Reload Window
   - GitHub Copilot: Restart VS Code
   - CLI tools: Restart shell or run reload command

2. Test the skill:
   - Open chat and say: 'ask my NotebookLM about [topic]'
   - Or share a NotebookLM URL directly

3. First-time setup:
   - The skill requires Python 3.9+ and Google Chrome
   - Run installation: python <install-path>/install.py
   - See README.md for detailed usage instructions"

If ANY check fails:
"❌ Installation failed at: <step-name>

Error details: <error-message>

Common fixes:
- Verify Git is installed: git --version
- Check write permissions for target directory
- Ensure internet connection is active
- Try manual installation from: https://github.com/khengyun/notebooklm-experts-skill

For help: https://github.com/khengyun/notebooklm-experts-skill/issues"

About NotebookLM Experts

Description: Query Google NotebookLM notebooks directly for source-grounded, citation-backed answers from Gemini. Each question opens a fresh browser session, retrieves answers exclusively from uploaded documents, and exits cleanly — drastically reducing hallucinations through document-only responses.

When to use:

  • Mention NotebookLM explicitly
  • Share NotebookLM URL
  • Ask to query documentation
  • Use phrases like "ask my NotebookLM", "check my docs", "query my notebook"

License: MIT
Requirements: Python 3.9+, Google Chrome, Git


Supported Installation Paths

AI Agent Project-Local User-Level (Global)
Claude Code .claude/skills/ ~/.claude/skills/
GitHub Copilot .github/skills/ ~/.github/skills/
OpenAI Codex CLI .codex/skills/ ~/.codex/skills/
Gemini CLI Not supported ~/.gemini-cli/skills/
Generic/Other .agents/skills/ ~/.agents/skills/

Recommendation:

  • Choose project-local if you only need this skill for your current project
  • Choose user-level to use the skill across all your projects

Installation Flow Example

User: "Install this skill: https://gist.github.com/khengyun/3ad656c8b9eea4f1c141389c962f5297"

Agent: "Which AI agent are you using?

  1. Claude Code
  2. GitHub Copilot
  3. OpenAI Codex CLI
  4. Gemini CLI
  5. Other

Also, do you prefer:

  • Project-local installation (only for this workspace)
  • User-level installation (available for all projects)"

User: "Claude Code, user-level"

Agent:

Cloning https://github.com/khengyun/notebooklm-experts-skill...
Installing to ~/.claude/skills/notebooklm-experts-skill/...
Verifying installation...

✅ NotebookLM Experts skill installed successfully!

📁 Location: /Users/yourname/.claude/skills/notebooklm-experts-skill/
🔧 Agent: Claude Code
📦 Scope: User-level (all projects)

Next steps:
1. Reload Claude Code (Cmd+R)
2. Try: "ask my NotebookLM about [topic]"
3. First-time setup: python ~/.claude/skills/notebooklm-experts-skill/install.py

Troubleshooting

Installation Failed

1. "Git not found"

# Check if Git is installed
git --version

# If not installed:
# - Windows: Download from https://git-scm.com/download/win
# - macOS: brew install git
# - Linux: sudo apt-get install git

2. "Permission denied" or "Cannot create directory"

# Check permissions (macOS/Linux)
ls -la ~/.claude/skills/

# Fix permissions
chmod u+w ~/.claude/skills/

# On Windows, run VS Code as Administrator if needed

3. "SKILL.md not found after installation"

  • Verify the repository was cloned correctly
  • Check if all files were copied to target directory
  • Manually verify: ls ~/.claude/skills/notebooklm-experts-skill/SKILL.md

4. "Skill not appearing in chat"

  • Reload your AI agent (Cmd+R or restart VS Code)
  • Check the correct skills directory for your agent (see table above)
  • Verify SKILL.md has valid YAML frontmatter

Getting Help


For AI Agent Developers

When implementing this installation flow:

1. User Interaction Pattern

ALWAYS ask user which agent they use before installation
NEVER assume or auto-detect (leads to wrong paths)
WAIT for explicit user confirmation before proceeding

2. Path Resolution

# Pseudocode
agent_paths = {
    "claude": {
        "project": ".claude/skills/",
        "user": "~/.claude/skills/"
    },
    "copilot": {
        "project": ".github/skills/",
        "user": "~/.github/skills/"
    },
    "codex": {
        "project": ".codex/skills/",
        "user": "~/.codex/skills/"
    },
    "gemini": {
        "project": None,
        "user": "~/.gemini-cli/skills/"
    }
}

def get_install_path(agent, scope):
    path = agent_paths[agent][scope]
    if path.startswith("~"):
        return os.path.expanduser(path)
    return os.path.join(workspace_root, path)

3. Error Handling

- Catch git clone failures (network, auth)
- Validate target directory is writable
- Verify SKILL.md exists and is valid YAML
- Provide actionable error messages with fixes
- Log all operations for debugging

4. Post-Install

- Store installation metadata: {path, agent, scope, timestamp, version}
- Support update/reinstall without duplication
- Offer to run skill's install.py if it exists
- Suggest next steps specific to user's agent

Resources


Quick Reference

To install this skill, users should:

  1. Copy this message to their AI agent:

    Install this skill: https://gist.github.com/khengyun/3ad656c8b9eea4f1c141389c962f5297
    
  2. Answer the agent's questions:

    • Which agent? (Claude Code / Copilot / Codex / Gemini / Other)
    • Scope? (Project-local / User-level)
  3. Wait for installation to complete

  4. Reload their agent environment

  5. Test with: "ask my NotebookLM about [topic]"

That's it! The agent handles everything else automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment