health-sync
Skill6 starsChanged 2 months agoMITView on GitHub
Pull fresh messages from a set of health-related Telegram chats (medicine, supplements, longevity, fasting) into an Obsidian vault. Incremental and idempotent by message id, and the manual counterpart of the weekly job. Triggers: "/health-sync", "pull the health chats".
1 other project uses a version of this.
Adopted by
Most recently taken up by
- somz22/personal-health-fitbittheir own version, first seen Mar 21, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- somz22/personal-health-fitbit★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository100 other files it gives its agents.
- AGENTS.mdAGENTS.md
- 03Skill
- 1Skill
- agendaSkill
- alfa-search-recall-deepresearchSkill
- alpha-judgeSkill
- alpha-reviewSkill
- archSkill
- askSkill
- bibleSkill
- brainSkill
- busSkill
- canon-revisionSkill
- ccSkill
- chatgpt-syncSkill
- chat-searchSkill
- chatSkill
- claudeai-syncSkill
- coachSkill
- codex-mirrorSkill
- codex-reviewSkill
- cofounderSkill
- cofounder-watchSkill
- commentsSkill
- community-alphaSkill
- content-mineSkill
- crm-syncSkill
- declinedSkill
- dedupSkill
- defuddleSkill
- dr-fanoutSkill
- episodeSkill
- faaa-syncSkill
- faSkill
- fb-postSkill
- fb-replySkill
- fb-watchSkill
- findSkill
- fireflies-syncSkill
- five-hardSkill
- fleetSkill
- follower-onboardSkill
- geminiSkill
- gitbook-importSkill
- gmailSkill
- granola-syncSkill
- handoffSkill
- inboxSkill
- intakeSkill
- intentionSkill
- introSkill
- issue-matchSkill
- journeySkill
- last30daysSkill
- local-chatgpt-token-healSkill
- mcpSkill
- migrateSkill
- mine-channelSkill
- n8nSkill
- notebooklmSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 27
Read watermarks: load $IMPORTS_ROOT/health/watermarks.json -> {chat_id: max_msg_id}.
- Very specific: line 30
Run: python $IMPORTS_ROOT/health/merge_health_raw.py (merges raw\_new\* into raw\*, dedup by id.
- Very specific: line 31
Read $IMPORTS_ROOT/health/last_merge.json.
- Very specific: line 33
Run: python $IMPORTS_ROOT/health/run_health_pipeline.py (parse -> generate -> moc -> dashboard -> validate.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
OBJECTIVE: Pull fresh messages from Anton's 7 Telegram health chats and incrementally fold them into the Obsidian vault (day-ledgers + atomic notes + MOC + dashboard), on demand. Fully idempotent (dedup by Telegram message id). Identical pipeline to the weekly task health-weekly-sync; the only difference is this fires when Anton asks.
CONTEXT:
- 7 source chats (registry: $IMPORTS_ROOT/health/chats.json). ALWAYS pull with the Telegram MCP using account="default" (@work_acct_a); the other account errors (GEN-ERR-862) on these basic groups.
- -713270622 medicine-health-main
- -278366896 blood-pressure
- -771718625 longevity-weightloss-fasting
- -656827278 vitamins-bads
- -260984215 healing-head
- -175731578 medicine-for-mind
- -8169212160 fasting-community
- Vault home: $OBSIDIAN_VAULT/01-Conversations/Telegram/Health/ (per-chat folders + posts\ + _Health-MOC.md). Dashboard: _Dashboards\Health-Dashboard.html. Scripts + watermarks + raw: $IMPORTS_ROOT/health/.
- Watermark per chat (last imported msg id) = $IMPORTS_ROOT/health/watermarks.json (keyed by chat_id as string).
- Provenance: health data is NOT private (Anton's explicit instruction) — do NOT tag #private. Anton's own messages -> origin: anton (+ #anton-original); forwarded -> origin: external (+ forwarded_from); community members (fasting-community) -> origin: external.
STEPS:
- Health-check the Telegram MCP: call mcp__telegram__get_me. If it errors, STOP and report "Telegram MCP is down — skipped".
- Read watermarks: load $IMPORTS_ROOT/health/watermarks.json -> {chat_id: max_msg_id}.
- For EACH of the 7 chats: call mcp__telegram__get_new_messages_since(chat_id=
<id>, min_id=<watermark for that id>, account="default") (or get_history limit 100 then keep id > watermark). Collect the message objects with id > watermark. - For each chat, write its new messages (id > watermark) VERBATIM to $IMPORTS_ROOT/health/raw/_new/
<slug>.json as a JSON array of the raw message objects (every field: id, sender, sender_id, date, out, text, media, forwarded, reply_to, grouped_id, pinned, edited, action). NEVER truncate or paraphrase text. If a chat has no new messages, write [] (or skip its file). - Run: python $IMPORTS_ROOT/health/merge_health_raw.py (merges raw_new* into raw*, dedup by id; writes last_merge.json).
- Read $IMPORTS_ROOT/health/last_merge.json. If total_new == 0: STOP and report "No new health messages." Do nothing else.
- BACKUP FIRST (vault-backup-rule): run python $IMPORTS_ROOT/vault_backup.py. If it reports a git index.lock from a concurrent process, note it but proceed — the import is purely ADDITIVE to the Health folder (reversible by deleting new files); never force-remove another process's lock.
- Run: python $IMPORTS_ROOT/health/run_health_pipeline.py (parse -> generate -> moc -> dashboard -> validate; expects BROKEN=0).
- Robocopy staging into the vault (PowerShell): robocopy "$IMPORTS_ROOT/health/staging" "$OBSIDIAN_VAULT/01-Conversations/Telegram/Health" /E /XO /NFL /NDL /NJH /NJS (exit code 0-7 = success.)
- Reindex for RAG (so the new notes are searchable): python $IMPORTS_ROOT/brain_embed_update.py --wait-gpu 10 (or rely on the nightly Brain Reindex at 04:00 if the GPU is busy).
- Report: new messages per chat, new atomic notes / ledgers created, the new watermarks (max ids), and confirm BROKEN=0. End with a 🧒 In plain words recap (messages TO Anton only).
CONSTRAINTS:
- WINDOWS cp1252: never print Cyrillic to python stdout (crashes) — write results to UTF-8 files and Read them; keep python stdout ASCII (counts/slugs only).
- INCREMENTAL ONLY by design, but the pipeline is a full deterministic rebuild of staging from the archive (idempotent) + robocopy /XO — it never duplicates and never deletes existing vault notes.
- Raw files may have a UTF-8 BOM (the scripts read utf-8-sig) — fine.
- Faithful raw import: write message text VERBATIM into raw_new files. The atomic-note bodies are the raw text; do not summarize.
RELATION (do not duplicate):
- Scheduled twin: $USERPROFILE/.claude/scheduled-tasks/health-weekly-sync/ (Mondays) — same scripts.
- First-time backfill design + counts: memory [[health-import]].
- Sibling pattern: [[faaa-sync]] (CRM calls). Reuses the FAAA weekly-sync architecture.
<!--kit-footer-->Like this skill? It is one of 100 in second-brain-starter-kit: the second brain we built for ourselves and run every day at Palo Alto AI Research Lab. Install the whole set with npx skills add tonydzi/second-brain-starter-kit. Everything is open source and free, so take what you need.
Flagships worth a look on their own: secondop-panel (a second opinion from a panel of external models), claude-memory-tidy (stop your agent's memory from rotting), telegram-mcp-kit (your own Telegram over MCP in about 15 minutes).
Author: Anton Dziatkovskii, Palo Alto AI Research Lab. Telegram @tonydzi - WhatsApp +1 341 222 9178 - X @Tony_Stef_
Engineers: want to test-drive this setup? Message me. I hand out free starter seeds to engineers who test and report back, and custom skill requests are welcome.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

