blog-rewrite · git:20261007.6c3cb9a · 2026-10-07 · sha256 6413864ba947c59f
blog-rewrite git:20261007.6c3cb9aA
Immutable. This exact content never changes and is served at /api/v1/blob/6413864ba947c59f.
---
name: blog-rewrite
description: >
Rewrite and optimize existing blog posts for Google SEO (May 2026 Core
Update, E-E-A-T) and AI citation visibility as one SEO discipline. For
AI-citation-only audit (no Google work), use blog-geo instead. Replaces
fabricated statistics with sourced data, applies answer-first formatting,
adds images, generates SVG charts, and updates freshness signals. Works
with any blog format (MDX, markdown, HTML). Use when user says "rewrite
blog", "optimize blog", "update blog", "improve blog", "fix blog".
user-invocable: true
argument-hint: "<file-path>"
license: MIT
---
# Blog Rewriter: Optimize Existing Posts
Bundled paths below use host Markdown substitution of `${CLAUDE_SKILL_DIR}`;
it is not an exported shell variable. Resolve them before execution, quote
paths, and refuse nonabsolute overrides. Pass `blog_reference_root` resolved
from `${CLAUDE_SKILL_DIR}/../blog/references`, `blog_template_root` from
`${CLAUDE_SKILL_DIR}/../blog/templates`, and needed sibling roots to agents.
Read the main reference `orchestration-details.md` before loading project
context; pass only its helper-fenced output to downstream agents.
Rewrites and optimizes existing blog posts for dual ranking: Google search
and AI citation platforms. Preserves the author's voice while applying the
6 pillars of optimization.
**Key references:**
- `${CLAUDE_SKILL_DIR}/../blog/references/quality-scoring.md` - 5-category scoring (Content 30, SEO 25, E-E-A-T 15, Technical 15, AI Citation 15)
- `${CLAUDE_SKILL_DIR}/../blog/references/eeat-signals.md` - Experience, expertise, authority, trust markers
- `${CLAUDE_SKILL_DIR}/../blog/references/internal-linking.md` - Linking strategy and anchor text rules
- `${CLAUDE_SKILL_DIR}/../blog/references/visual-media.md` - Image sourcing and chart styling
- `${CLAUDE_SKILL_DIR}/../blog/references/synthesis-contract.md` - 6 LAWs for re-citation hygiene during rewrite (v1.8.0; cross-skill ref lives in the orchestrator's references dir)
- `${CLAUDE_SKILL_DIR}/../blog/references/research-quality.md` - cross-source clustering for replacement-statistic research (v1.8.0)
## Cross-reference
For 21 evidence-led optimization prompts (quality follow-up, CTR audit, schema,
PAA rewording, technical audit, ChatGPT visibility) directly applicable to
rewrite work, see `/blog flow optimize`.
## Workflow
### Phase 1: Audit (Read-Only)
1. **Read the blog post** - Detect format (MDX, markdown, HTML)
2. **Run the quality checklist** against `${CLAUDE_SKILL_DIR}/../blog/references/quality-scoring.md`:
- Count fabricated vs sourced statistics
- Check whether important sections state their point and support it where needed
- Check whether each image or chart materially helps the subject
- Review paragraph pacing in context; record length only as a descriptive aid
- Check heading hierarchy (H1 -> H2 -> H3, no skips?)
- Check schema presence and validity using the internal heuristic: Article or
BlogPosting, Person, and either Organization or BreadcrumbList; FAQPage is
optional entity markup only, and this heuristic is not a Google requirement
- Check freshness signals (lastUpdated, dateModified)
- Assess self-promotion level
- Evaluate citation tier quality
3. **Advisory editorial style scan**:
- **Sentence-length variation** - Report it descriptively when rhythm needs
review. It cannot determine authorship and has no pass/fail threshold.
- **Project voice scan** - Use BRAND.md, VOICE.md, and the actual subject to
identify vague, repetitive, inaccurate, or off-voice wording. Treat any
configured style list as review cues, not a phrase ban.
- **Vocabulary sample** - Report Type-Token Ratio (TTR) descriptively and
interpret it against text length and specialist terminology.
- Never estimate AI authorship from TTR, sentence-length variation, punctuation,
or phrase density. These are advisory project-style observations only.
- **Structural repetition scan** - Use
`${CLAUDE_SKILL_DIR}/../blog/references/ai-slop-detection.md` as an advisory diagnostic.
Flag repeated patterns only when they make this subject harder to follow or
conflict with the publication voice. No count or density threshold changes
the score or blocks delivery by itself.
4. **Video embed check**:
- Count existing YouTube embeds in the post
- If 0 embeds, flag: "No video embeds. Consider adding relevant high-quality YouTube embeds when they add useful context."
- If present, check: lazy loading? aria-labels? noscript fallback? VideoObject schema?
5. **Cannibalization check**:
- Identify the post's primary keyword from title, H1, and first paragraph
- Search the blog directory for other posts targeting the same keyword:
- Grep headings and meta descriptions across all blog posts
- Flag any posts with significant keyword overlap
- If cannibalization found, report:
- Which posts compete for the same keyword
- Recommend: **merge** (combine into one stronger post) or **differentiate**
(shift one post to a related but distinct keyword)
6. **Calculate current score** across 5 categories:
- Score across 5 categories (Content Quality 30, SEO Optimization 25, E-E-A-T Signals 15, Technical Elements 15, AI Citation Readiness 15)
- Total: 0-100
7. **Present audit summary** with specific findings, advisory style diagnostics, video status, cannibalization status, and score
8. **Enter plan mode** - Present section-by-section optimization plan
Wait for user approval before proceeding.
### Phase 2: Research
1. **Identify the blog's core topic** from existing content
2. **Find replacement statistics** for any fabricated/unsourced data:
- Search: `[topic] study 2025 2026 data statistics`
- Target tier 1-3 sources only
3. **Find images** only where the current post needs a clearer demonstration, diagram, or visual proof:
- Prefer original screenshots, product visuals, diagrams, or data graphics when available
- For stock, use official provider APIs such as Openverse, Unsplash, Pexels, or Pixabay so license, creator, source URL, and download URL are captured
- Download approved assets locally, store attribution, and reject `javascript:`, `data:`, and `file:` URLs
- If `blog-image` is available, offer AI generation for missing or insufficient images and record the selected model ID
4. **Plan charts** only where comparison, distribution, or trend data is materially clearer visually:
- Identify data suitable for visualization
- Select diverse chart types
### Phase 3: Chart Generation (Built-In)
When the post needs more visual elements, invoke the `blog-chart` sub-skill:
1. Select chart type using the diversity rule (no repeated types per post)
2. Pass: chart type, title, data values, source, platform format
3. Embed the returned SVG directly within a `<figure>` wrapper
4. Use as many charts as the evidence requires, including none
See `${CLAUDE_SKILL_DIR}/../blog/references/visual-media.md` for chart type selection and styling rules.
### Phase 4: Content Rewrite
Apply changes in this order:
#### 4a. Preserve What Works
- Keep the author's voice and unique perspective
- Preserve original insights and first-hand experience
- Keep existing quality images and charts
- Maintain internal links
#### 4b. Fix Frontmatter
- Update `lastUpdated` only when the rewrite materially changes facts, methods, or recommendations
- Keep original `date` unchanged
- Fix the meta description so it accurately and specifically summarizes the
visible content
- Add `coverImage` + `coverImageAlt` + `ogImage` if missing
- Search Pixabay/Unsplash/Pexels for wide hero image (1200x630)
- Or generate custom SVG cover via `blog-chart` (text-on-gradient with key stat)
- Or generate custom AI image via `blog-image` sub-skill when available; record the model ID
- Verify tags/categories are appropriate
#### 4c. Apply Purpose-First Formatting
State the point of important sections early, then add the verified evidence and
context each claim needs. Do not force statistics or word bands.
#### 4d. Replace Fabricated Statistics
- Search for patterns: "X% of...", "X out of Y...", unsourced claims
- Replace with real data from tier 1-3 sources
- Give each material claim enough provenance to verify and interpret it. Include
publisher or document details, relevant dates, methodology, limitations, and a
stable URL when the claim requires them; do not force a fixed citation form.
#### 4e. Improve Headings
- Use question or declarative headings according to reader intent; no ratio target
- Use the primary topic terminology only where it accurately labels the section
#### 4f. Fix Paragraph Length
- Split paragraphs only when doing so improves comprehension
- Use paragraph length as an optional planning observation, not a fixed target
- Ensure each paragraph starts with its most important sentence
#### 4g. Add Visual Elements
- Embed each new image near the passage it explains or verifies
- Embed charts within relevant sections
- If `blog-image` is available: generate custom images for sections lacking good stock matches, prefer the current image model registry, and record the model ID
- Adapt embed format to detected platform (MDX vs markdown vs HTML)
#### 4h. Add Video Embeds
If a demonstration or expert source would materially improve the post:
- Search for relevant videos using quality criteria from `${CLAUDE_SKILL_DIR}/../blog/references/video-embeds.md`
- Embed using platform-appropriate format (srcdoc lazy loading)
- Place each selected video beside the section it supports
- Include noscript fallback for AI crawlers
#### 4i. Add/Improve FAQ
- If the query set warrants it and no FAQ exists, add one (3-5 questions)
- If FAQ exists, ensure answers are complete and contain verified support where needed
- FAQPage is optional entity markup only. Google FAQ rich results were fully retired for all sites on 2026-05-07, so do not make FAQPage a core Google rich-result gate.
#### 4j. Reduce Self-Promotion
- Max 1 brand mention (author bio context only)
- Remove "At [Company], we..." patterns
- Convert promotional sections to educational content
#### 4k. Evidence-Backed Explanation
For important claims, generate or improve a self-contained explanation with
enough context and verified support to stand on its own. Do not pad every H2.
- Placed naturally within the section body, not as a separate callout
Example:
```markdown
[Verified source title], a [method or sample description] published on [date],
found [specific metric] for [audience or market] ([Source name](https://example.com/full-report),
retrieved YYYY-MM-DD). In practical terms, connect the evidence to one action
the reader should take before making a claim or changing a workflow.
```
Do not pad explanations to a fixed length or add them solely to earn readiness
points.
#### 4l. Project Voice and Repetition Review
Apply these transformations only where they improve the configured voice and
serve the subject:
- **Eliminate em dashes** - Replace every U+2014 character with a comma, hyphen,
colon, or period. Split sentences if needed. This is a project style rule.
- **Review wording in context** - Preserve precise domain language. Replace a
phrase only when it is vague, repetitive, inaccurate, or wrong for the chosen
voice. Do not perform blanket substitutions from a generic list.
- **Vary sentence structure where useful** - Revise rhythm only when the existing
sequence hurts clarity, emphasis, or flow. Do not target sentence-length bands.
- **Use rhetorical questions sparingly** - Add one only when it clarifies the
reader's next decision.
- **Use contractions naturally** - Replace formal constructions with contractions
where they sound natural: "it is" -> "it's", "we have" -> "we've",
"do not" -> "don't", "is not" -> "isn't".
- **Support first-hand language** - Keep "we tested" or "in our experience" only
when methodology, observations, or evidence can substantiate the claim.
#### 4m. Summary Box (Key Takeaways)
If the post lacks a summary box, add one immediately after the introduction:
```markdown
> **Key Takeaways**
> - [Core finding with statistic and source]
> - [Second key insight or recommendation]
> - [Third actionable takeaway]
> (Use concise bullets sized to the material. Keep the summary self-contained so the reader gets
> the core value without reading the full article.)
```
Default label is "Key Takeaways", but this is configurable per persona or
brand voice (e.g., "The Bottom Line", "Quick Summary", "What You Need to Know").
If an existing TL;DR box is useful, convert it to concise Key Takeaways and
verify every factual statement is supported. Do not add a statistic merely to
fit the format.
#### 4n. Information Gain Marker Injection
Review the post for original value and tag it:
- `[ORIGINAL DATA]` - Any proprietary data, survey results, experiments, or
case study metrics the author collected first-hand
- `[PERSONAL EXPERIENCE]` - First-hand observations, lessons learned
- `[UNIQUE INSIGHT]` - Novel analysis, contrarian perspectives backed by data
If the post lacks supported original value:
- Ask the author for first-hand data or experience to include
- At minimum, add analytical insights that connect existing research in new ways
- Do not add a marker unless the underlying original material exists
Use HTML comments (`<!-- [ORIGINAL DATA] -->`) or visible callouts depending
on the post's style.
### Phase 5: Verification
After rewriting, verify all quality gates pass:
#### Core Quality Gates
1. Important claims state their point clearly and include verified support where needed
2. Paragraph and sentence pacing suits the audience; length alone cannot fail review
3. Zero fabricated statistics
4. Heading hierarchy is clean
5. Article-priority schema present and valid; FAQPage only if useful as optional entity markup
6. Images have descriptive alt text
7. Cover image present in frontmatter (coverImage + ogImage)
8. If MDX: build the project to verify no compilation errors
#### New Element Verification
9. Optional summary is useful and contains no unsupported claims
10. Any information-gain markers identify supported original material
11. Important reusable claims are self-contained and evidence-backed
12. Internal linking zones marked or actual links present (5-10 per 2,000 words)
13. Configured project style-list terms reviewed in context
#### Editorial Style Check
14. Sentence-length variation reviewed descriptively, with no authorship verdict
15. Contractions used naturally throughout
16. Rhetorical questions used only where useful
17. No unsupported first-hand claims
18. Final score is no lower than the Phase 1 audit score
19. Any YouTube video present materially helps and uses lazy loading, an aria-label, and a noscript fallback
### Phase 6: Summary
```
## Blog Optimization Complete: [Title]
### Score Change
- Before: [X]/100 ([Rating])
- Content Quality: [X]/30
- SEO Optimization: [X]/25
- E-E-A-T Signals: [X]/15
- Technical Elements: [X]/15
- AI Citation Readiness: [X]/15
- After: [Y]/100 ([Rating])
- Content Quality: [Y]/30
- SEO Optimization: [Y]/25
- E-E-A-T Signals: [Y]/15
- Technical Elements: [Y]/15
- AI Citation Readiness: [Y]/15
### Editorial Style Diagnostics
- Configured style-list terms reviewed: [N]
- Sentence-length variation: [descriptive observation]
- These observations do not infer authorship and do not affect the score.
### Cannibalization
- [Status: none found / flagged N posts / resolved]
### Changes Made
- [X] statistics replaced with sourced data
- [X] SVG charts added (types: ...)
- [X] images added from Pixabay/Unsplash
- Answer-first formatting applied to [N] H2 sections
- FAQ section updated with [N] questions; FAQPage emitted only as optional entity markup if appropriate
- TL;DR box: [added/updated]
- Information gain markers: [N] ([types])
- Evidence-backed explanations improved: [N]
- Configured project style-list terms reviewed: [N]
- lastUpdated set to [date]
- Self-promotion reduced to [N] mentions
### Visual Elements
- Charts: [count] ([types])
- Images: [count]
- YouTube videos: [count] ([titles])
### Ready for
- `/blog analyze <file>` to verify final score
- Publishing / deploying
```
## Phase 5.5: Delivery Contract Enforcement (v1.9.0)
Before presenting the rewritten draft, run the 5-gate delivery contract per `${CLAUDE_SKILL_DIR}/../blog/references/blog-delivery-contract.md`. The contract applies to rewrites the same way it applies to new posts: the user is never the first reviewer.
Steps:
Resolve `BLOG_SCRIPT_DIR="${CLAUDE_BLOG_SCRIPTS_DIR:-${CLAUDE_SKILL_DIR}/../../scripts}"`
and reject it unless it is absolute. Never use the current project's `scripts/`
directory for these helpers.
1. **Hero check**: if the existing post already has a hero image referenced and still on disk, keep it. If the rewrite changed the topic substantially OR the hero is missing, regenerate via `python3 "$BLOG_SCRIPT_DIR/generate_hero.py" --topic "<new title>" --tags "<tags>" --out <folder>`.
2. **Re-render**: run `python3 "$BLOG_SCRIPT_DIR/blog_render.py" --md <slug>.md --out-dir <folder>` to refresh the `.html` and `.pdf` from the updated `.md`.
3. **Reviewer dispatch**: dispatch the `blog-reviewer` agent against the rendered `.html`. Threshold: score 90/100 or higher AND zero P0 issues.
4. **Preflight**: run `python3 "$BLOG_SCRIPT_DIR/blog_preflight.py" --draft <folder> --strict`. Exit 0 = ship; exit 1 = block.
5. **Iterate on failure**: maximum 3 iterations. After the 3rd failure, STOP and present the diagnostic from `<folder>/preflight-report.json`.
Rewrites keep the additional compatibility rule documented for this command:
the new score must be no lower than the original score. Pass both scores to the
reviewer and set `BLOCKING: true` when the score regresses. A score regression
is a rewrite-specific blocking decision, not a P0 severity label.
## Update Mode
When invoked as `/blog update <file>`, focus on freshness:
1. Update statistics to latest available data (2025-2026)
2. Add new developments since last update
3. Refresh images if older than 1 year
4. Update `lastUpdated` in frontmatter
5. Preserve the existing structure - minimize rewrites
6. Target: genuine freshness only. Replace stale statistics, add real new developments, and update `lastUpdated`/`dateModified`; do not rewrite to hit a percentage-change threshold.