Skip to content

Claude Blog Explained: The 5-Gate Autonomous Content Engine

Inside AgriciDaniel/claude-blog: how 32 skill directories, 5 subagents, and a blocking 5-gate delivery contract eliminate hallucinated AI slop at scale.

Hoang Yell
Hoang Yell
13 min read
Tiếng Việt
Claude Blog Explained: The 5-Gate Autonomous Content Engine

Generating text with large language models has become deceptively simple. Hand an LLM a prompt like “Write a technical blog post on distributed consensus,” and within seconds you get twelve paragraphs of plausible-sounding prose.

Yet anyone running an engineering blog in 2026 knows the bitter aftermath: hallucinated performance benchmarks, broken JSON-LD schema markup, generic boilerplate clichés, missing image assets, and SVG diagrams that clip past mobile viewport boundaries. When search engines deploy helpful content and anti-spam algorithms, these sloppy drafts suffer algorithmic demotion.

The root cause is structural: most AI workflows treat the human operator as the first line of review. You spend forty-five minutes fixing broken links, fact-checking cited numbers, and adjusting heading hierarchies.

Enter AgriciDaniel/claude-blog: an open-source Claude Code skill suite built on an uncompromising engineering premise: the user is never the first reviewer. Driven by 32 skill directories, 5 sandboxed subagents, and an automated 5-gate delivery contract, it refuses to present an article until every claim is verified, every viewport renders cleanly, and the draft scores at least 90 out of 100.

TL;DR

Quick Answer Box (Google Search Featured Snippet):

  • What is Claude Blog? Claude Blog (AgriciDaniel/claude-blog) is an open-source skill suite for Anthropic’s Claude Code CLI that automates end-to-end technical blog creation, SEO/GEO optimization, multi-engine AI citation scoring, and site audits.
  • Why it matters: It replaces unconstrained one-shot prompting with an automated 5-gate Blog Delivery Contract. Drafts scoring below 90/100 or failing visual, schema, or link integrity tests are automatically blocked and sent through up to three internal repair iterations before reaching the developer.
  • Core Architecture: 1 orchestrator, 31 sub-skills (30 user commands), 5 subagents with Bash stripped for blast-radius isolation, CSPRNG nonce-fenced untrusted data loaders, and headless Patchright multi-viewport rendering.
  • Official Repository: AgriciDaniel/claude-blog on GitHub · MIT License · 2,130+ Stars.

Repository: AgriciDaniel/claude-blog

Before examining the internal Python and Markdown engines, examine how raw AI prompting behaves without a delivery contract. The diagram below highlights the failure mode: unconstrained generation produces unverified metrics and broken markup that require tedious manual correction.

The next diagram reveals the 5-gate pipeline implemented by claude-blog: an orchestrator coordinates specialized subagents, renders multi-format outputs, and executes automated gates that block defective drafts before they reach the user.

Keep this architectural contrast in mind: raw generative models output probabilistic guesses; a delivery contract wraps them in deterministic verification loops.


Beginner Map: Probabilistic Drafting vs. Deterministic Gatekeeping

To understand why claude-blog was architected this way, map the workflow into four distinct stations:

  1. The Human Intent: The developer issues a high-level intent (/blog write <topic>).
  2. The RAG Orchestrator: The central controller reads local environment capabilities and selectively loads domain references.
  3. The Sandboxed Swarm: Dedicated subagents research factual statistics, draft the copy, generate charts, and inspect SEO metrics without system execution privileges.
  4. The Preflight Gatekeeper: Independent Python daemons render HTML/PDF, capture browser viewports, verify link status codes, and halt delivery if quality standards are not met.

First Practical Exercise

Audit your current drafting process. Draw four boxes on a notebook: your input prompt, the raw model output, the manual sanity checks you perform, and the published page. Count how many minutes you spend verifying links, formatting tables, and tweaking image tags. If that manual review takes more than fifteen minutes, an automated delivery gate saves hours every week.

Part 1: Foundations - the mental model

