Gate an agent-run blog pipeline with scripts that block bad posts

Sungwoo Lee's Claude Code blog pipeline ran a pre-publish checker 248 times in 10 days, blocked 37 runs and kept 23 flawed posts from going live.

Done withClaude Code· Oct 25, 2026

What they did

Lee runs a blog operation on Tistory and dev.to where Claude Code writes and edits the Python scripts and a Windows scheduler runs them unattended. Every script appends one JSON line per run to a ledger. Between the model and the publish step sits a gate script that opens the actual post HTML and chart files and returns 0 for clean, 1 for a defect and 2 when the checker itself breaks. The publisher refuses to continue on a 1, and Claude Code then gets the defect names to fix. CLAUDE.md limits completion reports to the checker's name and exit code plus what a human actually opened.

How it went

From 28 September to 7 October the gate ran 248 times over 57 posts: 206 passes, 37 blocks and 5 checker failures. 23 posts were blocked at least once; 11 were fixed and passed, the other 12 never shipped. Most blocks were for missing or stale keyword research, charts rendered but not embedded, and relative dates. Across 49 days the scheduler logged 1,243 runs over 44 jobs, 39 of them failures and 207 successes with no output.

Worth knowing

The gates came from failures the model had reported as fine: 132 posts had shipped with no body images, a crash after publishing skipped the ledger and risked a double post, and a dry run rewrote a follow list. One page checker flagged 320 false defects because it opened pages from file://. Lee calls it one operator's setup, not a benchmark.

Try it

With Claude Code· 3 parts to fill in

Before any step that publishes, posts or deletes in [my content pipeline], write a checker script that opens the real output files and checks them for [my defects, such as missing images, stale research files or relative dates]. It must exit 0 when clean, 1 on a defect and 2 when it finds nothing to check or cannot read a file, and append one JSON line per run to [ledger path]. Wire it into the publisher so a non-zero exit stops the publish. When a post is blocked, fix only the named defects and run the checker again. Report only the checker name and exit code, and stop for my approval before changing the publisher itself.

Square brackets are the parts to fill in. The prompt is ours; the story is theirs.

Where they said it

Related