
The Best Pull Request Deletes More Than It Adds
How Ponytail became a useful cleanup stage in my Claude Code review workflow.
Turns an AI agent's Markdown into HTML that Telegram accepts and streams its reply into a live draft.
Hooking an AI agent up to a Telegram bot has a few hard parts:
Telegram Agent Kit handles these cases, so your bot code does not have to. Its core has no runtime dependencies and runs on Node 20+, Bun and Deno, and the formatting part in the browser too. It makes no network calls of its own: you give it a few small functions that call the Bot API, and it handles everything around them.
mdToTelegramHtml turns whatever the model wrote into HTML that Telegram accepts, and it never throws:
import { mdToTelegramHtml } from 'telegram-agent-kit';
mdToTelegramHtml('**Done.** Saved to `notes.md`.');
// '<b>Done.</b> Saved to <code>notes.md</code>.'
// In a live draft, partial mode closes whatever the stream left open.
mdToTelegramHtml('Here is **the plan', { partial: true });
// 'Here is <b>the plan</b>'
While the agent works, its draft shows the plan and each tool call above the growing answer. Once the reply is sent, the draft disappears on its own:
📋 Plan
✔️ f̶i̶n̶d̶ ̶t̶h̶e̶ ̶w̶e̶e̶k̶'̶s̶ ̶e̶n̶t̶r̶i̶e̶s̶
🔘 total the calories
⬜ compare against the target
🔧 `query_journal`…
─────
Over the week you ate 14,200 kcal
With the optional telegram-agent-kit/deepagents adapter this feed needs no wiring at all.
npm install telegram-agent-kit
The README walks through a full bot turn, from the Bot API calls to rollback on failure.

How Ponytail became a useful cleanup stage in my Claude Code review workflow.

Using Claude Code custom commands to replace manual dependency updates and tool upgrades in a monorepo.

A Neovim setup that uses Copilot Chat to generate commit messages with the right format, branch name, and project rules.