The foundational design insight behind claude-blog is recognizing that prompt instructions alone cannot guarantee quality. Telling a model “make sure your facts are accurate and write in valid HTML” often fails because LLMs are generative token predictors, not runtime linters.

To bridge this gap, author Daniel Agrici structured claude-blog around two architectural pillars:

1. On-Demand RAG Loading (Zero Context Bloat)

A common mistake in agent design is packing entire knowledge bases into the system prompt. With 22 detailed methodology references (covering E-E-A-T signals, AI crawler directives, cognitive load calculations, and platform specs) and 12 structural templates, injecting everything at startup would burn 60,000 tokens per invocation before the model writes a single word.

Instead, claude-blog implements lazy, on-demand loading:

  • A /blog write invocation loads only content-rules.md, visual-media.md, and the auto-selected template.
  • A /blog geo audit loads only geo-optimization.md and ai-crawler-guide.md.
  • A /blog schema call loads only schema-stack.md.

Context remains lean, response latency drops, and token budgets are preserved for substantive research and analysis.

2. Subagent Blast-Radius Isolation

When autonomous agents run in terminal environments, security becomes paramount. A malicious prompt injection embedded in a researched web page could instruct a naive agent to execute arbitrary shell commands.

In claude-blog, all five subagents (blog-researcher, blog-writer, blog-seo, blog-reviewer, blog-translator) have their Bash execution tool explicitly revoked in frontmatter:

# agents/blog-reviewer.md
name: blog-reviewer
description: Quality assessment specialist for blog posts.
tools:
  - Read
  - Grep
  - Glob

Subagents can read files, inspect patterns, and emit text, but they cannot invoke shell binaries or touch network sockets directly. System commands, browser rendering, and network requests are strictly executed by deterministic host-level Python scripts (blog_preflight.py, blog_render.py).

Part 2: The Investigation - what actually happens?

When a user executes /blog write "Distributed Vector Databases", the engine does not rush to output Markdown. It initiates an orchestrated multi-phase pipeline.

Phase 1 to 3: Synthesis, Research, and Charting

The orchestrator first invokes blog-researcher using WebSearch and WebFetch to gather 8 to 12 verifiable statistics from Tier 1 to Tier 3 sources. It searches for matching stock visuals or initiates Gemini image generation.

Next, the internal blog-chart engine converts numeric findings into inline, responsive SVGs (diverging bar charts, trend lines, or comparison matrices). The blog-writer agent then drafts the complete article using purpose-first headings, self-contained explanations, and an answer-first summary box.

The Core Engine: The 5-Gate Delivery Contract

Once drafting finishes, control passes to scripts/blog_preflight.py. The draft must clear five consecutive gates:

[Draft Markdown]


Gate 1: Capability Discovery (tools, env keys, local deps)


Gate 2: Format Completeness (.md + .html + .pdf + hero image)


Gate 3: Visual Verification (Patchright at 375, 768, 1280px)


Gate 4: Content Review (blog-reviewer >= 90/100, zero P0 issues)


Gate 5: Asset & Link Integrity (SSRF-safe DNS, 200 HTTP, schema wordCount)


[Delivery: 8 Production Artifacts]

Let us examine the mechanical checks inside each gate:

  1. Gate 1 (Capability Discovery): Probes active tools, environment keys (GOOGLE_AI_API_KEY, UNSPLASH_ACCESS_KEY), optional Python libraries (patchright, weasyprint), and context files. It writes `<draft>/capabilities.json` so downstream gates consume a single verified manifest.
  2. Gate 2 (Format Completeness): Compiles `<slug>.md` into standalone `<slug>.html` and `<slug>.pdf` via scripts/blog_render.py. It requires a physical hero.png or hero.jpg (1200x630) obtained via an image generation ladder (Banana MCP -> Gemini API -> Stock API -> Openverse). Missing any file triggers an immediate block.
  3. Gate 3 (Visual Verification): Spins up headless patchright (or Playwright) and captures full-page screenshots at three viewport widths: 375px (mobile), 768px (tablet), and 1280px (desktop). It traverses every `<svg>` element via getBoundingClientRect() to assert no text labels overflow their parent viewBox. It then emulates prefers-color-scheme: dark to ensure backgrounds adapt cleanly.
  4. Gate 4 (Blocking Content Review): Dispatches blog-reviewer against the rendered HTML. The agent evaluates a 100-point rubric across Content Quality (30), SEO (25), E-E-A-T (15), Technical Elements (15), and AI Citation Readiness (15). If the score is below 90, or if any P0 issue (such as an unsourced factual claim) is flagged, the gate issues a hard block:
    BLOCKING: true (Overall 86/100 below threshold; P0 on Heuristic 5)
  5. Gate 5 (Asset and Link Integrity): Inspects every `<img>` and `<a>` tag. External URLs are checked via HEAD and range GET requests using an SSRF-resistant resolver that blocks private subnets, localhost, and cloud metadata IPs (169.254.169.254). It also verifies that the JSON-LD wordCount matches the actual `<article>` text within ±5%.

