AI case study · Human in the loop · Personal tool

An AI that writes like me, and waits for my yes

A command-line agent that drafts LinkedIn posts in my own voice, makes the images and slide decks to go with them, and publishes on a schedule, but only the posts I’ve approved. It runs my 30-day “AI Terminologies Explained” series.

Role
Backend Developer
Models
Gemini (text) · Flux (images)
Timeline
July — November 2026

From post history to published, with me in the middle

  1. Learn voicePast posts → style profile
  2. DraftPost + image + deck
  3. I approveAPPROVED marker, or nothing posts
  4. ScheduleChecks every 15 min, Lagos time
  5. Publish oncePOSTED marker stops repeats

The problem

Posting every day for 30 days takes hours of writing and design. Fully automatic posting is risky: AI text sounds generic, and one bad post goes out under your name. I wanted the speed of automation with my voice and my final say.

Decisions worth explaining

Voice, not template

Learned from my own posts

It reads my LinkedIn data export safely, removes duplicate posts, and has Gemini describe my style. That profile goes into every prompt.

Approval gate

Nothing ships without a yes

A scheduler walks a dated queue. It posts only approved items, marks them posted so they never go twice, uses different times on weekdays and weekends, and gives up after three failures.

Clean output

Reads like a person wrote it

Filters strip the model’s “Here’s your post…” chatter and Markdown, because LinkedIn shows plain text only.

Problems I hit, and how I solved them

  1. Problem

    Learning a voice is expensive

    Analysing hundreds of past posts on every run would burn tokens and time.

    Solution

    Analyse once, save the profile

    Gemini studies my post history once and writes a style profile, which is saved to a file and reused in every prompt. My post history is also fetched once and kept locally, with duplicates removed.

  2. Problem

    Regenerating forever

    It’s tempting to keep hitting “try again” until a draft feels right, and every retry costs money.

    Solution

    Capped attempts, cheaper model

    Each post and image gets at most five attempts, and I can type feedback to steer the next one instead of starting over. Text uses Gemini’s lightweight Flash-Lite model.

  3. Problem

    Publishing shouldn’t need the AI

    If posting regenerated content, what goes out wouldn’t be what I approved.

    Solution

    Save the approved draft, post it as is

    Approved posts are saved to a dated queue. The scheduler publishes that saved text exactly as written, with no model call at posting time.

How it’s built

Python · Gemini via the google-genai SDK · Cloudflare Workers AI (Flux) for images · python-pptx for decks · HTML/CSS designs rendered to PNG with headless Chrome · my own LinkedIn OAuth and posting client with token refresh.

Have a project or a role in mind?