Claude Code Writing Squad: A Multi-Agent Editing Pipeline
A multi-agent writing system where seven specialized Claude Code agents process text sequentially, from typo correction through SEO optimization, producing polished professional content.
The Project
https://github.com/danielrosehill/Claude-Code-Writing-Squad
danielrosehill/Claude-Code-Writing-Squad View on GitHubEditing text well is not a single task. Catching typos is different from improving flow, which is different from fact-checking, which is different from optimizing for search engines. Human editorial teams split these responsibilities across specialists. This project does the same thing with Claude Code agents: seven specialized editors that process text sequentially, each one refining a different aspect of writing quality.

The Seven Agents
The pipeline consists of seven agents, each defined as a Markdown file containing a detailed system prompt. They run in a specific order where each agent's output becomes the next agent's input:
Basic Typo Reviewer -- Handles surface-level corrections: typos, spelling, punctuation, capitalization, and spacing. It preserves the author's voice and only fixes clear errors.
UK English Standardiser -- Converts text to UK English conventions: spelling (colour, organise), vocabulary, punctuation, and formatting.
Flow and Polish -- Restructures for readability. Ensures logical progression, smooth transitions, consistent tone, and natural pacing. This agent is described as "the invisible hand" and is instructed to never explain its changes.
Headings -- Generates and refines subheadings to create clear document structure that supports readability and comprehension.
Proofreader -- Verifies facts and statistics, corrects inaccuracies, and inserts inline Markdown links as sources for claims that need backing.
Add Sources -- Enhances source integration by adding reliable inline links at factual claims while preserving document structure.
SEO Reviewer -- Applies minimal, high-precision edits for search engine optimization without altering the voice or narrative.
The Automation Layer
A Python script (process_text.py) orchestrates the entire pipeline. It reads from input.md, runs each agent in sequence, saves intermediate results after every step, and writes the final output to output.md. The intermediate files (numbered 01 through 07) let you see exactly what each agent changed, which is valuable for understanding where improvements come from and for debugging if an agent introduces unwanted changes.
The repository also includes a processing log in JSON format that tracks timestamps and metadata for each run, plus a set of rules files that establish constraints like preserving the author's voice and maintaining the folder structure.

Why Sequential Beats Monolithic
The alternative approach would be a single mega-prompt that says "fix everything about this text." That works for simple cases, but it tends to produce inconsistent results. A single prompt trying to simultaneously catch typos, restructure flow, verify facts, and optimize for SEO will inevitably compromise on some of these objectives. By splitting the work into focused agents, each one can be deeply specialized and the overall system becomes more predictable and debuggable.
This is also a pattern that scales well. If you want to add a new capability -- say, a tone adjuster for different audiences or a legal review agent -- you just add a new agent file and insert it into the pipeline at the appropriate position. Each agent operates autonomously, producing direct output without commentary, which makes them composable in any order.