The Three-Strike Iteration Loop

If any gate fails, the orchestrator captures the failure diagnostic, writes the issue into an iteration prompt, and re-dispatches the writer agent to fix the lowest-scoring section. The loop runs up to 3 times. If the draft fails on the third attempt, the system halts with an explicit error rather than shipping degraded content.

To prevent an agent from forging the iteration counter, claude-blog stores an external state file (.iteration-count) on disk (v1.9.1 hardening, preventing VULN-802).

Part 3: The Diagnosis - terms that cause confusion

Several terms in the AI content ecosystem generate confusion among engineering teams:

1. GEO (Generative Engine Optimization) vs. Traditional SEO

Many marketing vendors pitch “GEO” as a magical new discipline requiring proprietary file structures or llms.txt endpoints.

The reality, as confirmed by search documentation in mid-2026, is that generative engine optimization is fundamentally robust technical SEO. Search answer engines (Google AI Overviews, Perplexity, ChatGPT Search) rely on web indexers. If your page lacks semantic H2/H3 headings, clear entity definitions (**Term** refers to...), self-contained answer paragraphs, and structured comparison tables, an LLM citation engine simply cannot extract your data.

claude-blog’s scripts/ai_citation_score.py implements an editorial readiness heuristic that evaluates:

  • Evidence-backed sections: sections containing inline citation links or empirical numbers.
  • Entity clarity: explicit bold definition patterns.
  • Answer-first paragraphs: immediate factual answers following question headings.

2. First-Order vs. Second-Order AI Slop

Eliminating common AI filler words like ‘delve’ or inflated corporate buzzwords is straightforward pattern matching.

claude-blog targets what senior engineers identify as Second-Order Structural Slop:

  • Hedge Stacking: Packing three or more timid qualifiers into a single sentence (“This tool may often generally tend to improve latency”).
  • Three-Clause Monotony: Chaining monotonous rhythmic cadences across consecutive sentences ([clause], [clause], [clause].).
  • Symmetric List Bloat: Generating bulleted lists where every item has an unnaturally identical character length (low standard deviation).
  • False Balance Framing: Weak rhetorical balancing (“While X has benefits, Y also has advantages”) repeated across multiple sections.

3. Nonce-Bound Context Fencing (VULN-803)

When reading local project context files (BRAND.md, VOICE.md, DISCOURSE.md), untrusted text could theoretically contain prompt injections designed to manipulate agent scoring.

claude-blog handles this in scripts/load_untrusted_root.py using cryptographically secure PRNG nonces:

# scripts/load_untrusted_root.py snippet
nonce = secrets.token_hex(16)  # 128-bit CSPRNG hex nonce
fenced_output = f"=== BEGIN UNTRUSTED BRAND.md [nonce: {nonce}] ===\n{content}\n=== END UNTRUSTED BRAND.md [nonce: {nonce}] ==="

Because the nonce is generated dynamically by Python and unknown to the file’s author, an adversary cannot pre-embed a matching termination token to break out of the fence.

Part 4: The Resolution - tradeoffs and when to use it

Before installing claude-blog, evaluate whether its heavy verification pipeline aligns with your team’s publishing model.

