opencode-skills-collection 4.0.0 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled-skills/.antigravity-install-manifest.json +28 -1
- package/bundled-skills/007/SKILL.md +2 -2
- package/bundled-skills/10-andruia-skill-smith/SKILL.md +1 -1
- package/bundled-skills/agent-squad/SKILL.md +5 -0
- package/bundled-skills/agent-squad/alex/SKILL.md +3 -0
- package/bundled-skills/agent-squad/aria/SKILL.md +3 -0
- package/bundled-skills/agent-squad/dep/SKILL.md +3 -0
- package/bundled-skills/agent-squad/luna/SKILL.md +4 -1
- package/bundled-skills/agent-squad/mason/SKILL.md +3 -0
- package/bundled-skills/agent-squad/max/SKILL.md +3 -0
- package/bundled-skills/agent-squad/quinn/SKILL.md +3 -0
- package/bundled-skills/agent-squad/rex/SKILL.md +3 -0
- package/bundled-skills/angular/metadata.json +1 -1
- package/bundled-skills/angular-best-practices/metadata.json +1 -1
- package/bundled-skills/angular-state-management/metadata.json +1 -1
- package/bundled-skills/angular-ui-patterns/metadata.json +1 -1
- package/bundled-skills/antigravity-skill-orchestrator/SKILL.md +2 -2
- package/bundled-skills/anywrite/SKILL.md +106 -0
- package/bundled-skills/apify-actor-development/SKILL.md +2 -2
- package/bundled-skills/apple-container/SKILL.md +165 -0
- package/bundled-skills/apple-container/references/commands.md +1593 -0
- package/bundled-skills/apple-container/references/concepts.md +294 -0
- package/bundled-skills/apple-container/references/configuration.md +499 -0
- package/bundled-skills/apple-container/references/workflows.md +498 -0
- package/bundled-skills/ask-copilot/SKILL.md +112 -0
- package/bundled-skills/auto-research/SKILL.md +126 -0
- package/bundled-skills/brooks-lint/SKILL.md +1 -1
- package/bundled-skills/browser-harness/references/install.md +3 -1
- package/bundled-skills/chrome-extension-developer/SKILL.md +1 -1
- package/bundled-skills/clean-code-guard/SKILL.md +184 -0
- package/bundled-skills/clean-code-guard/references/ai-failure-modes.md +345 -0
- package/bundled-skills/clean-code-guard/references/comments-and-formatting.md +115 -0
- package/bundled-skills/clean-code-guard/references/dry-kiss-yagni.md +133 -0
- package/bundled-skills/clean-code-guard/references/naming-and-functions.md +187 -0
- package/bundled-skills/clean-code-guard/references/review-checklist.md +150 -0
- package/bundled-skills/clean-code-guard/references/solid.md +280 -0
- package/bundled-skills/clean-code-guard/references/sources.md +47 -0
- package/bundled-skills/cloudflare-security-audit/SKILL.md +137 -0
- package/bundled-skills/cloudflare-security-audit/references/AI-AND-LLM.md +67 -0
- package/bundled-skills/cloudflare-security-audit/references/ATTACK-CLASSES.md +116 -0
- package/bundled-skills/cloudflare-security-audit/references/CLIENT-SIDE.md +67 -0
- package/bundled-skills/cloudflare-security-audit/references/HUNTING.md +110 -0
- package/bundled-skills/cloudflare-security-audit/references/MEMORY-SAFETY-AND-BINARY.md +58 -0
- package/bundled-skills/cloudflare-security-audit/references/RECONNAISSANCE.md +46 -0
- package/bundled-skills/cloudflare-security-audit/references/VALIDATION-AND-REPORTING.md +109 -0
- package/bundled-skills/cloudflare-security-audit/references/WEB-PROTOCOL-AND-AUTH.md +85 -0
- package/bundled-skills/cloudflare-security-audit/resources/report-schema.json +210 -0
- package/bundled-skills/comfyui-gateway/references/troubleshooting.md +1 -1
- package/bundled-skills/commit/SKILL.md +2 -1
- package/bundled-skills/deepapi/SKILL.md +6 -6
- package/bundled-skills/ditto/SKILL.md +173 -0
- package/bundled-skills/docs/README.md +1 -1
- package/bundled-skills/docs/contributors/quality-bar.md +1 -1
- package/bundled-skills/docs/contributors/security-guardrails.md +1 -1
- package/bundled-skills/docs/integrations/jetski-cortex.md +5 -5
- package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +3 -3
- package/bundled-skills/docs/maintainers/ci-drift-fix.md +7 -5
- package/bundled-skills/docs/maintainers/merge-batch.md +24 -7
- package/bundled-skills/docs/maintainers/pr-autonomy.md +89 -0
- package/bundled-skills/docs/maintainers/release-notes-7.2.0.md +1 -1
- package/bundled-skills/docs/maintainers/release-process.md +9 -9
- package/bundled-skills/docs/maintainers/repo-growth-seo.md +5 -5
- package/bundled-skills/docs/maintainers/skills-date-tracking.md +1 -1
- package/bundled-skills/docs/maintainers/skills-update-guide.md +2 -2
- package/bundled-skills/docs/users/{antigravity-awesome-skills-vs-awesome-claude-skills.md → agentic-awesome-skills-vs-awesome-claude-skills.md} +5 -5
- package/bundled-skills/docs/users/ai-agent-skills.md +4 -4
- package/bundled-skills/docs/users/best-claude-code-skills-github.md +3 -3
- package/bundled-skills/docs/users/best-cursor-skills-github.md +3 -3
- package/bundled-skills/docs/users/bundles.md +56 -57
- package/bundled-skills/docs/users/claude-code-skills.md +6 -6
- package/bundled-skills/docs/users/codex-cli-skills.md +5 -5
- package/bundled-skills/docs/users/cursor-skills.md +3 -3
- package/bundled-skills/docs/users/faq.md +27 -15
- package/bundled-skills/docs/users/gemini-cli-skills.md +4 -4
- package/bundled-skills/docs/users/getting-started.md +22 -12
- package/bundled-skills/docs/users/kiro-integration.md +7 -7
- package/bundled-skills/docs/users/plugins.md +8 -9
- package/bundled-skills/docs/users/security-skills.md +1 -1
- package/bundled-skills/docs/users/skills-vs-mcp-tools.md +1 -1
- package/bundled-skills/docs/users/specialized-plugin-roadmap.md +3 -4
- package/bundled-skills/docs/users/usage.md +9 -9
- package/bundled-skills/docs/users/visual-guide.md +7 -7
- package/bundled-skills/docs/users/windows-truncation-recovery.md +1 -1
- package/bundled-skills/docs/users/workflows.md +1 -1
- package/bundled-skills/docs/vietnamese/BUNDLES.vi.md +1 -1
- package/bundled-skills/docs/vietnamese/FAQ.vi.md +15 -8
- package/bundled-skills/docs/vietnamese/GETTING_STARTED.vi.md +12 -5
- package/bundled-skills/docs/vietnamese/QUALITY_BAR.vi.md +1 -1
- package/bundled-skills/docs/vietnamese/README.vi.md +21 -17
- package/bundled-skills/docs/vietnamese/SECURITY_GUARDRAILS.vi.md +1 -1
- package/bundled-skills/docs/vietnamese/SKILLS_README.vi.md +2 -2
- package/bundled-skills/docs/vietnamese/TRANSLATION_PLAN.vi.md +1 -1
- package/bundled-skills/docs/vietnamese/VISUAL_GUIDE.vi.md +8 -8
- package/bundled-skills/docs-guard/SKILL.md +109 -0
- package/bundled-skills/docs-guard/references/code-samples.md +46 -0
- package/bundled-skills/docs-guard/references/docstrings.md +60 -0
- package/bundled-skills/docs-guard/references/review-checklist.md +45 -0
- package/bundled-skills/docs-guard/references/sources.md +22 -0
- package/bundled-skills/docs-guard/references/verification.md +51 -0
- package/bundled-skills/efficient-web-research/SKILL.md +4 -0
- package/bundled-skills/electron-development/SKILL.md +1 -1
- package/bundled-skills/event-staffing-compliance/SKILL.md +3 -0
- package/bundled-skills/event-staffing-ordering/SKILL.md +3 -0
- package/bundled-skills/feature-tracking/SKILL.md +222 -0
- package/bundled-skills/flutter-expert/SKILL.md +6 -1
- package/bundled-skills/flutter-expert/resources/implementation-playbook.md +214 -0
- package/bundled-skills/gemini-deep-research/README.md +246 -0
- package/bundled-skills/gemini-deep-research/SKILL.md +136 -0
- package/bundled-skills/gemini-deep-research/requirements.txt +2 -0
- package/bundled-skills/gemini-deep-research/scripts/research.py +692 -0
- package/bundled-skills/git-pushing/SKILL.md +21 -4
- package/bundled-skills/git-pushing/scripts/smart_commit.sh +206 -11
- package/bundled-skills/go-in-depth/scripts/workflow-script.js +4 -1
- package/bundled-skills/grok-build/SKILL.md +167 -0
- package/bundled-skills/grok-build/references/cli.md +99 -0
- package/bundled-skills/huggingface-tool-builder/references/find_models_by_paper.sh +1 -1
- package/bundled-skills/idea-autopsy/SKILL.md +147 -0
- package/bundled-skills/it-manager-hospital/README.md +1 -1
- package/bundled-skills/it-manager-pro/README.md +1 -1
- package/bundled-skills/itil-expert/README.md +1 -1
- package/bundled-skills/langgraph/SKILL.md +1 -1
- package/bundled-skills/linkedin-content-generator/SKILL.md +1 -1
- package/bundled-skills/lint-and-validate/scripts/lint_runner.py +23 -23
- package/bundled-skills/lint-and-validate/scripts/type_coverage.py +30 -30
- package/bundled-skills/logic-lens/SKILL.md +1 -1
- package/bundled-skills/lore/LICENSE +21 -0
- package/bundled-skills/lore/README.md +386 -0
- package/bundled-skills/lore/README.zh-CN.md +386 -0
- package/bundled-skills/lore/SKILL.md +453 -0
- package/bundled-skills/lore/WORKFLOWS.md +216 -0
- package/bundled-skills/lore/WORKFLOWS.zh-CN.md +216 -0
- package/bundled-skills/lore/references/audit-template.md +60 -0
- package/bundled-skills/lore/references/compatibility.md +228 -0
- package/bundled-skills/lore/references/config.md +125 -0
- package/bundled-skills/lore/references/entry-format.md +70 -0
- package/bundled-skills/lore/references/history-command.md +106 -0
- package/bundled-skills/lore/references/monorepo-detection.md +78 -0
- package/bundled-skills/lore/references/platform-mirrors.md +377 -0
- package/bundled-skills/lore/references/stale-new-markers.md +62 -0
- package/bundled-skills/lore/references/summary-template.md +98 -0
- package/bundled-skills/lore/scripts/README.md +54 -0
- package/bundled-skills/lore/scripts/README.zh-CN.md +54 -0
- package/bundled-skills/lore/scripts/find_duplicates.py +211 -0
- package/bundled-skills/lore/scripts/find_stale.py +116 -0
- package/bundled-skills/lore/scripts/history.py +527 -0
- package/bundled-skills/lore/scripts/id_hash.py +32 -0
- package/bundled-skills/lore/scripts/list_entries.py +183 -0
- package/bundled-skills/lovable-cleanup/SKILL.md +3 -3
- package/bundled-skills/makepad-splash/SKILL.md +1 -1
- package/bundled-skills/mmx-cli/SKILL.md +14 -1
- package/bundled-skills/monopoly/SKILL.md +5 -0
- package/bundled-skills/monopoly/patterns/SKILL.md +4 -0
- package/bundled-skills/monopoly/scale-benchmarks/SKILL.md +4 -0
- package/bundled-skills/monopoly/security-checklist/SKILL.md +4 -0
- package/bundled-skills/monopoly/tech-matrix/SKILL.md +4 -0
- package/bundled-skills/mtls-configuration/SKILL.md +1 -1
- package/bundled-skills/network-101/SKILL.md +4 -5
- package/bundled-skills/nika/SKILL.md +270 -0
- package/bundled-skills/not-a-vibe-coder/SKILL.md +4 -0
- package/bundled-skills/ontoly-software-graph/SKILL.md +160 -0
- package/bundled-skills/openclaw-github-repo-commander/SKILL.md +1 -1
- package/bundled-skills/optim-agent/SKILL.md +78 -0
- package/bundled-skills/pilot-protocol/SKILL.md +6 -3
- package/bundled-skills/postgres-readonly-queries/README.md +77 -0
- package/bundled-skills/postgres-readonly-queries/SKILL.md +152 -0
- package/bundled-skills/postgres-readonly-queries/connections.example.json +34 -0
- package/bundled-skills/postgres-readonly-queries/requirements.txt +1 -0
- package/bundled-skills/postgres-readonly-queries/scripts/query.py +262 -0
- package/bundled-skills/pptx-deck-creation/SKILL.md +275 -0
- package/bundled-skills/pptx-deck-creation/references/audit-checklist.md +156 -0
- package/bundled-skills/pptx-deck-creation/references/design-profiles.md +96 -0
- package/bundled-skills/pptx-deck-creation/references/python-snippets.md +150 -0
- package/bundled-skills/pptx-deck-creation/references/reference-deck-analysis.md +91 -0
- package/bundled-skills/pptx-deck-creation/references/visual-asset-adapters.md +158 -0
- package/bundled-skills/privilege-escalation-methods/SKILL.md +1 -1
- package/bundled-skills/product-decision-agent/SKILL.md +94 -0
- package/bundled-skills/product-decision-agent/agents/openai.yaml +7 -0
- package/bundled-skills/product-decision-agent/references/methodology-basis.md +232 -0
- package/bundled-skills/product-decision-agent/references/product-playbooks.md +813 -0
- package/bundled-skills/product-decision-agent/references/reasoning-engine.md +289 -0
- package/bundled-skills/product-decision-agent/references/response-examples.md +279 -0
- package/bundled-skills/product-decision-agent/scripts/quality_gate.py +221 -0
- package/bundled-skills/product-decision-agent/scripts/test_quality_gate.py +94 -0
- package/bundled-skills/pytest-skill/reference/playbook.md +358 -0
- package/bundled-skills/quit-sponsor/SKILL.md +96 -0
- package/bundled-skills/rclone-cli/references/providers/s3.md +1 -1
- package/bundled-skills/security-and-hardening/SKILL.md +1 -1
- package/bundled-skills/semgrep-rule-creator/SKILL.md +6 -6
- package/bundled-skills/skill-creator/README.md +3 -3
- package/bundled-skills/skill-creator/SKILL.md +8 -4
- package/bundled-skills/skill-creator/scripts/quick_validate.py +1 -1
- package/bundled-skills/sql-injection-testing/SKILL.md +4 -4
- package/bundled-skills/sshepherd/SKILL.md +107 -0
- package/bundled-skills/subagent-orchestrator/README.md +1 -1
- package/bundled-skills/super-code/bash/SKILL.md +3 -0
- package/bundled-skills/super-code/c/SKILL.md +3 -0
- package/bundled-skills/super-code/cpp/SKILL.md +3 -0
- package/bundled-skills/super-code/csharp/SKILL.md +3 -0
- package/bundled-skills/super-code/dart/SKILL.md +3 -0
- package/bundled-skills/super-code/elixir/SKILL.md +3 -0
- package/bundled-skills/super-code/go/SKILL.md +3 -0
- package/bundled-skills/super-code/java/SKILL.md +3 -0
- package/bundled-skills/super-code/kotlin/SKILL.md +3 -0
- package/bundled-skills/super-code/php/SKILL.md +3 -0
- package/bundled-skills/super-code/python/SKILL.md +3 -0
- package/bundled-skills/super-code/ruby/SKILL.md +3 -0
- package/bundled-skills/super-code/rust/SKILL.md +3 -0
- package/bundled-skills/super-code/scala/SKILL.md +3 -0
- package/bundled-skills/super-code/swift/SKILL.md +3 -0
- package/bundled-skills/super-code/typescript/SKILL.md +3 -0
- package/bundled-skills/telegram-bot-messaging/README.md +185 -0
- package/bundled-skills/telegram-bot-messaging/SKILL.md +101 -0
- package/bundled-skills/telegram-bot-messaging/scripts/telegram.sh +420 -0
- package/bundled-skills/test-guard/SKILL.md +132 -0
- package/bundled-skills/test-guard/references/jest.md +50 -0
- package/bundled-skills/test-guard/references/llm-app-testing.md +40 -0
- package/bundled-skills/test-guard/references/phpunit.md +56 -0
- package/bundled-skills/test-guard/references/pytest.md +65 -0
- package/bundled-skills/trading-ledger/SKILL.md +11 -3
- package/bundled-skills/uizze-ui-research/SKILL.md +93 -0
- package/bundled-skills/vibe-code-auditor/SKILL.md +1 -1
- package/bundled-skills/vibecode-production-qa-validator/SKILL.md +1 -1
- package/bundled-skills/videodb/scripts/ws_listener.py +29 -15
- package/bundled-skills/voice-ai-engine-development/README.md +1 -1
- package/bundled-skills/vulnerability-scanner/SKILL.md +1 -1
- package/bundled-skills/warehouse/SKILL.md +154 -0
- package/bundled-skills/woo-guard/SKILL.md +113 -0
- package/bundled-skills/woo-guard/references/checkout-and-money.md +64 -0
- package/bundled-skills/woo-guard/references/hpos-and-crud.md +87 -0
- package/bundled-skills/woo-guard/references/review-checklist.md +44 -0
- package/bundled-skills/woo-guard/references/sources.md +17 -0
- package/bundled-skills/wp-guard/SKILL.md +119 -0
- package/bundled-skills/wp-guard/references/i18n.md +88 -0
- package/bundled-skills/wp-guard/references/performance.md +70 -0
- package/bundled-skills/wp-guard/references/review-checklist.md +57 -0
- package/bundled-skills/wp-guard/references/security.md +100 -0
- package/bundled-skills/wp-guard/references/sources.md +27 -0
- package/bundled-skills/writing-skills/gotchas.md +1 -1
- package/bundled-skills/writing-skills/references/standards/metadata-standard.md +1 -1
- package/bundled-skills/x-twitter-scraper/SKILL.md +14 -32
- package/bundled-skills/xss-html-injection/SKILL.md +3 -3
- package/bundled-skills/youtube-seo-optimizer/SKILL.md +1 -1
- package/bundled-skills/youtube-summarizer/CHANGELOG.md +2 -2
- package/package.json +2 -2
- package/skills_index.json +407 -0
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# Telegram Skill
|
|
2
|
+
|
|
3
|
+
An AI agent skill for sending Telegram messages, files, and alerts via the Bot API - send updates, ask-and-wait for approval with inline buttons, and read replies. Works with Claude Code, Gemini CLI, Cursor, OpenAI Codex, Goose, and other AI clients supporting the [Agent Skills Standard](https://agentskills.io).
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Send** - Plain text, MarkdownV2, or HTML messages (auto-splits over 4096 chars, auto-falls back to plain text if formatting is rejected)
|
|
8
|
+
- **File** - Send documents; images (png/jpg/jpeg/gif/webp) are automatically sent as photos
|
|
9
|
+
- **Ask** - Ask a question with inline buttons and wait for a tap or free-text reply (approve-from-phone)
|
|
10
|
+
- **Read** - Print new incoming messages since the last read
|
|
11
|
+
- **Multi-bot** - Register additional named bots alongside the default
|
|
12
|
+
- **Multi-target** - Route messages to named chats, groups, or channels
|
|
13
|
+
- **Hook integration** - Wire into Claude Code hooks, cron jobs, or CI for notifications
|
|
14
|
+
|
|
15
|
+
Pure bash + curl + jq — no install beyond a bot token.
|
|
16
|
+
|
|
17
|
+
## Requirements
|
|
18
|
+
|
|
19
|
+
- `bash`
|
|
20
|
+
- `curl`
|
|
21
|
+
- `jq` (`brew install jq` on macOS, `apt install jq` on Debian/Ubuntu)
|
|
22
|
+
|
|
23
|
+
macOS ships bash and curl out of the box; only `jq` typically needs installing.
|
|
24
|
+
|
|
25
|
+
## Quick Start
|
|
26
|
+
|
|
27
|
+
### 1. Create a bot
|
|
28
|
+
|
|
29
|
+
1. Open [@BotFather](https://t.me/BotFather) in Telegram
|
|
30
|
+
2. Send `/newbot` and follow the prompts (display name, then a username ending in "bot")
|
|
31
|
+
3. BotFather replies with an HTTP API token
|
|
32
|
+
|
|
33
|
+
### 2. Run setup
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
bash scripts/telegram.sh setup
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
This walks you through pasting the token, validates it via `getMe`, and asks you to send a message to your new bot so it can discover your chat ID. Config is written to `~/.config/telegram/config` (mode 600), and a confirmation message is sent to confirm everything works.
|
|
40
|
+
|
|
41
|
+
### 3. Add more bots (optional)
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
bash scripts/telegram.sh setup --bot alerts
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Repeat with a different `--bot NAME` for each additional bot. Named bots share the default chat ID unless you configure a different target for them.
|
|
48
|
+
|
|
49
|
+
### 4. Find group/channel IDs (optional)
|
|
50
|
+
|
|
51
|
+
To send to a group or channel instead of your personal chat:
|
|
52
|
+
|
|
53
|
+
1. Add your bot to the group/channel
|
|
54
|
+
2. Send any message in that group/channel
|
|
55
|
+
3. Run `bash scripts/telegram.sh read --all` to see the chat ID printed alongside the message
|
|
56
|
+
4. Add `TARGET_<NAME>=<chat_id>` to `~/.config/telegram/config`, then use `--to <name>`
|
|
57
|
+
|
|
58
|
+
## Usage Examples
|
|
59
|
+
|
|
60
|
+
### Send Messages
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Basic alert
|
|
64
|
+
bash scripts/telegram.sh send "Deploy finished ✅"
|
|
65
|
+
|
|
66
|
+
# No notification sound
|
|
67
|
+
bash scripts/telegram.sh send "low priority update" --silent
|
|
68
|
+
|
|
69
|
+
# MarkdownV2 formatting (falls back to plain text if rejected)
|
|
70
|
+
bash scripts/telegram.sh send "*bold* alert" --format md
|
|
71
|
+
|
|
72
|
+
# HTML formatting
|
|
73
|
+
bash scripts/telegram.sh send "<b>bold</b> alert" --format html
|
|
74
|
+
|
|
75
|
+
# Named target and named bot
|
|
76
|
+
bash scripts/telegram.sh send "hi" --to alerts --bot work
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Send Files
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# Send a document
|
|
83
|
+
bash scripts/telegram.sh file report.pdf "Q3 report"
|
|
84
|
+
|
|
85
|
+
# Images are auto-detected and sent as photos
|
|
86
|
+
bash scripts/telegram.sh file screenshot.png "Build output"
|
|
87
|
+
|
|
88
|
+
# To a named target, silently
|
|
89
|
+
bash scripts/telegram.sh file backup.zip --to alerts --silent
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Ask and Wait for an Answer
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# Default Yes/No options, 5-minute timeout
|
|
96
|
+
ANSWER=$(bash scripts/telegram.sh ask "Deploy to prod?" --options "Yes,No" --timeout 300)
|
|
97
|
+
echo "$ANSWER"
|
|
98
|
+
|
|
99
|
+
# Custom options
|
|
100
|
+
bash scripts/telegram.sh ask "Which environment?" --options "Staging,Prod,Cancel"
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Exit code `0` means answered (the answer is printed to stdout); exit code `2` means the timeout was reached with no reply.
|
|
104
|
+
|
|
105
|
+
### Read Incoming Messages
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# New messages since the last read (advances the offset)
|
|
109
|
+
bash scripts/telegram.sh read
|
|
110
|
+
|
|
111
|
+
# Limit the number of messages
|
|
112
|
+
bash scripts/telegram.sh read --limit 5
|
|
113
|
+
|
|
114
|
+
# Ignore the saved offset and show everything available
|
|
115
|
+
bash scripts/telegram.sh read --all
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Note: `ask` and `read` share the same per-bot cursor, so an `ask` consumes incoming messages that a later `read` would otherwise show.
|
|
119
|
+
|
|
120
|
+
## Command Reference
|
|
121
|
+
|
|
122
|
+
| Command | Description | Arguments | Exit codes |
|
|
123
|
+
|---------|-------------|-----------|------------|
|
|
124
|
+
| `setup` | Guided bot registration + chat-ID discovery | `--bot NAME` | 0 success, 1 error |
|
|
125
|
+
| `send MESSAGE` | Send a text message | `--to TARGET`, `--bot NAME`, `--silent`, `--format md\|html` | 0 success, 1 error |
|
|
126
|
+
| `file PATH [CAPTION]` | Send a document (or photo for images) | `--to TARGET`, `--bot NAME`, `--silent` | 0 success, 1 error |
|
|
127
|
+
| `ask QUESTION` | Ask with inline buttons, wait for reply | `--options "Yes,No"`, `--timeout SECS`, `--to TARGET`, `--bot NAME` | 0 answered, 2 timeout, 1 error |
|
|
128
|
+
| `read` | Print new incoming messages since last read | `--limit N`, `--bot NAME`, `--all` | 0 success, 1 error |
|
|
129
|
+
|
|
130
|
+
## Config Reference
|
|
131
|
+
|
|
132
|
+
Environment variables take precedence; anything not set in the environment falls back to `~/.config/telegram/config` (created with mode 600):
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
TELEGRAM_BOT_TOKEN=123:ABC... # default bot token
|
|
136
|
+
TELEGRAM_CHAT_ID=987654321 # default chat/target
|
|
137
|
+
BOT_ALERTS_TOKEN=456:DEF... # named bot: --bot alerts (add via: setup --bot alerts)
|
|
138
|
+
TARGET_FAMILY=-100987... # named target: --to family (any chat/group/channel id)
|
|
139
|
+
TELEGRAM_APPROVER_IDS=123456789 # default group approver user IDs (comma-separated)
|
|
140
|
+
APPROVERS_FAMILY=123456789,987654321 # approvers for --to family (overrides default)
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
- `TELEGRAM_BOT_TOKEN` / `TELEGRAM_CHAT_ID` — default bot token and default send target.
|
|
144
|
+
- `BOT_<NAME>_TOKEN` — a named bot's token, selected with `--bot <name>` (uppercased key, e.g. `--bot alerts` → `BOT_ALERTS_TOKEN`).
|
|
145
|
+
- `TARGET_<NAME>=<chat_id>` — a named send target, selected with `--to <name>` (uppercased key, e.g. `--to family` → `TARGET_FAMILY`). A numeric `--to` value is used directly as a chat ID without a lookup.
|
|
146
|
+
- `TELEGRAM_APPROVER_IDS` — Telegram user IDs allowed to answer `ask` in a group target.
|
|
147
|
+
- `APPROVERS_<NAME>` — target-specific group approvers (for example, `APPROVERS_FAMILY`); overrides the global allowlist for that named target.
|
|
148
|
+
- `TELEGRAM_CONFIG_DIR` — overrides the config directory (default `~/.config/telegram`).
|
|
149
|
+
|
|
150
|
+
## Claude Code hooks (settings.json)
|
|
151
|
+
|
|
152
|
+
Ping your phone when Claude needs input, and when it finishes:
|
|
153
|
+
|
|
154
|
+
```json
|
|
155
|
+
{
|
|
156
|
+
"hooks": {
|
|
157
|
+
"Notification": [{"hooks": [{"type": "command",
|
|
158
|
+
"command": "bash ~/.claude/skills/telegram/scripts/telegram.sh send \"🔔 Claude needs input in $(basename \\\"$PWD\\\")\""}]}],
|
|
159
|
+
"Stop": [{"hooks": [{"type": "command",
|
|
160
|
+
"command": "bash ~/.claude/skills/telegram/scripts/telegram.sh send \"✅ Claude finished in $(basename \\\"$PWD\\\")\" --silent"}]}]
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Approval gate in any script/automation:
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
if [ "$(bash scripts/telegram.sh ask 'Deploy to prod?' --options 'Yes,No')" = "Yes" ]; then
|
|
169
|
+
./deploy.sh
|
|
170
|
+
fi
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## Security Notes
|
|
174
|
+
|
|
175
|
+
- The bot token grants full control of the bot — anyone with it can send/receive as your bot. Treat it like a password.
|
|
176
|
+
- Token-bearing API URLs are passed to curl through stdin, not exposed in curl process arguments.
|
|
177
|
+
- `~/.config/telegram/config` is created with mode 600 (owner read/write only).
|
|
178
|
+
- Private-chat answers are accepted only when the sender user ID equals the chat ID. Group
|
|
179
|
+
targets require an explicit `TELEGRAM_APPROVER_IDS` or target-specific `APPROVERS_<NAME>`
|
|
180
|
+
allowlist, and `ask` accepts button taps and text only from those user IDs.
|
|
181
|
+
- By default, bots in group chats only see messages that mention them or are replies to them. To read all group messages, either make the bot an admin or disable privacy mode for it via @BotFather (`/setprivacy`).
|
|
182
|
+
|
|
183
|
+
## License
|
|
184
|
+
|
|
185
|
+
Apache 2.0
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: telegram-bot-messaging
|
|
3
|
+
description: "Send Telegram messages, files, and alerts via bot API; ask questions with inline buttons and wait for the answer. Supports multiple bots, named chat targets, and CI/cron/hook notifications."
|
|
4
|
+
category: productivity
|
|
5
|
+
risk: critical
|
|
6
|
+
source: https://github.com/sanjay3290/ai-skills/tree/main/skills/telegram
|
|
7
|
+
source_repo: sanjay3290/ai-skills
|
|
8
|
+
source_type: community
|
|
9
|
+
date_added: "2026-07-09"
|
|
10
|
+
author: sanjay3290
|
|
11
|
+
tags: [telegram, notifications, bots, approvals]
|
|
12
|
+
tools: [claude, cursor, gemini]
|
|
13
|
+
license: "Apache-2.0"
|
|
14
|
+
license_source: "https://github.com/sanjay3290/ai-skills/blob/main/LICENSE"
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Telegram
|
|
18
|
+
|
|
19
|
+
## When to Use
|
|
20
|
+
|
|
21
|
+
- Use when you need to send a Telegram message, file, or alert from a workflow, hook, cron job, or CI pipeline
|
|
22
|
+
- Use when a long-running task should notify you or ask for approval on your phone (inline-button questions that wait for the answer)
|
|
23
|
+
- Use when wiring "notify me when done" or "ask me before proceeding" behavior into automated sessions
|
|
24
|
+
|
|
25
|
+
Send updates, alerts, and files to Telegram; read replies; run ask-and-wait
|
|
26
|
+
approval flows. Pure bash + curl + jq — no install beyond a bot token.
|
|
27
|
+
|
|
28
|
+
First run: `bash scripts/telegram.sh setup` (guided BotFather walkthrough).
|
|
29
|
+
|
|
30
|
+
## Safety Gate
|
|
31
|
+
|
|
32
|
+
Before setup, sending a message or file, reading replies, or enabling a hook, obtain the
|
|
33
|
+
user's explicit approval for the target chat, bot account, and exact content or file. Never
|
|
34
|
+
send workspace, customer, credential, or secret data automatically. Treat a token as a secret:
|
|
35
|
+
do not echo it, commit it, or place it in shell history.
|
|
36
|
+
|
|
37
|
+
## Commands
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
bash scripts/telegram.sh send "Deploy finished ✅" # basic alert
|
|
41
|
+
bash scripts/telegram.sh send "low priority" --silent # no notification sound
|
|
42
|
+
bash scripts/telegram.sh send "*bold* alert" --format md # MarkdownV2 (falls back to plain)
|
|
43
|
+
bash scripts/telegram.sh send "hi" --to alerts --bot work # named target + named bot
|
|
44
|
+
bash scripts/telegram.sh file report.pdf "Q3 report" # document (photos auto-detected)
|
|
45
|
+
bash scripts/telegram.sh read # new incoming messages since last read
|
|
46
|
+
ANSWER=$(bash scripts/telegram.sh ask "Deploy to prod?" --options "Yes,No" --timeout 300)
|
|
47
|
+
# exit 0 = answered (stdout = answer), 2 = timeout
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Config
|
|
51
|
+
|
|
52
|
+
Env vars win, then `~/.config/telegram/config` (mode 600):
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
TELEGRAM_BOT_TOKEN=123:ABC... # default bot
|
|
56
|
+
TELEGRAM_CHAT_ID=987654321 # default target
|
|
57
|
+
BOT_ALERTS_TOKEN=456:DEF... # --bot alerts (add via: setup --bot alerts)
|
|
58
|
+
TARGET_FAMILY=-100987... # --to family (any chat/group/channel id)
|
|
59
|
+
TELEGRAM_APPROVER_IDS=123456789 # default group approver user IDs (comma-separated)
|
|
60
|
+
APPROVERS_FAMILY=123456789,987654321 # approvers for --to family (overrides default)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Replies and answers are only accepted from configured chat IDs. Private chats preserve the
|
|
64
|
+
direct-chat behavior (the sender user ID must equal the chat ID). Because a group chat ID is
|
|
65
|
+
shared by every member, `ask` fails closed for groups unless `TELEGRAM_APPROVER_IDS` or the
|
|
66
|
+
target-specific `APPROVERS_<NAME>` explicitly lists the Telegram user IDs allowed to answer.
|
|
67
|
+
|
|
68
|
+
## Claude Code hooks (settings.json)
|
|
69
|
+
|
|
70
|
+
Ping your phone when Claude needs input, and when it finishes:
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"hooks": {
|
|
75
|
+
"Notification": [{"hooks": [{"type": "command",
|
|
76
|
+
"command": "bash ~/.claude/skills/telegram/scripts/telegram.sh send \"🔔 Claude needs input in $(basename \\\"$PWD\\\")\""}]}],
|
|
77
|
+
"Stop": [{"hooks": [{"type": "command",
|
|
78
|
+
"command": "bash ~/.claude/skills/telegram/scripts/telegram.sh send \"✅ Claude finished in $(basename \\\"$PWD\\\")\" --silent"}]}]
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Approval gate in any script/automation:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
if [ "$(bash scripts/telegram.sh ask 'Deploy to prod?' --options 'Yes,No')" = "Yes" ]; then
|
|
87
|
+
./deploy.sh
|
|
88
|
+
fi
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Limitations
|
|
92
|
+
|
|
93
|
+
- Telegram is a third-party service: message and file contents leave the local machine and may
|
|
94
|
+
be retained under Telegram's policies.
|
|
95
|
+
- This skill cannot verify that a chat ID belongs to the intended recipient; confirm the target
|
|
96
|
+
before every new destination or automation.
|
|
97
|
+
- Bot tokens grant control of the bot. Store them only in a protected local secret store or
|
|
98
|
+
mode-600 configuration file. The script supplies token-bearing API URLs to curl through
|
|
99
|
+
stdin rather than process arguments; rotate a token if exposure is suspected.
|
|
100
|
+
- Do not use the examples to create unattended notifications or approval flows without the
|
|
101
|
+
user's explicit, current authorization.
|