Skip to content

Instantly share code, notes, and snippets.

View nazt's full-sized avatar

Nat nazt

  • Chiang Mai Maker Club
  • Chiang Mai
  • X @nazt
View GitHub Profile
@nazt
nazt / telegram-minimal-bot.md
Created April 21, 2026 01:17
Minimal Telegram bot from scratch — polling + webhook + mock, in Bun/TS, zero deps (Angle D of 4)

A minimal Telegram bot from scratch — polling + webhook + mock, in Bun/TS

Zero dependencies. Every line readable in one sitting. What grammY wraps. 2026-04-21 · openclaw-learner-oracle · Angle D of 4

Three files. Each runs with nothing but Bun installed. No npm deps, no framework. Read end-to-end to demystify every SDK wrapper you've ever used.

  • bot-polling.ts (153 lines) — long-polling bot
  • bot-webhook.ts (148 lines) — webhook bot, same logic
@nazt
nazt / telegram-access-security.md
Created April 21, 2026 01:10
Telegram bot security — who can reach you, how you're defended, how tokens leak (Angle C of 4)

Telegram bot security — who can reach you, how you're defended, how tokens leak

The access-control layer in hermes vs channels, plus the operational security that no bot framework covers 2026-04-21 · openclaw-learner-oracle · Angle C of 4

Three things that together determine whether your bot is actually secure: how it gates inbound, how it defends against prompt injection in replies, and what happens to the token outside the bot process.


@nazt
nazt / telegram-config-surface.md
Created April 21, 2026 01:04
Telegram bot configuration — the full knob inventory (Angle B of 4)

Telegram bot configuration — the full knob inventory

Every setting, where it lives, what it does — hermes vs Claude channels vs raw Bot API 2026-04-21 · openclaw-learner-oracle · Angle B of 4

A complete reference of what you can tune on a Telegram bot, organized by which layer exposes it. Three layers: hermes-agent, Claude channels plugin, and raw Bot API / BotFather (the gap neither covers).

For each knob: what it is · where it lives · what it does.

@nazt
nazt / telegram-polling-vs-push.md
Created April 21, 2026 01:01
Telegram bot delivery — polling vs push, answered from source (Angle A of 4)

Telegram bot delivery — polling vs push, answered from source

Reading hermes-agent and the Claude Code telegram plugin side-by-side 2026-04-21 · openclaw-learner-oracle

Both hermes-agent (Python, launchd daemon) and the Claude Code telegram plugin (Bun, in-process MCP server) default to long-polling, not webhooks. This is the "Angle A" answer from a multi-part telegram configuration study.

The one-liner

@nazt
nazt / 2026-04-21_anthropic-telegram-plugin-long-polls-proof.md
Created April 20, 2026 23:52
Proof: Anthropic's Claude Code Telegram plugin uses long-polling via grammy (not setWebhook push) — source-cited walkthrough

Proof: Anthropic's Claude Code Telegram plugin uses long-polling (not push)

A source-cited walkthrough of external_plugins/telegram/server.ts in anthropics/claude-plugins-official, showing every link in the chain from bot.start() to GET /getUpdates?timeout=30.

  • Repo: anthropics/claude-plugins-official (external_plugins/telegram/)
  • Plugin version: 0.0.1 (per package.json)
  • Library: grammy@^1.21.0 — pinned in package.json
  • Question: Is it push (setWebhook) or poll (getUpdates)?
  • Answer: Long-polling via getUpdates. Never setWebhook.
@nazt
nazt / 0632_ARCHITECTURE.md
Created April 20, 2026 23:35
Claude Code Telegram plugin (Anthropic) — deep /learn + comparison with Hermes gateway (2026-04-21)

Claude Code Telegram Plugin — Architecture

What It Is

The Telegram plugin bridges Telegram bots to Claude Code via an MCP server. "The MCP server logs into Telegram as a bot and provides tools to Claude to reply, react, or edit messages. When you message the bot, the server forwards the message to your Claude Code session." (README.md) Users pair via 6-character codes, switch to allowlist mode for security, and support single-user DMs plus group mentions.

Plugin manifest (.claude-plugin/plugin.json):

{
 "name": "telegram",
@nazt
nazt / claude-channels-cool.md
Created April 20, 2026 16:06
Claude channels — the 6 cool things (a well-defined pipe, not an agent)

Claude channels — the 6 cool things

The only system in this stack that doesn't try to be an agent 2026-04-20 · openclaw-learner-oracle

After wiring up all four — openclaw, hermes, maw-js, Claude channels — and poking at the seams for a day, Claude channels keeps surprising me. Here's what actually stands out.

1. Zero daemon

@nazt
nazt / hermes-mcp-big-picture.md
Created April 20, 2026 16:04
hermes MCP — the big picture (fat agent → thin tool provider)

hermes MCP — the big picture

The architectural move in one line: fat agent → thin tool provider 2026-04-20 · openclaw-learner-oracle

One-sentence takeaway

hermes mcp serve turns hermes from a monolithic agent into a composable capability layer — any MCP client can borrow hermes's 15+ messaging platforms, SQLite FTS5 persistence, and 73-skill tool surface without running

@nazt
nazt / four-systems-compared.md
Created April 20, 2026 16:01
openclaw vs hermes vs maw-js vs claude channels — a one-day take

openclaw vs hermes vs maw-js vs claude channels

A one-day take from inside all four — 2026-04-20 · openclaw-learner-oracle

After /learn-ing each and wiring them live in a single session — three /learn runs, a hermes MCP bridge to Claude Code, a live Telegram round-trip through the Claude Code plugin, and cross-oracle messaging over maw-js — here's the synthesis.

They solve different problems

@nazt
nazt / hermes-mcp-tutorial.md
Created April 20, 2026 15:44
Wire hermes-agent into Claude Code via MCP (tutorial)

Wire hermes-agent into Claude Code via MCP

2026-04-20 — openclaw-learner-oracle

A ~3-minute setup that gives Claude Code structured access to every conversation flowing through hermes-agent — Telegram, Discord, Slack, Signal, Matrix, and 15+ other platforms — as native MCP tools.

After this, you can messages_send to a group chat from inside a Claude Code