Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add tonydzi/second-brain-starter-kit --skill whatsapp-syncgit clone --depth 1 https://github.com/tonydzi/second-brain-starter-kitWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/tonydzi/second-brain-starter-kit/whatsapp-sync)<a href="https://agentmods.dev/skills/tonydzi/second-brain-starter-kit/whatsapp-sync"><img src="https://agentmods.dev/badge/skills/tonydzi/second-brain-starter-kit/whatsapp-sync/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/tonydzi/second-brain-starter-kit/whatsapp-sync"><img src="https://agentmods.dev/badge/skills/tonydzi/second-brain-starter-kit/whatsapp-sync.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00080 | $0.02559 |
| Opus 5 | $0.00040 | $0.01280 |
| Sonnet 5 | $0.00016 | $0.00512 |
| Haiku 4.5 | $0.00008 | $0.00256 |
Grade A, and why
whatsapp-sync scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
- On Windows `subprocess.terminate()/.kill()` does NOT reliably kill the node child → zombies ACCUMULATE (found 11 once). Any spawn script must `taskkill /F /T /PID <its-own-pid>` in a finally block (see `nightly_pull.py How it starts
The opening of the file, as written. The whole thing — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.
OBJECTIVE: Refresh the WhatsApp slice of the Second Brain — pull the recent text the live bridge exposes, rebuild the SQLite+FTS5 data layer, re-resolve names, re-label active groups, rebuild the dashboard, and refresh the vault notes (MOC + groups + optionally contact notes). Fully deterministic except the group-label step (Sonnet). Idempotent: build_db.py is a full rebuild from raw_train/, so re-runs never duplicate.
CONTEXT:
- Live bridge =
@oss_maintainer/whatsapp-mcp(Baileys), main number "Tony PaloAlto ResearchLab" (jid[email protected]). Memory [[whatsapp-mcp-integration]] has the full setup + pairing playbook. - Pipeline home:
$IMPORTS_ROOT/whatsapp/. Data:whatsapp_train.db(SQLite+FTS5) +raw_train\(JSON). Vault home:$OBSIDIAN_VAULT/01-Conversations/WhatsApp/(_WhatsApp-MOC.md,_WhatsApp-Groups.md, 9 contact notes). Dashboard:_Dashboards\WhatsApp-Dashboard.html. - SCOPE: TEXT ONLY. Never
download_media; ignore thehasMediaflag. - Model routing: the group-label step is grunt classification → Sonnet subagent (per [[model-routing-sonnet-grunt]]). Contact-note summaries (CRM intel, not Anton's authorial voice) → Sonnet draft acceptable under the quality gate; escalate to Opus if weak.
⚠️ HARD SAFETY (corrected model, proven 2026-06-16):
- A 2nd client doing READ-ONLY (list_chats/list_messages) does NOT trigger AUTH_KEY_DUPLICATED — the server degrades it to read-only and coexists. Only WRITE ops (resolve_contacts) need sole-client (else they error harmlessly into read-only). So a read pull can run alongside the registered MCP.
- On Windows
subprocess.terminate()/.kill()does NOT reliably kill the node child → zombies ACCUMULATE (found 11 once). Any spawn script musttaskkill /F /T /PID <its-own-pid>in a finally block (seenightly_pull.py). The nightly twin does this; it kills ONLY its own child, never the registered server. - Gentle on the main number ([[telegram-safety]] sibling): read-only, modest pacing; ban-risk was accepted consciously (variant A).
STEPS:
- PULL-MODE decision. Call
mcp__whatsapp__get_my_profile.- If it returns the profile → bridge is LIVE → use PULL-LIVE (step 2a). NEVER spawn
train_pull.py. - If the tool is absent/errors (headless) → use PULL-SPAWN (step 2b). 2a. PULL-LIVE (preferred, no double-client risk):
mcp__whatsapp__list_chats {limit:100}→ the chat list (jid, name, isGroup).- For EACH chat:
mcp__whatsapp__list_messages {jid, limit:50}(bump to 100 only if a chat is high-value). Collect {id, from, fromMe, type, text, timestamp, hasMedia}. Pace gently. - Assemble
$IMPORTS_ROOT/whatsapp/live_pull.json=[{jid,name,isGroup,messages:[...]}, ...](Write tool) and runpython ingest_live.py(→ raw_train/ + train_summary.json, the format build_db eats). 2b. PULL-SPAWN (headless only): pre-flight kill stray node, thenpython train_pull.py(it spawns ONE temporary client, waits ~45s for history sync, writes raw_train/ + train_summary.json), then hard-kill node.
- If it returns the profile → bridge is LIVE → use PULL-LIVE (step 2a). NEVER spawn
- BUILD DATA:
python build_db.py(drops + rebuildswhatsapp_train.dbfrom raw_train/ — idempotent; categorizes; named=0/1). - NAMES (DMs): if PULL-SPAWN,
python names_fix.py(resolve_contacts + re-snapshot chats2.txt). If PULL-LIVE, optionally callmcp__whatsapp__resolve_contacts {resync:true}then re-list to upgrade numeric DM names. (Group subjects: the server is PATCHED to fetch real group subjects via groupMetadata onget_chat— after the next MCP restartlist_messages/get_chatreturn real names; until then groups are labeled by content in step 6.) - DASHBOARD:
python build_dash_export.py(→_Dashboards\WhatsApp-Dashboard.html+valuable_chats.json). - GROUP LABELS (active groups, n_mine≥3):
python extract_active_groups.py(→active_groups.json, compact content samples, 0 tokens).- Spawn ONE Sonnet subagent (Agent tool, model:'sonnet') to read
active_groups.jsonand writegroup_labels.json=[{jid,label,category,lang,confidence,one_line}](categories: work-business|household-community|project-windmill|family-personal|crypto-web3|longevity-health|services-vendors|other). No media, no WhatsApp tools. python apply_group_labels.py(writes labels into DB, named=2 = INFERRED) then re-runpython build_dash_export.pyso the dashboard shows the labels. 6.5 GRAPH-LINK (Rail 1 people + Rail 2 concepts — the [[relink-mechanism]] applied to WhatsApp; rich path only):python link_people.py(0 tokens): phone-join WhatsApp DM jid (=phonelast10) →apple-contacts\contacts.db→vault_matches→ CRM/person note →people_matches.json. Phone match = T1 (trust); name-only = T2 (DO NOT trust — surname-blind false positives).- For T2 candidates spawn a Sonnet judge (Agent, model:'sonnet') →
people_verified.json(conservative: confirm only on surname+role match, else null = WA note stays canonical). Identity-critical: a wrong link corrupts the graph. - Concepts: create/confirm any NEW topic-concept (windmill-park, etc.) per concept-creation-rules (DUP-CHECK first — e.g. household already =
concept-bible-household/concept-bible-staff-hr). python link_apply.py(idempotent): writes "## 🔗 Graph" into each WA note (verified person/CRM + concepts) + back-links into the 4 rich targets = BIDIRECTIONAL. Run AFTER vault_backup. Verify 0 broken targets.
- VAULT (BACKUP FIRST — [[vault-backup-rule]]):
python $IMPORTS_ROOT/vault_backup.py, then:python build_groups_note.py(→_WhatsApp-Groups.md).- Refresh
_WhatsApp-MOC.mdcounts if chat/msg totals changed. (Contact notes: refresh only if a key chat changed materially — keep open-action-items current; that's the high-value part.)
- REINDEX (RAG): rely on the nightly Brain Reindex @04:00, or
python $IMPORTS_ROOT/brain_embed_update.py --wait-gpu 10if Anton wants it searchable now. - REPORT: chats/msgs pulled, named vs ✎-inferred counts, new/changed open-action-items flagged for Anton, dashboard path. End with a 🧒 In plain words recap (messages TO Anton only).
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 78 lines · 80 tokens per session scan A 660b28834ddf
whatsapp-sync is a skill published in the GitHub repository tonydzi/second-brain-starter-kit (6 stars, last pushed yesterday), licensed MIT. It adds 80 tokens to every session and 2,559 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-09.
Other skills, from other repositories
ingest
A tool for adding a URL, file, text, or Inbox item to the LLM Wiki. It checks the material's purpose, preserves the original source, compiles a wiki page, updates indexes and logs, and reviews the result.
obsidian-bases
Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries. Use when working with .base files, creating database-like views of notes, or when the user mentions Bases, table views, card views, filters, or formulas in Obsidian.
wiki-ingest
Ingest supplied source material into an Obsidian vault with provenance and claim tracking: pasted text, files staged in the selected vault's inbox or .raw archive, or explicitly approved URLs. Use for a single source or bounded batch, not for saving an assistant answer. Triggers: ingest, ingest this file, ingest this…
autoresearch
Run a bounded, source-grounded research loop, draft a cited dossier, and optionally propose a separately reviewed canonical vault merge. Use when the user wants autonomous or deep research that may access the public web. Triggers: /autoresearch, autoresearch, research this topic, deep dive into, investigate, find…
wiki-retrieve
Build and query a vault-local contextual BM25 retrieval index with optional multilingual Nomic cosine reranking; use for retrieve, hybrid retrieval, BM25, rerank, contextual retrieval, chunk search, vault search, semantic search, find relevant passages, or retrieval diagnostics. Derived caches stay under .vault-meta…
canvas
Create, inspect, and update Obsidian JSON Canvas boards with text, file, link, group, and edge nodes. Use for canvas status, canvas lists, visual maps, zones, spatial layouts, adding vault notes or media to a .canvas file, and requests such as create canvas, add to canvas, or put this on the canvas.