본문으로 건너뛰기
cccskills
무료GitHub에 공개

health-sync

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".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구TelegramObsidian
설치 방법 보기

포함된 파일(1)

  • SKILL.md5.6 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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.
    • <YOUR_CHAT_ID> medicine-health-main
    • <YOUR_CHAT_ID> blood-pressure
    • <YOUR_CHAT_ID> longevity-weightloss-fasting
    • <YOUR_CHAT_ID> vitamins-bads
    • <YOUR_CHAT_ID> healing-head
    • <YOUR_CHAT_ID> medicine-for-mind
    • <YOUR_CHAT_ID> 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:

  1. Health-check the Telegram MCP: call mcp__telegram__get_me. If it errors, STOP and report "Telegram MCP is down — skipped".
  2. Read watermarks: load $IMPORTS_ROOT/health/watermarks.json -> {chat_id: max_msg_id}.
  3. 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.
  4. 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).
  5. Run: python $IMPORTS_ROOT/health/merge_health_raw.py (merges raw_new* into raw*, dedup by id; writes last_merge.json).
  6. Read $IMPORTS_ROOT/health/last_merge.json. If total_new == 0: STOP and report "No new health messages." Do nothing else.
  7. 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.
  8. Run: python $IMPORTS_ROOT/health/run_health_pipeline.py (parse -> generate -> moc -> dashboard -> validate; expects BROKEN=0).
  9. 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.)
  10. 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).
  11. 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 part of 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.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

03

무료

Run an autonomous consensus round between agent peers on several machines: they negotiate a decision over a shared channel and execute it without a human relaying messages. Use when multiple machines must agree on a change. Triggers: "/03", "work it out among yourselves", "find consensus". Wakes the human only for irreversible actions or a deadlock.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tonydzi/second-brain-starter-kit122026년 10월 20일 업데이트

1

무료

Recover a session after a hard crash (app died, machine rebooted, context lost mid-work): replay the turn-state ledger for the last requests, files and decisions, run a green/red health ping over the system map, file sync and MCP connectors, then rebuild the previous session history for pickup. Triggers: "/1", "resume after crash", "wake".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tonydzi/second-brain-starter-kit122026년 10월 20일 업데이트

agenda

무료

Show the operator's day: today's calendar plus what needs them personally (leads due, people awaiting a reply, deadlines), pulled from Calendar and Telegram and ranked. Read-only: sends and commits nothing. Triggers: "/agenda", "what's on today", "my agenda".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tonydzi/second-brain-starter-kit122026년 10월 20일 업데이트

ai-slop

무료

Rewrite machine-written text so it reads like a busy human wrote it: cut 50-70%, break the even rhythm, drop AI-tell words and filler, keep facts and protected terms. Use before publishing any post, reply or email drafted by a model. Triggers: /ai-slop, /slop, humanize, anti-slop, make it shorter and alive.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tonydzi/second-brain-starter-kit122026년 10월 20일 업데이트

Decision protocol for strategic work: recall the knowledge vault, run a gap analysis, emit a deep-research prompt for external tools, then synthesize the returned reports into a decision memo. Use before any new product, feature, market, pricing, GTM or architecture call, where local recall alone is not enough. Triggers: "/alfa-search-recall-deepresearch", "alpha protocol", "R+DR".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tonydzi/second-brain-starter-kit122026년 10월 20일 업데이트

- КРЕДИТ АВТОРУ ИДЕИ: совет из комментария (TG @ClawRus / @ClawInga, комменты под постами Антона в FB, треды и issue на… Триггеры: “/alpha-credit“, “/credit“, “кто нам это посоветовал“, “запиши совет“, “поблагодари советчиков“, “кому мы должны спасибо“, “кредит автору“, “чей это был совет“, “credit the author“

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tonydzi/second-brain-starter-kit122026년 10월 20일 업데이트

tonydzi의 스킬 모두 보기

이 스킬의 문제 신고