.claude/skills/flatline-knowledge/SKILL.md
Query Flatline protocol knowledge base via NotebookLM integration
npx skillsauth add 0xhoneyjar/loa-finn flatline-knowledgeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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 documentationtesting
# valid-skill Test skill with valid license for unit testing. ## Purpose Used in test_constructs_loader.bats to verify correct handling of valid licenses.
testing
# grace-skill Test skill in license grace period for unit testing. ## Purpose Used in test_constructs_loader.bats to verify correct handling of licenses in grace period.
testing
# expired-skill Test skill with expired license for unit testing. ## Purpose Used in test_constructs_loader.bats to verify correct handling of expired licenses.
testing
# skill-b Test skill B from test-pack for unit testing. ## Purpose Used in test_pack_support.bats to verify pack validation and skill loading.