AI Claude Code Telegram Automation BuildInPublic

I Set Up Claude Code on a Server with Telegram. Here's What Happened.

How I wired up Claude Code to a Telegram bot on a remote server and built a blogging pipeline that writes, reviews, and publishes posts from my phone.

8 min read

The Problem

I have a side project. It has a blog. The blog needs content for SEO. I know this. You know this. Everyone knows this.

But I never write the posts. Because by the time I’m done with actual feature work, the last thing I want to do is open a Google Doc and write 1500 words about baby milestones.

So I did what any reasonable developer would do. I spent an entire day automating it instead of just writing the damn post.

The Idea

Run Claude Code on a remote server. Connect it to a Telegram bot. Send a message from my phone, and have a fully researched, written, reviewed, and deployed blog post land on my site without me touching a laptop.

Sounds ridiculous. It works.

Setting Up Claude Code on the Server

Claude Code is Anthropic’s terminal-based AI agent. It’s not a chatbot. It runs in your terminal, reads your files, writes code, executes shell commands, does git operations. Think of it as an AI that actually has hands.

I spun up a Linux server, cloned my website repo, and installed Claude Code. Once it has access to the repo, it can:

  • Read existing posts to know what’s already published
  • Create new markdown files with the right frontmatter
  • Run git add, git commit, git push
  • Trigger a Vercel deploy (happens automatically on push)

That part was straightforward. The interesting part was making it accessible from my phone.

The Telegram Bridge

I built a Telegram bot that acts as a relay. I message the bot, the bot passes my message to Claude Code on the server, Claude Code does its thing, and the bot messages me back when it’s done.

The bot itself is simple. It listens for messages, spawns a Claude Code session with the message as input, and streams back the result. No fancy UI. No web dashboard. Just Telegram.

Why Telegram? Because I already have it on my phone, it handles long messages well, and the Bot API is dead simple to work with.

The Part Where I Learned Something

Raw AI blog output is garbage.

Not factually wrong. Just painfully generic. I told Claude Code to write a blog post about baby milestone photos and got back something that could’ve been generated by any AI tool on the internet. Every section was the same length. The word “stunning” appeared four times. There were em-dashes everywhere. It opened with “In today’s fast-paced world.” I wanted to close my laptop.

So I built something better.

The 5-Phase Pipeline

Instead of one prompt, I built a structured pipeline with 5 phases. Each phase has specific instructions stored in a Claude Code Skill file (more on that later).

Phase 1: Keyword Research

Claude Code actually searches the web. It looks for low-competition keywords in the niche, checks what’s ranking on Google, avoids topics I’ve already covered. It picks a keyword where small blogs are ranking, not massive authority sites.

Phase 2: Write the Draft

Writes a full 1000-1500 word post in my site’s exact format. Correct frontmatter. Proper heading hierarchy. Internal links to my tools pages. The filename becomes the URL slug, so it picks something SEO-friendly.

Phase 3: AI Slop Review

I wrote a checklist of every pattern that makes writing sound AI-generated. Buzzwords like “transformative” and “delve.” Fake personal anecdotes. The same topic-sentence-bullet-list-conclusion pattern in every section. Uniform section lengths. Em-dash addiction. Marketing fluff.

The draft gets audited against this checklist. The output is a numbered list of problems with exact quotes from the text and explanations of why each one is a problem.

Phase 4: Rewrite

Takes that problem list and rewrites the whole post. Replaces buzzwords with plain language. Varies section lengths. Breaks predictable structure. Adds actual opinions instead of hedging everything.

Phase 5: Cover Image and Publish

Generates a cover image using Google’s Gemini API (Nano Banana Pro, 1K resolution). Commits both the post and the image. Pushes. Site rebuilds. Done.

Claude Code Skills

This is the feature that makes the whole thing reusable. Skills are markdown files with structured instructions that Claude Code follows when triggered.

My blog writing skill is about 150 lines of markdown. It defines all 5 phases, the exact file format, the AI slop checklist, and the git workflow. I have a separate skill for just the image generation.

I keep these in a dotconfig git repo and symlink them to ~/.claude/skills/. They work on any machine where Claude Code is installed. I can also trigger them with /write-blog baby sleep tips in the terminal.

dotconfig/
├── .claude/
│   └── skills/
│       ├── write-blog/
│       │   ├── SKILL.md
│       │   └── ai-slop-checklist.md
│       └── generate-blog-cover/
│           ├── SKILL.md
│           └── scripts/
│               └── generate-cover.py

The AI Slop Checklist

This deserves its own section because it’s the most useful thing I built today.

It’s a markdown file with specific patterns to flag:

  • Banned words: stunning, transformative, impactful, delve, leverage, seamless, embark, unlock, empower
  • Banned phrases: “Let’s dive in”, “In today’s fast-paced world”, “You’ve got this!”, “Game-changing”
  • Structural patterns: every section same length, every section ending with a neat one-liner, perfect transitions between every paragraph
  • Voice issues: fake personal anecdotes, saccharine cheerleading, hedging every opinion
  • Formatting: em-dash overuse, bold overuse, repeated filler phrases

The checklist forces the rewrite to actually sound different from the draft. Without it, the rewrite was just a slightly polished version of the same AI slop.

What Actually Happened Today

I set this all up in one afternoon. Wrote the skills, connected the bot, tested the pipeline a few times. Then I sent a Telegram message and watched a blog post get researched, written, reviewed, rewritten, and deployed to a live site.

From my phone.

It’s not going to win any writing awards. But it replaced doing nothing, which was the realistic alternative.

The Stack

Not sharing server details or credentials, but here’s what the system runs on:

  • Claude Code — AI agent (file I/O, git, web search)
  • Telegram Bot API — phone-based trigger
  • Astro / Next.js — site frameworks
  • Gemini API — cover image generation (Nano Banana Pro, 1K)
  • Vercel — hosting, auto-deploy on push
  • Claude Code Skills — reusable workflow definitions in markdown

Was It Worth It

I spent a day building this instead of writing one blog post. But now I can publish posts from Telegram in a few minutes. The math works out after the third post.

The AI slop review is the key insight. Without it, you’re publishing content that everyone can tell is AI-generated. With it, you’re at least publishing content that tries not to be.

The whole setup is open-ended. I can add new skills, improve the checklist, plug in analytics feedback. It’s a system, not a one-off script.

Good day.


Building something similar? Find me on X.