telegram-post
# Telegram Post Skill
What this skill does
# Telegram Post Skill
Create, preview, and send formatted Telegram posts from draft markdown files. Built for [@klodkot](https://t.me/klodkot) and Gleb Kalinin's other Telegram channels.
**Note:** Channel configurations (footers, tags, language defaults) are specific to Gleb's channels. To use for your own channels, edit `CHANNEL_CONFIG` in `scripts/post.py`.
**Configured channels:** [@klodkot](https://t.me/klodkot), @mentalhealthtech, @toolbuildingape, @opytnymputem
## When to Use
Use this skill when:
- User asks to create a draft for a Telegram channel
- User asks to "post to Telegram" or "send to saved messages" from a draft file
- User wants to preview a draft before sending
- Draft files in `Channels/*/drafts/` need to be sent
## Commands
### `create` -- Create a new draft
```bash
# Default: klodkot channel
python3 scripts/post.py create "remotion-video-creation" --topic "Remotion Agent Skill" --source "https://example.com"
# Other channel
python3 scripts/post.py create "therapy-app-review" -c mental-health-tech --topic "Therapy apps"
# With video
python3 scripts/post.py create "demo-post" --video demo.mp4 --source "https://example.com"
```
Creates `Channels/{channel}/drafts/YYYYMMDD-{slug}.md` with proper frontmatter. Returns file path and tags reference for the channel.
Options:
- `--channel, -c`: Channel name (default: klodkot). Use `list` to see all
- `--topic, -t`: Topic for frontmatter
- `--source, -s`: Source URL
- `--video, -v`: Video filename (just name, not path)
- `--language, -l`: Override channel default (ru/en)
### `send` -- Send a draft
```bash
# Preview first (always do this)
python3 scripts/post.py send "Channels/klodkot/drafts/20260209-post.md" --dry-run
# Send to Saved Messages (default)
python3 scripts/post.py send "Channels/klodkot/drafts/20260209-post.md"
# Send to specific chat
python3 scripts/post.py send "draft.md" --chat "@klodkot"
python3 scripts/post.py send "draft.md" -c "Tool Building Ape"
```
### `list` -- List available channels
```bash
python3 scripts/post.py list
```
Returns: klodkot, mental-health-tech, tool-building-ape, opytnym-putem with language and tags info.
## Draft File Format
```markdown
---
created_date: '[[YYYYMMDD]]'
type: draft
channel: klodkot
status: draft
language: ru
topic: Topic description
source: https://example.com
video: demo.mp4
---
## Post Title
Content with **bold** and *italic* and [links](url).
---
Second part (separate message).
```
### Video Path Resolution
The `video:` field should be just the filename (e.g., `demo.mp4`), NOT `attachments/demo.mp4`. Resolution order:
1. Relative to draft file directory
2. `../attachments/` (sibling to drafts folder)
3. `Channels/klodkot/attachments/`
4. Vault root
## Markdown to Telegram HTML Conversion
| Markdown | Telegram |
|----------|----------|
| `## Header` | `<b>Header</b>` |
| `**bold**` | `<b>bold</b>` |
| `*italic*` | `<i>italic</i>` |
| `_italic_` | `<i>italic</i>` |
| `[text](url)` | `<a href>` link |
| `* item` / `- item` | arrow format |
| `# Title` | stripped |
## Safety
- **Formatting check**: If stray `*`, `**`, `#`, or `[]()` remain after conversion, the script **refuses to send** and reports `formatting_warnings`
- `--dry-run` previews without sending
- Default target is Saved Messages, not channel -- prevents accidental publishes
## Typical Workflow
```bash
# 1. Create draft
python3 scripts/post.py create "remotion-skills" --topic "Remotion" --source "https://..."
# 2. Edit the draft in Obsidian (fill in content, add tags from tags reference)
# 3. Preview
python3 scripts/post.py send "Channels/klodkot/drafts/20260211-remotion-skills.md" --dry-run
# 4. Send to saved messages for final review
python3 scripts/post.py send "Channels/klodkot/drafts/20260211-remotion-skills.md"
# 5. When ready, send to channel
python3 scripts/post.py send "Channels/klodkot/drafts/20260211-remotion-skills.md" -c "@klodkot"
```
## Post-Publish (automatic when sending to channel)
When target is a channel (`@klodkot`, `@mentalhealthtech`), after successful send:
1. Updates frontmatter: `type: published`, `published_date`, `telegram_message_id`
2. Moves file from `drafts/` to `published/`
3. Adds entry to channel index (`klodkot.md`)
Does NOT trigger for Saved Messages (default target) -- safe for preview sends.
## Key Features
- **HTML formatting** via `parse_mode='html'` (Telethon direct, not subprocess)
- **Video with caption** on first message (not separate reply)
- **Channel footers** auto-appended (klodkot, mental-health-tech)
- **Multi-part splitting** by `---` markers, respects 4096 char limit
- **Channel-aware** draft creation with correct paths, language, tags reference
- **Post-publish** auto moves draft to published, updates frontmatter + index
## Dependencies
- Uses `telegram` skill credentials (`~/.telegram_dl/`)
- Python 3.10+, telethon
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.