Extract high-quality knowledge from the public internet or user-provided documents, refine core content such as workflows, methodologies, and principles, and automatically encapsulate it into a standardized Skill.
Prerequisites
- NotebookLM Skill is installed: This skill depends on the
notebooklmskill for knowledge collection - Skill Creator is available: Used for final skill encapsulation
- NotebookLM login has been completed:
notebooklm login
Proxy Configuration (Required in Mainland China)
Set the proxy before all notebooklm commands:
$env:HTTP_PROXY="http://127.0.0.1:7890"
$env:HTTPS_PROXY="http://127.0.0.1:7890"
Login Notes
⚠️ notebooklm login After completing,you must return to the terminal and press ENTERto save the authentication state.
Common Issues Quick Reference
| Issue | Solution |
|---|---|
| All connection attempts failed | Set HTTP_PROXY/HTTPS_PROXY |
| Auth expired still reported after login | After login, you must press ENTER |
| TargetClosedError | Set $env:NOTEBOOKLM_HOME="~/.notebooklm_fix" to switch to a new directory |
Workflow
用户输入 (主题/URL/文档)
↓
阶段1: 知识收集
↓
阶段2: 知识萃取
↓
★ 确认点 ★
↓
阶段3: Skill 封装
↓
交付 Skill
Phase 1: Knowledge Collection
Step 1.1: Clarify the Goal
Ask the user:
- Topic: "From which field/topic do you want to extract knowledge?"
- Source: "Do you have ready-made documents/URLs? Or do you need AI to search for you?"
- Expected Output: "What type of Skill do you want to generate? (Workflow guidance / Methodology reference / Automation scripts)"
Step 1.2: Create a NotebookLM Notebook
notebooklm create "知识萃取: [主题名称]"
Step 1.3: Collect Knowledge Sources
Method A - AI Autonomous Search (Deep Research):
notebooklm source add-research "[搜索查询]" --mode deep --no-wait
notebooklm research wait --import-all
Method B - User-Provided Sources:
# 添加 URL
notebooklm source add "https://..."
# 添加本地文件
notebooklm source add ./document.pdf
Method C - Hybrid Mode (Recommended): First add user documents, then use Deep Research for supplementary search.
Step 1.4: Verify Sources Are Ready
notebooklm source list --json
After confirming that all sources have status = READY, continue.
Phase 2: Knowledge Extraction
Use structured questioning to extract core knowledge from NotebookLM.
Extraction Dimensions
Execute the following questions in order (for the complete Prompt, see extraction_prompts.md):
| Dimension | Purpose | Core Question |
|---|---|---|
| Workflow | Extract step-by-step process | "What is the complete workflow of this method? What specifically does each step do?" |
| Principles | Extract core principles/methodology | "What are the core principles behind it? Why do it this way?" |
| Templates | Extract reusable templates | "Are there templates, frameworks, or checklists that can be reused directly?" |
| Scripts | Detect whether there are scripts | "Does it involve code, scripts, or automation tools?" |
Execute Extraction
# 依次执行萃取提问
notebooklm ask "[Workflow 萃取 Prompt]" --json
notebooklm ask "[Principles 萃取 Prompt]" --json
notebooklm ask "[Templates 萃取 Prompt]" --json
notebooklm ask "[Scripts 萃取 Prompt]" --json
Organize Extraction Results
Organize all extraction results into a structured document in the following format:
# 知识萃取报告: [主题名称]
## Workflow (工作流)
1. 步骤1: ...
2. 步骤2: ...
## Principles (核心原则)
- 原则1: ...(解释 Why)
- 原则2: ...
## Templates (模板)
[如有]
## Scripts (脚本)
[如有,提取代码;如无,标注"无"]
★ Confirmation Point ★
Pause and show the extraction results to the user, to confirm:
- Is the extracted content accurate and complete?
- Is there anything that needs to be supplemented or modified?
- After confirmation, proceed with Skill packaging.
Phase 3: Skill Packaging
Step 3.1: Determine Skill metadata
Determine based on the extraction results:
- name: lowercase + hyphens, e.g.
writing-master - description: [action] + [scenario] + [trigger word]
- Type: workflow guidance / methodology reference / automation script
Step 3.2: Create the directory structure
mkdir -p ~/.gemini/antigravity/Skills/[skill-name]/references
Step 3.3: Generate SKILL.md
Use skill_template.md as the base template, and fill in:
- Frontmatter:name, description
- Overview: description of the Skill's purpose
- Workflow: generated from the Workflow extraction results
- Core Principles: generated from the Principles extraction results
- Templates/References: link to the
references/directory - Examples: provide 1-2 usage scenarios
Step 3.4: Populate references/
Create based on the extracted content:
principles.md: detailed methodologytemplates.md: reusable templates[其他].md: add as needed
Step 3.5: Handle Scripts (if any)
If the extraction results include scripts:
mkdir -p ~/.gemini/antigravity/Skills/[skill-name]/scripts
Save the script code to the scripts/ directory.
Output Checklist
Final deliverables:
[skill-name]/
├── SKILL.md # 主技能文件
├── references/ # 参考资料
│ ├── principles.md # 核心原则(如有)
│ └── templates.md # 模板(如有)
└── scripts/ # 脚本(如有)
Example
User request: "I want to learn this writing blogger's methods; help me turn them into a Skill"
Execution flow:
- Create notebook
notebooklm create "知识萃取: 写作方法论" - Add the blogger's article URL
- Deep Research supplementary search "writing techniques methodology"
- Extract Workflow, Principles, Templates
- User confirms the extraction results
- Generate
writing-master/SKILL.md - Deliver the skill
Notes
- Quality over speed: better to run multiple rounds of extraction than to miss key content
- Dynamic Scripts: scripts are not mandatory; include them if present, omit them if not
- Language style: the generated Skill should be in Chinese, consistent with user habits