My Complete Blogging Workflow with Claude Code: How I Manage 30+ Posts
“Write a post about Hooks”—I type that into my terminal, and 15 minutes later the article is live. Outline review, drafting, build verification, git push, and GitHub Actions deployment are all handled by Claude Code.
This blog has 30+ posts. I don’t create files by hand, I don’t run hexo generate manually, and I don’t push commits myself. Claude Code paired with a tight set of Skills and Hooks collapses the publishing loop to the bare minimum.
This post walks through my workflow across four layers: how I write a single post, how I enforce quality, how I batch-rewrote 20+ articles, and how the setup evolved over time. Every layer includes copy-pasteable configs you can adapt directly.
Stack Overview
Here is the full picture before we dig into each layer:
| Layer | Tool | Role |
|---|---|---|
| Blog Framework | Hexo 7.3.0 + Butterfly 5.5.4 | Compiles Markdown into a static site |
| Deployment | GitHub Actions | Builds and publishes automatically on git push |
| Writing Rules | CLAUDE.md |
Defines tone, tagging conventions, and publish steps |
| Automation | 4 Skills | New post, new series, publish, and batch rewrite |
| Safety Guardrails | 4 Hook Groups | Dangerous-command blocking, build checks, screenshot verification, completion alerts |
| Batch Processing | Subagent Orchestration | planner → executor → scorer automated iteration |
| Quality Evaluation | Scoring Profile + Script | 30% quantitative + 70% qualitative; auto-rewrites anything under 70 |
Daily Workflow: Writing a New Post
Scaffolding a Post: One Skill Handles the Boilerplate
Instead of running hexo new manually, I invoke a custom Skill: /blog-new-post. Its definition lives in .claude/commands/blog-new-post.md and follows four steps:
- Draft an outline from the title and wait for my approval before continuing
- Run
yarn hexo new "<post title>"to create the file - Write the body and Front Matter following the style rules in
CLAUDE.md - Verify locally with
hexo serverand wait for me to say “publish”
The Front Matter template is fixed—every post must include these fields:
1 |
|
Early on, I used picsum.photos for random cover images. To eliminate flaky external links, keep a consistent visual style, and speed up page loads, I migrated every cover to local /img/covers/*.webp assets (as in this post’s Front Matter). Because this template is pinned in CLAUDE.md, Claude follows it verbatim on every new article.
Drafting the Body: Outline First
I always ask Claude for an outline before letting it write the full post. It’s not about distrust—discovering a structural mismatch after 2,000 words is far more painful to fix than starting over. In practice, it takes two prompts:
1 | Write a post about XXX. Give me an outline first so I can review it. |
Once the outline looks right:
1 | Draft the post from this outline, following the writing guidelines in CLAUDE.md. |
Claude automatically pulls the conventions from CLAUDE.md: conversational tone, plain explanations for technical terms, explicit language tags on every code block, and <!-- more --> right after the intro. I never have to repeat those instructions.
Publishing: One Command to Ship
1 | /blog-publish |
This Skill runs a clean three-step sequence:
- Show the diff summary via
git statusandgit diff --stat - Verify the local build with
yarn hexo clean && yarn hexo generate - After my confirmation, run
git add→git commit→git push
About a minute after the push, GitHub Actions finishes building and the post goes live.
From idea to live URL takes 15–30 minutes depending on length, with only two human checkpoints: approving the outline and confirming the publish.
Quality Assurance: A Safety Net of Hooks
The writing loop looks simple, yet a few failure modes can break production quickly. My Hooks catch most of them before they leave my machine. Here is the complete configuration from .claude/settings.json:
1 | { |
Hook 1: Blocking Dangerous Commands
Once, Claude tried to run rm -rf node_modules to clear a cache. Harmless in that specific case, but I don’t want an AI executing recursive deletes unchecked in my repo. block-dangerous.sh enforces a simple denylist:
1 | DANGEROUS_LIST=" |
When triggered, Claude sees the block message and automatically switches to a safer alternative. This single Hook has caught at least three rm -rf attempts and one git reset --hard.
Hook 2: Build Verification
Before every git commit, a Hook runs hexo generate. If the build fails, the commit is blocked.
Real incident that prompted this: a missing indentation space under tags in a post’s Front Matter looked fine in the editor, but pushing it broke the homepage with a 404. Adding this pre-commit build gate has prevented at least five live outages since.
Hook 3: Protected Files
protect-files.sh maintains a list of sensitive files—.env, settings.json, lockfiles, and similar configs—that Claude is not allowed to touch. It once stopped Claude from trying to “optimize” yarn.lock.
Hook 4: Screenshot Verification + Completion Alerts
After any post edit, a Puppeteer hook captures a rendered screenshot so I can inspect layout issues before committing. When a task wraps up, Stop hooks fire both a desktop notification and a Feishu alert—letting me run Claude in the background instead of babysitting the terminal.
Hooks Summary
| Hook | Trigger | Blocked Scope | Real-World Catches |
|---|---|---|---|
block-dangerous.sh |
PreToolUse (Bash) |
rm -rf, git push --force, etc. |
3+ times |
hexo generate |
PreToolUse (git commit) |
Commits that break the build | 5+ times |
protect-files.sh |
PreToolUse (Edit/Write) |
.env, settings.json, lockfiles, etc. |
2+ times |
screenshot-hook.sh |
PostToolUse (Edit/Write) |
None (verification only) | Every post edit |
notify.sh |
Stop (task complete) |
None (notification only) | Every task |
Batch Operations: Rewriting 27 Posts with Subagents
At peak workload, I had 27 official-docs deep-dive articles that needed a full rewrite. Doing them by hand would have taken at least two full days; a Subagent pipeline finished the batch in two hours.
Orchestration Flow
The /doc-rewrite Skill coordinates a three-stage agent pipeline:
1 | planner → executor → scorer |
- Planner: Reads the existing post, fetches the latest upstream official docs URL, and produces a rewrite plan.
- Executor: Rewrites the article from the plan—one Subagent per post, completely isolated.
- Scorer: Combines quantitative checks (code block count, word count, config examples, etc.) with qualitative LLM grading (technical depth, practical code value, authentic experience).
Any post scoring below 70 automatically enters another iteration, up to three rounds. A progress file tracks each article’s status and score.
Scoring Profile
The rubric lives in .claude/scoring/profiles/official-doc.yaml:
1 | quantitative: |
Quantitative checks make up 30% of the score and are evaluated by script; qualitative dimensions make up 70% and are graded by an LLM. If the weighted total falls under 70, the post is automatically queued for rewrite.
Actual Results
All 27 posts passed with an average score of 88.6:
| Metric | Result |
|---|---|
| Total posts | 27 |
| First-pass rate | 100% (27/27) |
| Average score | 88.6 |
| Highest score | 93 (cli-reference, common-workflows, claude-overview) |
| Lowest score | 78.3 (claude-quickstart) |
| Average time per post | ~4 minutes |
| Total wall time | ~2 hours (vs. 2+ days manually) |
How the Configuration Evolved
None of this was built upfront. Every piece was added in response to a concrete pain point:
| Stage | Trigger | Config Added | Problem Solved |
|---|---|---|---|
| Stage 1: Barebones | Started the blog | CLAUDE.md (10 lines) |
Claude didn’t know my writing style or repo layout |
| Stage 2: Automation | Got tired after 4 posts | 3 Skills | Manual file creation, template boilerplate, and commit/push loops |
| Stage 3: Guardrails | Pushed 2 broken builds | 3 Hook groups | Live 404s from build failures; Claude nearly ran rm -rf |
| Stage 4: Scale | Needed to rewrite 20+ docs | Subagent pipeline + scoring system | Manual rewrites were too slow and inconsistent in quality |
The rule of thumb: don’t over-engineer on day one. Start with a minimal CLAUDE.md and add automation only when a specific friction point hurts. The 10-line file from Stage 1 was already enough to write posts; everything after that earned its place through real pain.
Reusable Patterns You Can Adopt Today
Whether you use Hexo, Hugo, or Jekyll, the underlying patterns transfer directly.
Minimal Starting Point: CLAUDE.md
This is the only config file you actually need to start:
1 | # CLAUDE.md |
Skill Structure
Turn any recurring workflow into a Skill under .claude/commands/, where the filename becomes the slash command. The core layout has three sections:
1 | # Skill Name |
At its core, a Skill is just a structured prompt that tells Claude the exact procedure to follow whenever you invoke that command.
Minimal Hook Config
The highest-leverage Hook to add first is a pre-commit build check:
1 | { |
Swap your-build-command for your static site generator (hexo generate, hugo, or jekyll build), and you have a solid baseline safety net.




