ワンクリックで
flatline-knowledge
Query Flatline protocol knowledge base via NotebookLM integration
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Query Flatline protocol knowledge base via NotebookLM integration
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Security and quality audit of application codebase
Autonomous agent execution mode
Bridgebuilder — Autonomous PR Review
Triage a bug report through structured phases and create micro-sprint
L2 cost-budget enforcer — daily token cap with fail-closed semantics under uncertainty (billing-API primary, internal counter fallback, periodic reconciliation cron)
L5 cross-repo status reader — reads structured cross-repo state via gh API with TTL cache + stale fallback, BLOCKER extraction from NOTES.md, per-source error capture, p95 <30s for 10 repos
| name | flatline-knowledge |
| description | Query Flatline protocol knowledge base via NotebookLM integration |
| allowed-tools | Read, Grep, Glob |
| capabilities | {"schema_version":1,"read_files":true,"search_code":true,"write_files":false,"execute_commands":false,"web_access":false,"user_interaction":false,"agent_spawn":false,"task_management":false} |
| cost-profile | lightweight |
Provides optional NotebookLM integration for the Flatline Protocol, enabling external knowledge retrieval from curated AI-powered notebooks.
This skill automates browser interaction with Google NotebookLM to query organizational knowledge bases. It serves as a Tier 2 knowledge source, supplementing the local grimoire search (Tier 1).
Flatline Protocol
│
▼
┌─────────────────┐
│ Knowledge Hub │
├─────────────────┤
│ Tier 1: Local │◄── Framework learnings, project context
│ Weight: 1.0 │ (always available)
├─────────────────┤
│ Tier 2: NLML │◄── NotebookLM curated sources
│ Weight: 0.8 │ (this skill, optional)
└─────────────────┘
# Check if NotebookLM is configured and authenticated
if not config.notebooklm.enabled:
return {"status": "disabled", "results": []}
if not auth_session_valid():
warn("NotebookLM session expired. Using local knowledge only.")
return {"status": "auth_expired", "results": []}
# Launch browser with persistent session
async with patchright.async_playwright() as p:
browser = await p.chromium.launch_persistent_context(
user_data_dir="~/.claude/notebooklm-auth/",
headless=True
)
# Navigate to notebook
page = await browser.new_page()
await page.goto(f"https://notebooklm.google.com/notebook/{notebook_id}")
# Submit query
query = f"{domain} {phase} best practices"
await page.fill("textarea[aria-label='Ask']", query)
await page.click("button[aria-label='Submit']")
# Wait for response
await page.wait_for_selector(".response-content", timeout=30000)
# Extract results
response = await page.text_content(".response-content")
citations = await page.query_selector_all(".citation")
# Return structured knowledge
return {
"status": "success",
"results": [
{
"content": response,
"citations": [c.text for c in citations],
"source": "notebooklm",
"weight": 0.8,
"latency_ms": elapsed
}
]
}
| Scenario | Behavior | User Impact |
|---|---|---|
| NotebookLM disabled | Skip gracefully | None (silent) |
| Auth expired | Warn, fallback to local | Warning message |
| Timeout (>30s) | Warn, fallback to local | Warning message |
| Browser unavailable | Warn, fallback to local | Warning message |
| Network error | Warn, fallback to local | Warning message |
Critical: This skill NEVER blocks the Flatline Protocol workflow. All failures result in graceful fallback to local knowledge.
In .loa.config.yaml:
flatline_protocol:
knowledge:
notebooklm:
enabled: false # Disabled by default
notebook_id: "your-notebook-id"
timeout_ms: 30000
headless: true
See resources/auth-setup.md for detailed instructions.
Quick start:
python resources/notebooklm-query.py --setup-auth~/.claude/notebooklm-auth/The orchestrator calls this skill automatically when:
flatline_protocol.knowledge.notebooklm.enabled: true# Dry run (no browser)
python resources/notebooklm-query.py --domain "security" --phase prd --dry-run
# With authentication
python resources/notebooklm-query.py --domain "crypto wallet" --phase sdd --notebook "loa-learnings"
# Setup authentication
python resources/notebooklm-query.py --setup-auth
{
"domain": "crypto wallet authentication",
"phase": "prd",
"notebook_id": "abc123",
"timeout_ms": 30000
}
{
"status": "success",
"results": [
{
"content": "Key considerations for crypto wallet PRDs include...",
"citations": ["Source 1", "Source 2"],
"source": "notebooklm",
"weight": 0.8
}
],
"latency_ms": 5234
}
| Metric | Target | Measurement |
|---|---|---|
| Latency P50 | <10s | From query submit to response |
| Latency P95 | <25s | Browser automation overhead |
| Success rate | >90% | When enabled and authenticated |
| Timeout rate | <5% | Queries exceeding 30s |
~/.claude/notebooklm-auth/"Auth session expired"
--setup-auth to refresh authentication"Browser not found"
which chromiumapt install chromium / brew install chromium"Timeout waiting for response"
"Module patchright not found"
pip install patchrightresources/notebooklm-query.py - Browser automation scriptresources/requirements.txt - Python dependenciesresources/auth-setup.md - Authentication documentation