Initialize todos for tg-notify skill operation:
[
{"content": "Parse user request and detect mode", "status": "in_progress", "active_form": "Parsing user request and detecting mode"},
{"content": "Resolve tg-notify from PATH and compare the baseline version", "status": "pending", "active_form": "Resolving tg-notify and comparing the baseline version"},
{"content": "Load mode reference and cross-reference guides", "status": "pending", "active_form": "Loading mode reference and guides"},
{"content": "Provide command with verification probe", "status": "pending", "active_form": "Providing command"},
{"content": "Complete tg-notify operation", "status": "pending", "active_form": "Completing tg-notify operation"}
]
Telegram Bot Notifications (CLI)
Use the tg-notify command-line tool, a Go CLI that sends
Telegram messages and files through the Bot API with a self-contained
client. Each operation maps to a mode file in references/modes/.
Operation-independent knowledge (text formatting, file types, retry
policy, configuration) lives in references/guide-*.md files that
modes load on demand. Field-verified failure modes live in
references/gotchas.md.
Tool Availability and Binary Baseline
Resolve the binary from PATH only. The skill has no project fallback
and never builds or installs the binary:
command -v tg-notify >/dev/null 2>&1 || { echo "MISSING: tg-notify"; exit 1; }
tg-notify -v
The definitions in this skill were written against tg-notify
v1.1.20260825, the baseline version. Compare the output of
tg-notify -v against the baseline. If the PATH binary is older than
the baseline, or a documented flag fails with
flag provided but not defined (G-stale), stop and suggest that the
user update the binary, for example with
go install gitlab.com/lyoneel/cli-tg-notify/cmd/tg-notify@latest or
a fresh build from the project. Then resume.
Read references/gotchas.md before executing operations.
Gotchas (field-verified friction)
G1: multi-word positional text must be quoted; unquoted words are
rejected with a quoting hint.
G2: flags work anywhere on the command line; arguments are reordered
before parsing.
G3: an empty parse mode is plain text, and plain text is the default.
G4: the extension table is consulted before the MIME table; unknown
types fall back to document.
G5: a 429 retries exactly once, and that one retry still happens when
--retries 0 is set; transient errors retry up to 60 times by
default; only --no-retry makes a send fully one-shot.
G6: --reply-to and --offset must be non-negative, --retries
must be >= 0, --base-wait must be > 0; mode-mismatched flags are
rejected with an error.
G7: exit codes are 0 for success (also --help and -v) and 1 for
every failure, including flag misuse; there is no exit code 2.
G8: the bot token is scrubbed from error output; request bodies are
never logged.
G9: with no message source, stdin on a terminal prints usage instead
of hanging.
G10: the ./.env file only fills variables that are not already set;
the real environment and flags win.
G11: --file, --url, and --file-id are mutually exclusive; use
exactly one.
G12: --caption and --message each conflict with a positional text
caption.
G13: --dry-run never sends anything and works with --json.
G14: socks5 and socks5h behave identically; the hostname always
goes to the proxy.
Mode Detection
Map user intent to a mode. Load the mode file, then load the guides in
the Guides column before composing commands.
| Trigger Keywords |
Mode |
Mode File |
Guides |
| send message, notify, alert, text, announce |
Message |
references/modes/mode-message.md |
references/guide-formatting.md |
| send file, upload, photo, audio, video, document, url file, file-id |
File |
references/modes/mode-file.md |
references/guide-filetypes.md |
| album, media group, multiple photos, gallery |
Album |
references/modes/mode-album.md |
references/guide-filetypes.md, references/guide-formatting.md |
| discover, find chat id, who is chatting |
Discover |
references/modes/mode-discover.md |
references/guide-config.md |
| whoami, bot identity, getme |
Whoami |
references/modes/mode-whoami.md |
references/guide-config.md |
| proxy, base-url, self-hosted, env, .env, completion, config |
Config |
references/modes/mode-config.md |
references/guide-config.md, references/guide-retry.md |
Cross-Reference Guides
Load a guide when its trigger matches. Guides are independent of any
single operation:
| Guide |
Purpose |
Load Trigger |
references/guide-formatting.md |
MarkdownV2, HTML, and plain text, escaping rules |
Any formatted text or caption |
references/guide-filetypes.md |
detection order, type tables, size limits, album item rules |
Any file or album send |
references/guide-retry.md |
429 and transient retry policy and override flags |
Any failure, timeout, or long upload |
references/guide-config.md |
env vars, flag precedence, .env, proxy, base-url, exit codes, json, dry-run |
Any configuration question or error diagnosis |
Maintenance
The skill definitions follow the binary baseline version in the Tool
Availability section. When the project CLI changes, the
update-tg-notify skill, which ships with the tg-notify-cli
repository, re-syncs this skill and bumps the baseline. This skill
holds no path to the project.
BEGIN EXECUTION IMMEDIATELY
Do not ask the user what to do. Start with step 1:
- Detect the mode from the request using the Mode Detection table.
- Resolve the binary from PATH and compare
tg-notify -v against the
baseline version. On a missing binary, stop with install guidance.
On an older binary, stop and suggest an update to the user.
- Load the mode file for the detected mode.
- Load every guide listed in the mode's Guides column.
- Read
references/gotchas.md and apply every relevant entry.
- Compose the command from the mode recipes and run the verification
probe from the mode file.
Update todos at each step. After completion, output a summary and
clear with todos([]).
1---2name: tg-notify3description: Send Telegram messages, files, and albums via the tg-notify command-line tool. Use when composing or debugging tg-notify commands or sending messages, files, or albums through the tg-notify binary.4---56Initialize todos for tg-notify skill operation:78```json9[10 {"content": "Parse user request and detect mode", "status": "in_progress", "active_form": "Parsing user request and detecting mode"},11 {"content": "Resolve tg-notify from PATH and compare the baseline version", "status": "pending", "active_form": "Resolving tg-notify and comparing the baseline version"},12 {"content": "Load mode reference and cross-reference guides", "status": "pending", "active_form": "Loading mode reference and guides"},13 {"content": "Provide command with verification probe", "status": "pending", "active_form": "Providing command"},14 {"content": "Complete tg-notify operation", "status": "pending", "active_form": "Completing tg-notify operation"}15]16```1718# Telegram Bot Notifications (CLI)1920Use the tg-notify command-line tool, a Go CLI that sends21Telegram messages and files through the Bot API with a self-contained22client. Each operation maps to a mode file in `references/modes/`.23Operation-independent knowledge (text formatting, file types, retry24policy, configuration) lives in `references/guide-*.md` files that25modes load on demand. Field-verified failure modes live in26`references/gotchas.md`.2728## Tool Availability and Binary Baseline2930Resolve the binary from PATH only. The skill has no project fallback31and never builds or installs the binary:3233```bash34command -v tg-notify >/dev/null 2>&1 || { echo "MISSING: tg-notify"; exit 1; }35tg-notify -v36```3738The definitions in this skill were written against tg-notify39v1.1.20260825, the baseline version. Compare the output of40`tg-notify -v` against the baseline. If the PATH binary is older than41the baseline, or a documented flag fails with42`flag provided but not defined` (G-stale), stop and suggest that the43user update the binary, for example with44`go install gitlab.com/lyoneel/cli-tg-notify/cmd/tg-notify@latest` or45a fresh build from the project. Then resume.4647Read `references/gotchas.md` before executing operations.4849## Gotchas (field-verified friction)5051G1: multi-word positional text must be quoted; unquoted words are52rejected with a quoting hint.53G2: flags work anywhere on the command line; arguments are reordered54before parsing.55G3: an empty parse mode is plain text, and plain text is the default.56G4: the extension table is consulted before the MIME table; unknown57types fall back to document.58G5: a 429 retries exactly once, and that one retry still happens when59`--retries 0` is set; transient errors retry up to 60 times by60default; only `--no-retry` makes a send fully one-shot.61G6: `--reply-to` and `--offset` must be non-negative, `--retries`62must be >= 0, `--base-wait` must be > 0; mode-mismatched flags are63rejected with an error.64G7: exit codes are 0 for success (also `--help` and `-v`) and 1 for65every failure, including flag misuse; there is no exit code 2.66G8: the bot token is scrubbed from error output; request bodies are67never logged.68G9: with no message source, stdin on a terminal prints usage instead69of hanging.70G10: the `./.env` file only fills variables that are not already set;71the real environment and flags win.72G11: `--file`, `--url`, and `--file-id` are mutually exclusive; use73exactly one.74G12: `--caption` and `--message` each conflict with a positional text75caption.76G13: `--dry-run` never sends anything and works with `--json`.77G14: `socks5` and `socks5h` behave identically; the hostname always78goes to the proxy.7980## Mode Detection8182Map user intent to a mode. Load the mode file, then load the guides in83the Guides column before composing commands.8485| Trigger Keywords | Mode | Mode File | Guides |86|------------------|------|-----------|--------|87| send message, notify, alert, text, announce | Message | `references/modes/mode-message.md` | `references/guide-formatting.md` |88| send file, upload, photo, audio, video, document, url file, file-id | File | `references/modes/mode-file.md` | `references/guide-filetypes.md` |89| album, media group, multiple photos, gallery | Album | `references/modes/mode-album.md` | `references/guide-filetypes.md`, `references/guide-formatting.md` |90| discover, find chat id, who is chatting | Discover | `references/modes/mode-discover.md` | `references/guide-config.md` |91| whoami, bot identity, getme | Whoami | `references/modes/mode-whoami.md` | `references/guide-config.md` |92| proxy, base-url, self-hosted, env, .env, completion, config | Config | `references/modes/mode-config.md` | `references/guide-config.md`, `references/guide-retry.md` |9394## Cross-Reference Guides9596Load a guide when its trigger matches. Guides are independent of any97single operation:9899| Guide | Purpose | Load Trigger |100|-------|---------|--------------|101| `references/guide-formatting.md` | MarkdownV2, HTML, and plain text, escaping rules | Any formatted text or caption |102| `references/guide-filetypes.md` | detection order, type tables, size limits, album item rules | Any file or album send |103| `references/guide-retry.md` | 429 and transient retry policy and override flags | Any failure, timeout, or long upload |104| `references/guide-config.md` | env vars, flag precedence, .env, proxy, base-url, exit codes, json, dry-run | Any configuration question or error diagnosis |105106## Maintenance107108The skill definitions follow the binary baseline version in the Tool109Availability section. When the project CLI changes, the110`update-tg-notify` skill, which ships with the tg-notify-cli111repository, re-syncs this skill and bumps the baseline. This skill112holds no path to the project.113114## BEGIN EXECUTION IMMEDIATELY115116Do not ask the user what to do. Start with step 1:1171181. Detect the mode from the request using the Mode Detection table.1192. Resolve the binary from PATH and compare `tg-notify -v` against the120 baseline version. On a missing binary, stop with install guidance.121 On an older binary, stop and suggest an update to the user.1223. Load the mode file for the detected mode.1234. Load every guide listed in the mode's Guides column.1245. Read `references/gotchas.md` and apply every relevant entry.1256. Compose the command from the mode recipes and run the verification126 probe from the mode file.127128> Update todos at each step. After completion, output a summary and129> clear with `todos([])`.