Decision Matrix: When to Adopt vs. Skip

Operational Requirement Raw Claude Prompting Hosted AI Copy SaaS claude-blog Skill Suite
Iteration Speed Instant (under 30s) Fast (1-2 min) Deliberate (3-6 min)
Token Cost Per Article Minimal (~15k tokens) Subscription cost Heavy (80k-200k tokens)
Blocking 90+ Quality Gate No No Yes (Code-enforced)
Automated Multi-Viewport Screenshots No No Yes (375, 768, 1280px)
Local Dependency Overhead Zero Zero High (Python 3.11, Patchright)
Data Privacy & Ownership Cloud API Vendor Cloud 100% Local / Git-tracked

The Rough Edges (Honest Engineering Tradeoffs)

No engineering system is without costs. claude-blog carries distinct operational overheads:

  1. The Token Tax: Running an orchestrator, dispatching three subagents, executing scripts/analyze_blog.py, and retrying drafts through up to three iteration loops burns substantial API tokens. Generating a gated 2,500-word article often consumes 120,000 to 180,000 tokens ($0.40 to $1.20 per draft on Claude 3.7 Sonnet).
  2. Heavy Host Dependencies: Gate 2 and Gate 3 require a robust local toolchain. Compiling PDFs requires weasyprint, which depends on system-level cairo, pango, and gdk-pixbuf C-libraries. Rendering screenshots requires headless browser binaries managed by patchright or playwright. On constrained VPS hosts or lightweight containers, installation can fail without native system packages.
  3. Claude Code Ecosystem Lock-in: The skill architecture relies on Claude Code’s native skill discovery directory (~/.claude/skills/) and agent markdown frontmatter (~/.claude/agents/). Porting this directly to Cursor, Windsurf, or custom OpenAI agents requires rebuilding the orchestrator and task dispatchers.

Technical FAQ

How does claude-blog prevent fabricated facts and citations?

The pipeline enforces a zero-tolerance policy on unsourced claims. Phase 2 uses blog-researcher to verify statistics via live web queries. During Gate 4, blog-reviewer audits every metric; if a factual statistic lacks an attributed Tier 1 to Tier 3 source, it triggers an immediate P0 block. Gate 5 then issues HTTP requests to verify that all cited reference links return valid 200 OK responses.

Can claude-blog output clean Markdown without HTML or PDF artifacts?

Yes. While strict delivery mode requires .html, .pdf, and screenshots for multi-format validation, the canonical source of truth remains the standalone `<slug>.md` or `<slug>.mdx` file. You can commit the markdown directly to Next.js, Astro, Hugo, or Jekyll repositories while discarding the generated preview folder.

How does the engine handle multi-language localization?

Through the /blog multilingual <topic> --languages <codes> command, the orchestrator drafts the canonical version, hands it to blog-translator to preserve frontmatter keys and JSON-LD schema, runs cultural locale adaptation (DACH, FR, ES, JA), and automatically emits standard `<link rel="alternate" hreflang="...">` tags.

Why does the system strip the Bash tool from subagents?

To establish a strict security boundary. Research agents parse untrusted text from external web pages. Stripping Bash prevents prompt injection attacks from executing arbitrary shell commands or exfiltrating private SSH keys. System-level actions are restricted to audited Python scripts called by the orchestrator.

Final Take

Autonomous AI writing is not about generating larger walls of text; it is about establishing deterministic verification gates that hold generative models to production standards.

Student First Assignment

Clone the repository and inspect the preflight engine:

git clone --depth 1 https://github.com/AgriciDaniel/claude-blog.git /tmp/claude-blog-audit
cd /tmp/claude-blog-audit
python3 scripts/lint_prose.py
python3 scripts/check_secrets.py

Examine scripts/blog_preflight.py to see how Gate 3 measures SVG bounding box overflows and how Gate 5 validates external links with DNS-level SSRF guards. Adapting these preflight patterns into your team’s CI pipeline will immediately raise your technical publishing bar.


Repository: AgriciDaniel/claude-blog · MIT License · 2,130+ Stars.

Related posts