agentleFS
mrsandman17mrsandman17/chief-of-staff/.claude/skills/add-telegram/SKILL.md

add-telegram

Skill0 starsChanged 6 months agoMITView on GitHub

Add Telegram as a channel to COS (Chief of Staff). Uses curl + Bash against the Telegram Bot API — no npm, no daemon, no Grammy.

  • Reads credentials

16 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use add-anydoc, add-clidash and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • TomGranotSkill

    add-anydoc

    Add local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use when agents need to read attached Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, or text-based PDF files without uploading them to a hosted parser.

    Also in 5 projects that use this

  • TomGranotSkill

    add-clidash

    Add clidash — a zero-dependency, read-only web dashboard that derives its tabs and tables at runtime from any CLI that lists resources as JSON. Ships pre-wired for NanoClaw's ncl CLI (agent groups, sessions, channels, users, roles), plus message-activity charts, a log tail, and a read-only file viewer for group skills/CLAUDE.md/profiles.

    Also in 5 projects that use this

  • juancruzmunozalbeloSkill

    add-voice-transcription

    Add voice message transcription to NanoClaw using OpenAI's Whisper API. Automatically transcribes WhatsApp voice notes so the agent can read and respond to them.

    Also in 5 projects that use this

  • b1rdmaniaSkill

    migrate-memory

    Migrate from monolith CLAUDE.md to the three-file memory system (identity + state + log). Non-destructive — backs up the original first.

    Also in 7 projects that use this

  • juancruzmunozalbeloSkill

    add-telegram-swarm

    Add Agent Swarm (Teams) support to Telegram. Each subagent gets its own bot identity in the group. Requires Telegram channel to be set up first (use /add-telegram). Triggers on "agent swarm", "agent teams telegram", "telegram swarm", "bot pool".

    Also in 6 projects that use this

  • qwibitaiSkill

    add-iron-proxy

    Install or refresh Iron Proxy and its official Iron Control web console for NanoClaw. Use when selecting the Iron gateway, adding its management UI, configuring credentials and grants, or restoring the proxy, approval bridge, and agent guidance.

    Also in 4 projects that use this

  • +5 more from TomGranot

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 4 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 16 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Look for scripts/telegram.sh in the vault root and Step 0.5b in CLAUDE.md.

    line 14
  2. Distinctive:

    If they don't have one:

    line 22
  3. Distinctive:

    Wait for the user to provide the token before continuing.

    line 30
  4. Distinctive:

    Run the skill setup:

    line 34
  5. Very specific:

    Write them to .env (gitignored)

    line 42
  6. Distinctive:

    If you didn't provide your chat ID during setup:

    line 49
  7. Very specific:

    Run /ingest. If you sent yourself messages via the bot before this step, they should appear as inbox/tg-*.md files and get processed …

    line 88
  8. Very specific:

    Check that TELEGRAM_BOT_TOKEN is exported in your shell:

    line 111
  9. Very specific:

    Delete context/telegram-state.json and recreate it:

    line 126

“Common” is measured: kept by at least 6 in 10 of the 16 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Add Telegram Channel (COS)

COS is a pure Markdown vault with no app server. This skill adds Telegram support via a simple Bash script (scripts/telegram.sh) that polls for messages during ingest and can send the morning briefing.

Phase 1: Pre-flight

Check if already applied

Look for scripts/telegram.sh in the vault root and Step 0.5b in CLAUDE.md. If both exist, skip to Phase 3 (configuration).

Check for bot token

Ask the user:

Do you have a Telegram bot token, or do you need to create one?

If they don't have one:

  1. Open Telegram and search for @BotFather
  2. Send /newbot and follow the prompts:
    • Bot name: Something friendly (e.g., "COS Bot")
    • Bot username: Must end in "bot" (e.g., "mycos_bot")
  3. Copy the token it gives you (looks like 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11)

Wait for the user to provide the token before continuing.

Phase 2: Apply

Run the skill setup:

bash .claude/skills/add-telegram/setup.sh

This will:

  1. Collect TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID
  2. Write them to .env (gitignored)
  3. Copy scripts/telegram.sh to the vault
  4. Initialize context/telegram-state.json
  5. Patch CLAUDE.md with ingest Step 0.5b and sweep Step 9 (outbound send)

Phase 3: Get your Chat ID

If you didn't provide your chat ID during setup:

# Set token from .env or provide directly
TELEGRAM_BOT_TOKEN=<your-token> bash scripts/telegram.sh getme

This will print your chat ID. Add it to .env:

TELEGRAM_CHAT_ID=<your-id>

Alternatively, manually find it:

  1. Search for your bot in Telegram and send it any message
  2. Run: curl -s "https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates" | python3 -m json.tool
  3. Look for "chat": {"id": <number>} — that number is your chat ID

Phase 4: Verify

Test poll

bash scripts/telegram.sh poll .

Expected: prints "Fetched N updates" (0 is fine if no new messages).

Test send

bash scripts/telegram.sh send "COS Telegram integration working"

Expected: message appears in your Telegram chat with the bot.

Run ingest

Run /ingest. If you sent yourself messages via the bot before this step, they should appear as inbox/tg-*.md files and get processed normally.

Troubleshooting

"command not found: bash scripts/telegram.sh"

The script wasn't copied. Re-run setup.sh or manually copy:

cp .claude/skills/add-telegram/add/scripts/telegram.sh scripts/telegram.sh
chmod +x scripts/telegram.sh

curl returns 401

Token is wrong or expired. Verify with:

curl -s "https://api.telegram.org/bot<TOKEN>/getMe"

No messages appear in inbox

Check that TELEGRAM_BOT_TOKEN is exported in your shell:

set -a && source .env && set +a
bash scripts/telegram.sh poll .

Then run /ingest to process.

Messages appear but aren't processed

The tg-*.md files land in inbox/. Run /ingest manually to process them.

Offset stuck / replaying old messages

Delete context/telegram-state.json and recreate it:

echo '{"offset": 0}' > context/telegram-state.json
bash scripts/telegram.sh poll . skip

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.