From self-improving-agent
Token-optimierte Research-Pipeline via Perplexity → NotebookLM → Claude. Spart ~95% Claude-Tokens bei Web-Recherche.
How this skill is triggered — by the user, by Claude, or both
Slash command
/self-improving-agent:research-pipelineThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Token-optimierte Recherche durch Auslagerung an spezialisierte Tools.
Token-optimierte Recherche durch Auslagerung an spezialisierte Tools.
┌─────────────────────────────────────────────────────────┐
│ Phase 1: SUCHE (Perplexity) GRATIS* │
│ ───────────────────────────────────────────── │
│ → Browser oeffnen → Perplexity Suchanfrage │
│ → Links + Zusammenfassung extrahieren │
│ → Lokal speichern: research/<topic>-<date>.md │
├─────────────────────────────────────────────────────────┤
│ Phase 2: INGEST (NotebookLM) GRATIS │
│ ───────────────────────────────────────────── │
│ → Links aus Phase 1 in NotebookLM Notebook laden │
│ → Notebook benennen nach Thema │
│ → Gemini indexiert automatisch alle Quellen │
├─────────────────────────────────────────────────────────┤
│ Phase 3: ANALYSE (NotebookLM RAG) GRATIS │
│ ───────────────────────────────────────────── │
│ → Gezielte Fragen an NotebookLM stellen │
│ → Antworten extrahieren und lokal speichern │
│ → Optional: Studio-Output (Mindmap, Bericht, etc.) │
├─────────────────────────────────────────────────────────┤
│ Phase 4: INTEGRATION (Claude) ~3K Tok │
│ ───────────────────────────────────────────── │
│ → Gespeicherte Ergebnisse lesen (lokale Dateien) │
│ → In Projekt integrieren (Code, Docs, Architektur) │
│ → Entscheidungen treffen basierend auf Research │
└─────────────────────────────────────────────────────────┘
* Perplexity Pro = Flatrate, Free Tier = 5 Pro Searches/Tag
| Schritt | Nur Claude | Mit Pipeline |
|---|---|---|
| Web-Suche | ~10-20K Tokens | 0 (Perplexity) |
| Quellen lesen | ~50-100K Tokens | 0 (NotebookLM) |
| Synthese | ~5K Tokens | 0 (NotebookLM RAG) |
| Ergebnis lesen | — | ~2-3K Tokens |
| Gesamt | ~70-125K | ~3K |
Ersparnis: ~95%
https://www.perplexity.aibrowser_evaluateresearch/<topic>-<YYYY-MM-DD>.mdPrompt-Template fuer Perplexity:
<Thema> - Focus on:
1) Real-world implementations and GitHub repos
2) Best practices and common patterns
3) Cost/performance tradeoffs
4) Security considerations
notebooklm create "Research: <topic>" --json (ID aus id-Feld parsen)notebooklm use <notebook_id>notebooklm source add "<url>" --json (source_id merken)notebooklm source wait <source_id> -n <notebook_id> --timeout 600 (Exit-Code 2 = Timeout → Quelle ueberspringen, weiter mit naechster)notebooklm ask "Was sind die konkreten Use Cases fuer X?" --json
notebooklm ask "Vergleiche Ansatz A vs B" --json
notebooklm ask "Welche Risiken und Einschraenkungen gibt es?" --json
notebooklm generate report --format briefing-doc)JA — Pipeline nutzen wenn:
NEIN — Direkt Claude nutzen wenn:
research/
├── <topic>-<YYYY-MM-DD>.md # Perplexity-Ergebnis (roh)
├── <topic>-analysis-<YYYY-MM-DD>.md # NotebookLM-Analyse
└── <topic>-links.md # Extrahierte Links fuer NotebookLM
Problem: Perplexity gibt Fehler zurueck oder Rate-Limit (Free Tier: 5 Pro Searches/Tag) ist erschoepft.
Fallback: WebSearch-Tool direkt nutzen:
→ WebSearch("<thema> best practices site:github.com OR site:stackoverflow.com")
→ Ergebnisse manuell in research/<topic>-<YYYY-MM-DD>.md speichern
→ Mit Phase 4 fortfahren (Phase 2-3 optional)
Problem: notebooklm Befehl nicht gefunden (command not found oder ModuleNotFoundError).
Fallback: Phase 2 und 3 ueberspringen, Perplexity-Ergebnisse direkt in Phase 4 verwenden:
→ research/<topic>-<YYYY-MM-DD>.md mit Read-Tool laden
→ Direkt mit Claude-Integration (Phase 4) fortfahren
→ Token-Ersparnis reduziert sich, aber Pipeline bleibt funktional
Problem: notebooklm create gibt Fehler zurueck (z.B. API-Fehler, Netzwerkproblem).
Vorgehen:
notebooklm create "Research: <topic>" erneut ausfuehrenresearch/<topic>-inline-<YYYY-MM-DD>.md speichernProblem: notebooklm source wait haengt oder Quelle wird nicht innerhalb von 60s indexiert.
Vorgehen:
→ Warning loggen: "⚠ Source <url> timeout — wird uebersprungen"
→ Mit erfolgreich importierten Quellen fortfahren
→ Mindestens 1 Quelle muss erfolgreich sein, sonst zu Phase-2-Fehler-Fallback wechseln
Problem: notebooklm ask gibt leere Antwort oder "No relevant content found" zurueck.
Vorgehen:
# Original (zu spezifisch):
notebooklm ask "Was sind die konkreten Implementierungsdetails fuer X in Kontext Y?" --json
# Vereinfacht:
notebooklm ask "X erklaeren" --json
Problem: NotebookLM CLI gibt AuthenticationError, 401 Unauthorized oder Token expired zurueck.
Vorgehen:
→ Nutzer auffordern: `notebooklm login` ausfuehren
→ Pipeline pausieren bis Bestaetigung erfolgt
→ Ab Phase 2 neu starten (Phase 1 Ergebnis bleibt gueltig)
notebooklm-py CLI installiert (pip install notebooklm-py)notebooklm loginCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub dynamic-dome/self-improving-agent