AI for Automation
Back to AI News
2026-04-19claude-codeai-automationagentic-engineeringprompt-engineeringanthropicpythonllm-agentvibe-coding

Claude Code Runs Simon Willison's Blog Pipeline in 3 Lines

Claude Code built Simon Willison's newsletter and blog pipeline using 3-line prompts. His agentic engineering patterns — now public — redefine AI automation.


A 3-line prompt extended a live newsletter tool without a single rewrite. Simon Willison — the engineer behind Datasette (an open-source tool for publishing SQLite databases as browseable websites) — has spent months publicly documenting the agentic engineering patterns (repeatable workflows where an AI agent takes multi-step actions autonomously) that now run his entire blog and publishing pipeline, and the results are changing how experienced developers think about AI automation and AI-assisted coding.

If you have ever spent 20 minutes explaining your codebase to an AI assistant only to get code that misses the point entirely, Willison's approach fixes that problem at the source. The answer is not a longer prompt — it is reference code.

The Claude Code Reference-Code Trick That Cuts Prompt Length by 90%

When Willison needed to extend his blog-to-newsletter tool with a new content type, he faced the familiar problem of context: how do you explain a complex, multi-file system to an AI agent quickly and accurately? His solution was to have Claude Code (Anthropic's autonomous coding agent) clone a reference repository into /tmp (a temporary system folder that clears automatically on reboot) — study the existing patterns, then write new code that fits the style.

"Telling agents to use another codebase as reference is a powerful shortcut for communicating complex concepts with minimal additional information needed in the prompt."

The technique works because coding agents can navigate GitHub directly. Instead of describing how his newsletter processes blog entries in multi-paragraph detail, Willison handed Claude Code an existing example implementation and let it infer the pattern. The result: a working SQL UNION clause (a database command that combines the results of two separate queries into a single output) added cleanly in one pass — filtering for non-empty descriptions and non-draft status, without touching the rest of the codebase.

# The reference-code cloning pattern in practice
# Tell the agent to clone a reference repo BEFORE writing new code:

# Step 1: clone to /tmp so it never gets accidentally committed
git clone https://github.com/example/similar-tool /tmp/reference

# Step 2: let the agent study patterns and write new code

# Step 3: validate output with Python's built-in local server
python -m http.server 8000
# Then use browser automation to verify output vs. live site

A subtle but important detail: cloning to /tmp (rather than inside the working directory) prevents the agent from accidentally committing reference code into your project. Willison made this an explicit part of his pattern after identifying it as a common failure mode in agentic workflows.

Simon Willison, engineer behind Datasette, using Claude Code for AI automation agentic engineering

Anthropic's System Prompts, Browseable as Git History

Anthropic publicly publishes the system prompts (standing instructions written into Claude before any user message arrives) for its models on its platform documentation page, formatted as Markdown files. Willison used Claude Code to convert those prompts into a structured git repository (a version-controlled folder where every change is saved with a timestamp and author record) — one file per model, organized by model family, with commit dates applied to enable timeline browsing through GitHub's native interface.

The practical value: any developer can now track how Claude's core instructions have evolved across versions — which safety guidelines were strengthened, which capabilities were scoped down, which phrasings changed — without manually comparing raw text files. It is a free, searchable audit trail of how one of the world's most-used AI systems has been instructed to behave.

# Explore Claude system prompt evolution as git history
git clone https://github.com/simonw/research
cd research/extract-system-prompts

# Browse prompt changes by model version
git log --oneline

# Compare two model versions side-by-side
git diff claude-3-opus claude-3-5-sonnet -- system_prompt.md

One honest caveat from Willison: the commit dates are "fake" — they represent logical grouping by model version, not the precise dates Anthropic made each change. The timeline is an organizational proxy, not a forensic record. But for most developers wanting to understand Claude's behavioral guardrails, the logical grouping is more useful than absent timestamps would be.

A 3-Line Prompt That Extended a Live Publishing Tool

Willison's blog recently added a content type called "beats" — short entries capturing external content: tool releases, research findings, museum visits, and more. Six beat categories are now handled: release, TIL (today I learned), TIL update, research, tool, museum. The newsletter tool needed to include these beats, but with one critical filter — only entries where Willison had personally written a description should appear in the newsletter. Automatically-generated entries (like minor dot-release bug fixes for small open-source projects) should be silently excluded.

The entire requirement was communicated in 3 lines. Claude Code extended the newsletter tool's existing SQL (the database query language the tool uses to fetch content) to add a UNION clause pulling beats from a separate table, filtered by non-empty descriptions and non-draft status. No additional context. No back-and-forth clarification. The generated code matched the editorial logic already encoded elsewhere in the system.

Why the Filter Mirrors the Atom Feed Logic

The newsletter filtering approach mirrors Willison's existing Atom feed (a standardized subscription format that lets readers follow blogs without visiting them manually) logic — both use the presence of author-added descriptions as a signal for editorial interest. This is distinct from algorithmic ranking: it is explicit human judgment encoded as a single database field. Automated content gets no description and gets filtered out. Curator-selected content gets a description and passes through. Simple, deterministic, human-controlled — and the agent grasped this logic from context alone.

Claude Code Validation: The Step That Separates Reliable Agent Work from Unpredictable Output

Willison identified a pattern that appears across all his successful agentic workflows: the agent needs a validation mechanism it can run itself. For newsletter development, that meant launching python -m http.server (Python's built-in one-command local web server, no installation required) and using Rodney (a lightweight browser automation tool) to visually verify the rendered newsletter matched the live blog content before declaring success.

"Coding agents always work best if they have some kind of validation mechanism they can use to test their own work."

This closes the feedback loop that most AI coding setups leave open. Without self-validation, an agent produces code that compiles cleanly but fails on edge cases — a SQL filter that silently drops valid entries, or a newsletter layout that renders in one browser but breaks in another. By giving the agent a server to launch and a browser to inspect, Willison lets it catch and fix these issues before they reach a human reviewer.

  • Reference code cloning — gives the agent codebase context in seconds, not paragraphs
  • Agent-controlled validation — lets the agent detect and fix its own edge-case failures
  • Editorial signals in database fields — encodes human curation logic the agent can read and respect

PyCon US 2026: The Python Community Formalizes AI Engineering

Willison is not developing these patterns in isolation — he chaired the new AI track at PyCon US 2026 (May 13–19, Long Beach, California). The conference marks the first West Coast PyCon since Portland in 2017, and the first California venue since Santa Clara in 2013. Two brand-new dedicated tracks debuted this year: an AI track (Friday, May 15) co-chaired by Silona Bonewald (CitableAI) and Zac Hatfield-Dodds (Anthropic), and a Security track (Saturday).

The AI track features 8 talks across a range of emerging techniques:

  • AI-assisted open-source contributions
  • Adaptive learning systems with language models
  • LLM quantization (compressing large AI models to run on less powerful hardware)
  • Edge inference (running AI models directly on devices instead of cloud servers)
  • Async agent architectures (building agents that handle multiple tasks simultaneously)
  • Voice AI applications in production

The track reflects a broader shift: Python developers no longer want just code completion shortcuts. They want systematic mental models for building workflows where AI agents understand entire codebases, maintain context across sessions, and validate their own outputs. Willison's published patterns — developed on his own blog infrastructure — are increasingly the starting point for those conversations.

The Bigger Pattern: AI Automation as a Teachable Discipline

Five projects on GitHub have been directly inspired by or forked from Willison's blog code. His approach is not to release polished frameworks (packaged, installable software libraries) — it is to document the thinking process in enough detail that others can reproduce it. Each writeup shows the exact prompt, the validation step, and the edge case that almost caused failure.

That transparency is the product. The shift from "AI chatbot answering questions" to "AI agent navigating complex systems autonomously" is happening faster than most documentation can track. Willison's blog is functioning as a real-time engineering journal where an emerging discipline is being codified by example.

The patterns are usable today. The next time you ask Claude Code to extend an existing tool, paste a GitHub URL of a similar implementation and tell the agent to clone it to /tmp first. Then give it a way to test its output — even python -m http.server is enough. These two steps — reference code cloning and agent-controlled validation — are the backbone of every reliable agent workflow Willison has published. Explore more agentic engineering techniques at AI for Automation's learning center, or browse the latest AI tooling news.

Related ContentGet Started | Guides | More News

Stay updated on AI news

Simple explanations of the latest AI developments