AI-Driven SEO Blog Writer
Long-running task mode. This skill generates a multi-phase artifact. Before Phase 0: create a task-logs/{slug}/ workspace, write each phase output to disk incrementally, and use offset reads to verify writes. This ensures crash-safe, resumable execution without regenerating completed work.
Design Principles
Minimum viable input - topic + domain is all you need to start
Verify before assert - no statistic, quote, or claim goes in unverified
One checkpoint - you confirm the plan before a single word is written
Zero dependency - no local project files, no paid tools required
Honest degradation - when automation fails, the skill says so clearly and gives you the next step
Execution Model (IMPORTANT)
This is a heavy, multi-phase skill. Incremental disk writes and offset-read verification are mandatory — see the long-running task note above.
When spawning as a subagent, file writes and link verification (Phases 1–5) require exec permissions:
CODEBLOCK0
If running in the main session directly, exec permissions are already present — proceed normally.
Why security: "full"? This skill writes article drafts, QA reports, and schema files to disk incrementally (crash-safe execution). Link verification uses curl/web_fetch to check URLs. Both operations require exec access. If you prefer not to grant this, run the skill in your main session rather than as a subagent — behavior is identical.
Failure Recovery Guardrails (Mandatory)
For this skill, "done in one shot" is not trusted. Use bounded, resumable execution:
- 1. Section-by-section writes
- - Write article sections incrementally (intro, each H2 block, FAQ, conclusion).
- After each section write, append checkpoint to
task-logs/{slug}/report.md (or your preferred output dir).
- 2. Write-then-read verification
- - After every
write/edit, run a targeted read/grep to confirm the change exists. - Do not queue multiple blind edits without read-back.
- 3. Timeout-safe continuation
- - If model timeout / prompt-error / length stop occurs:
- persist current section to disk immediately
- continue from next missing section
- do not regenerate completed sections unless explicitly requested.
- 4. QA loop cap
- - Max 3 QA rounds.
- Each round fixes only concrete FAIL items from latest report.
- If a FAIL item is stale (already fixed), verify by grep/read and mark as stale report issue.
- 5. SERP analyzer degradation
- - If QA says "SERP analyzer unavailable", treat as warning.
- Continue with link/citation/structure fixes; do not block publication solely on SERP fetch failure.
Quick Start
CODEBLOCK1
Examples:
- - "Write a comparison article about email apps for mysite.com"
- "I need a how-to guide about email automation for https://example.com"
- "Create an alternatives page for Gmail for our domain filomail.com"
Execution Modes
| Mode | Time | Focus | Use when |
|---|
| Express | 5-10min | Speed + core quality | Quick turnaround, existing traffic |
| Standard |
15-20min | Balanced depth + optimization | Most articles, balanced goals |
|
Expert | 25-35min | Maximum quality + competitiveness | High-stakes keywords, competitive niches |
Mode Differences
Express mode shortcuts:
- - Basic site crawl: homepage + pricing only
- Simplified competition: top 3 competitors, structure analysis only
- Streamlined QA: core checklist, skip advanced verification
- Target score: 65+ (publishable quality)
Standard mode (default):
- - Comprehensive crawl: full discovery + blog analysis
- Detailed competition: top 5 competitors + content gaps + authority sources
- Complete QA: full scoring + verification + optimization suggestions
- Target score: 75+ (solid quality)
Expert mode enhancements:
- - Deep intelligence: multi-source crawling + social/review analysis where available
- Advanced competition: semantic analysis + opportunity mapping + trend identification
- Premium QA: custom scoring + predictive optimization + enhancement recommendations
- Target score: 85+ (exceptional quality)
Phase 0: Context Discovery (Automated)
⚡ Skip Check
If product_context file was provided:
- 1. Read the file
- Extract: productname, valueproposition, pricingmodel, brandvoice from it
- Set voice_confidence = MEDIUM (user-provided, assumed accurate)
- Skip 0.1 and 0.6 entirely
- Proceed directly to 0.2 (blog ecosystem mapping) and 0.3 (keyword research)
Only proceed with 0.1 crawling if no product_context was provided.
0.1 Product Intelligence
Crawl the following in parallel. Accept partial results - missing data triggers
targeted questionnaire questions, not full failure.
Crawl targets:
CODEBLOCK2
Extract:
- -
product_name - inferred from title tags, logo alt text, H1s - INLINECODE10 - first meaningful paragraph on homepage
- INLINECODE11 - bullet lists, feature sections, navigation items
- INLINECODE12 - "free" | "freemium" | "$X/month" | "enterprise"
- INLINECODE13 - collect 10+ sample sentences across pages
JS-heavy site handling: If web_fetch returns < 500 characters of meaningful
text, note the crawl as failed for that page. Do not treat empty HTML as product
context. Trigger questionnaire if ≥ 2 Priority 1 pages fail.
⚠️ Discovery failure threshold: If ≥ 2 Priority 1 pages fail, jump to Phase 0.6 immediately. Collect answers from the user, then return here and continue with 0.2–0.4 using the provided context. Do not wait until after the confirmation gate to surface this.
Brand voice detection:
- - Prefer blog post samples over homepage (more authentic voice)
- Homepage → marketing voice, not writing voice
- Derive: formality (1-5), energy (1-5), technical depth (1-5)
- If < 3 sample sources available, mark voice_confidence as LOW
0.2 Blog Ecosystem Mapping
Discovery order (try all before concluding):
- 1.
/sitemap.xml or /sitemap_index.xml → extract all blog/article URLs - Try common blog paths:
/blog, /articles, /resources, /learn, /insights, INLINECODE21 - INLINECODE22 → find sitemap reference
- Fetch homepage → scan navigation links for blog/articles/resources sections
- Web search: INLINECODE23
If steps 1-5 all return < 3 posts: classify as "new" and note it.
Do not assume blog doesn't exist - it may use a non-standard path.
Output: existing_posts[] - {title, url, approximatetopic, publishdate}
Site maturity classification:
- - "new" - < 5 posts (skip complex hub-spoke strategy, use minimal linking)
- "growing" - 5-20 posts (basic cluster awareness, strategic linking)
- "mature" - > 20 posts (full hub-spoke strategy, topical clusters)
0.3 Keyword Intelligence (Honest Estimation)
⚠️ Without paid tools, keyword research is estimation, not measurement.
This skill uses SERP signals as proxies. Confidence is moderate.
The confirmation gate lets you override the selected keyword before writing begins.
Process:
Step 1 - Derive candidates from topic
CODEBLOCK3
Step 2 - SERP structure analysis (for each candidate)
CODEBLOCK4
Step 3 - Select primary keyword
CODEBLOCK5
Step 4 - Derive secondary keywords
CODEBLOCK6
Mode differences:
- - Express: Top 1 keyword only, basic SERP check
- Standard: 3 candidates analyzed, secondary keywords included
- Expert: 5 candidates + semantic clustering + opportunity identification
0.4 Competitive Intelligence
Extract top 5-8 URLs from SERP for primary keyword.
Relevance filtering (in order):
- 1. Remove: reddit.com, quora.com, news aggregators, social media posts
- Prioritize: domains with
/product or /pricing → likely direct competitors - Check: is content type comparable (article vs article, not forum thread vs article)
- Keep: best 3-5 relevant results for analysis
Fallback - if fewer than 2 relevant competitor URLs remain after filtering:
- - Relax filter: include top-performing forum threads (Reddit/Quora) as intent signals only
- Extract: what questions users are asking, what solutions they mention
- Do NOT use forum posts as content depth benchmarks (word count, structure)
- Note in confirmation gate: "Limited competitor articles found - structure based on search intent signals rather than competitive benchmarking"
- Default to FAQ-heavy structure since forums indicate question-dominant intent
For each competitor URL:
CODEBLOCK7
Blocked/failed competitor: If webfetch returns 403/blocked, use websearch
snippet as proxy for structure. Note it as "estimated" in the research brief.
Mode differences:
- - Express: Top 3 URLs only, basic structure extraction
- Standard: Top 5 URLs + gap analysis + authority source identification
- Expert: Top 8 URLs + semantic analysis + opportunity mapping + trend identification
⛳ Phase 0.5: Discovery Confirmation Gate (MANDATORY)
This is the only human checkpoint. Nothing is written until you confirm.
Present a structured summary:
CODEBLOCK8
⚠️ Gate enforcement:
- - Wait for user response. Do NOT self-approve and proceed.
- If no response: reply "Waiting for your confirmation. Reply CONFIRM to proceed."
- If running in automated/subagent context: save summary to
{output_dir}/discovery-summary.md, then STOP and return control to caller. Never self-approve. - If user replies CONFIRM: proceed to Phase 1.
- If user replies EDIT [aspect]: re-derive only that element, re-present summary.
Year-in-title decision rule (applied automatically):
| Article type | Year in title | Logic |
|---|
| Comparison / Best-of | YES if ≥ 2 top SERP results include year | Intent is time-sensitive, year increases CTR |
| Alternatives page |
YES if product category updates frequently | SaaS/tech = yes, traditional tools = no |
| How-to / Guide | NO | Intent is evergreen, year limits lifespan |
| Thought piece | NO | Ideas aren't time-dependent |
| Industry trends | YES | Explicitly time-sensitive content |
If user provides corrections:
- - Re-derive only affected elements
- Do not restart full Phase 0
- Update summary and re-confirm
Phase 0.6: Fallback Questionnaire (Only if Discovery Incomplete)
Triggered when: ≥ 2 Priority 1 crawls failed AND no product_context file provided.
Output a questionnaire designed to be answerable by a human OR their AI assistant
reading company documentation:
CODEBLOCK9
💾 Save the above as product-context.md, then restart with:
CODEBLOCK10
Phase 1: Research Brief Generation
1.1 Article Blueprint Assembly
Based on confirmed Phase 0 data, create structured plan:
H1 optimization:
CODEBLOCK11
H2 Structure mapping:
CODEBLOCK12
Content depth planning:
CODEBLOCK13
1.2 Linking Strategy Development
Internal links planning:
CODEBLOCK14
External links planning:
CODEBLOCK15
1.3 Research Brief Output
Save as: INLINECODE30
CODEBLOCK16
✅ Brief Save Checkpoint
Confirm research-brief.md was saved to {output_dir}/. If save failed
(permissions, path issue): output brief contents directly in chat and continue.
This is not a user gate — no user action required.
Phase 2: Content Generation
⚡ WRITE THE ARTICLE NOW
Using the confirmed blueprint from Phase 1, write the article section by section:
- 1. Write H1 (from blueprint)
- Write intro paragraph (≤ 100 words, keyword in first sentence, use intent-matched template from 2.1)
- Write each H2 section in order from blueprint, applying rules from 2.2-2.5 as you write. After each H2, immediately run the 4-point AI-tell check from §3.1 inline — fix any flagged sentences before moving to the next H2. Do not batch these checks.
- Write FAQ section (4-6 questions, natural language, schema-ready)
- Write conclusion with CTA referencing the domain's product/service
- Apply internal + external linking inline as you write (2.5 rules) - do NOT do a separate linking pass
- Save complete draft to: INLINECODE33
Then proceed to Phase 3.2 and 3.3 (brand voice + authenticity check) on the saved draft. Phase 3.1 AI-tell checks were already run inline during step 3 above.
2.1 Opening Section (Critical First 100 Words)
Requirements:
- - Primary keyword appears naturally within first 100 words
- Direct answer or clear value proposition (no throat-clearing)
- Sets expectation for what reader will learn
- Matches search intent immediately
Templates by intent:
Comparison intent:
CODEBLOCK17
How-to intent:
CODEBLOCK18
Alternative intent:
CODEBLOCK19
2.2 Body Content Standards
Paragraph structure:
- - Maximum 3-4 sentences per paragraph
- One main idea per paragraph
- Vary sentence length: short (5-10 words) + medium (15-20 words) + occasional long (25-30 words)
- No sentence exceeds 35 words
Readability targets:
- - Flesch Reading Ease: 60-70 (conversational but professional)
- Average sentence length: 15-20 words
- Passive voice: < 15% of sentences
- Grade level: 8-10 (accessible but not dumbed down)
Required content blocks:
CODEBLOCK20
2.3 Statistics and Authority Signals (Verification-First Approach)
⚠️ Core rule: Verify before include. Never assert unverified claims.
For each statistic needed:
CODEBLOCK21
For expert quotes:
CODEBLOCK22
Authority signal integration (GEO optimization):
CODEBLOCK23
2.4 Platform-Specific GEO Optimization
Different AI platforms prioritize different signals. Optimize for all:
Google AI Overviews (most exposure):
CODEBLOCK24
Perplexity (high-intent queries):
CODEBLOCK25
ChatGPT (broad knowledge queries):
CODEBLOCK26
Claude (analytical queries):
CODEBLOCK27
Implementation in content:
CODEBLOCK28
2.5 Linking Execution
External links - entity-driven, not quota-driven:
CODEBLOCK29
Internal links - relevance-driven:
From Phase 1 internal_links_plan:
Body content linking:
├─ Link only if the target article's topic is genuinely discussed in this section
├─ Use contextual anchor text that describes what they'll find
├─ Never force a link to fill a quota
└─ Maximum 1 internal link per 300 words to avoid link bloat
Further Reading section:
├─ Include hub page link (if exists)
├─ Add 2-3 most topically related sibling articles
├─ Sort by relevance, not recency
└─ Brief description of what each linked article covers
Hub-spoke strategy (for mature sites):
├─ Always link back to cluster hub from spoke articles
├─ Hub links to all spokes in cluster
├─ Spokes link to 2-4 most related siblings
└─ Avoid every-spoke-to-every-spoke linking (dilutes PageRank)
Phase 3: AI Pattern Prevention & Brand Voice Alignment
3.1 AI Writing Pattern Detection & Correction
Detection approach: Generate content in sections, then scan each section for AI patterns.
Do not attempt real-time prevention - LLMs cannot self-monitor during generation effectively.
Banned words (immediate rewrite triggers):
CODEBLOCK31
Banned phrases (immediate rewrite triggers):
CODEBLOCK32
Structural pattern detection:
CODEBLOCK33
AI-tell detection checklist (run after writing each H2 section):
CODEBLOCK34
3.2 Brand Voice Calibration
Voice matching system:
CODEBLOCK35
If Phase 0 voice_confidence was LOW: Apply conservative defaults:
CODEBLOCK36
Brand voice consistency check:
CODEBLOCK37
3.3 Content Authenticity Verification
Human-like writing patterns:
CODEBLOCK38
Read-aloud test:
For key sections (intro, conclusions, CTA):
- Does it sound natural when read aloud?
- Would you say this in a professional conversation?
- Does it sound like press release copy or human communication?
If it sounds like a press release → rewrite in conversational professional tone
Phase 4: Quality Assurance System
4.1 Automated Link Verification
Process for every external link using web_fetch:
⚠️ web_fetch is a content extractor, not an HTTP client. It cannot return status
codes. Use content-based verification instead.
CODEBLOCK40
Failed link resolution:
CODEBLOCK41
4.2 Multi-Dimensional Quality Scoring
Base scoring framework (100 points total):
SEO Fundamentals (40 points):
CODEBLOCK42
Content Quality (30 points):
CODEBLOCK43
Linking Excellence (20 points):
CODEBLOCK44
Brand & Authority (10 points):
CODEBLOCK45
Industry weight adjustments (predefined balanced tables — total always = 100):
CODEBLOCK46
Pass thresholds by mode:
CODEBLOCK47
4.3 Factual Accuracy Verification
For product information:
CODEBLOCK48
For statistics and studies:
CODEBLOCK49
4.4 Final Quality Report
Generate comprehensive QA documentation:
CODEBLOCK50
If verdict is FAIL: Fix ONLY the listed critical issues (targeted edits to article-draft.md), verify each fix with a read/grep, then re-run Phase 4. Maximum 3 rounds per Failure Recovery Guardrails §4. If still failing after 3 rounds, proceed to Phase 5 and flag unresolved issues in the delivery package.
Phase 5: Delivery Package & Post-Processing
5.1 Article Finalization
Content formatting:
CODEBLOCK51
Save instructions: Write the finalized article (with frontmatter) to {output_dir}/article.md. Write the schema markup below to {output_dir}/schema-markup.json.
Schema markup generation:
CODEBLOCK52
5.2 Complete Deliverables Package
File structure (mode-gated — express ships fewer files):
CODEBLOCK53
Express mode delivers 3 files. Standard delivers 5. Expert delivers all 7.
Do not generate files outside the current mode — it wastes tokens.
research-brief.md (from Phase 1, enhanced with results):
CODEBLOCK54
internal-links-strategy.md (expert only — export of Phase 1.2 analysis, enhanced post-writing):
CODEBLOCK55
promotion-checklist.md:
CODEBLOCK56
optimization-opportunities.md:
CODEBLOCK57
5.3 Success Metrics & Monitoring Setup
Tracking recommendations:
Set up monitoring for:
SEO Metrics:
├─ Primary keyword ranking (weekly checks)
├─ Secondary keyword rankings
├─ Organic traffic growth
├─ Click-through rates from SERP
└─ Featured snippet captures
Engagement Metrics:
├─ Time on page
├─ Bounce rate
├─ Scroll depth
├─ Internal link click rates
└─ Social shares and comments
Business Metrics:
├─ Conversion rate (if applicable)
├─ Lead generation (email signups, demos)
├─ Brand search volume increase
└─ Backlink acquisition over time
AI Citation Tracking:
├─ Monitor ChatGPT, Claude, Perplexity for citations
├─ Google AI Overview appearances
├─ Track which sections get cited most
└─ Adjust content based on AI platform preferences
Error Handling & Resilience
Graceful Degradation Hierarchy
Phase 0 crawling failures:
CODEBLOCK59
Content generation failures:
CODEBLOCK60
Quality assurance failures:
CODEBLOCK61
Mode-Specific Fallbacks
Express mode degradation:
CODEBLOCK62
Expert mode enhancements:
Additional capabilities when time permits:
├─ Multi-platform SERP analysis (Google, Bing, DuckDuckGo)
├─ Social media content analysis (Twitter/LinkedIn posts about topic)
├─ Review site analysis (G2, Capterra for SaaS topics)
├─ Trend analysis (Google Trends, related topic momentum)
└─ Advanced schema markup (HowTo, Product, Review schemas)
Examples & Use Cases
Example 1: SaaS Comparison Article
Input:
CODEBLOCK64
Phase 0 Output:
CODEBLOCK65
Article Structure:
CODEBLOCK66
Example 2: How-To Guide
Input:
CODEBLOCK67
Phase 0 Output:
CODEBLOCK68
Article Structure:
CODEBLOCK69
Example 3: Alternatives Page
Input:
CODEBLOCK70
Phase 0 Output:
CODEBLOCK71
Article Structure:
H1: Gmail Alternatives for Privacy-Conscious Users
├─ Why Privacy Matters for Email (Brief context)
├─ Privacy Comparison Table (6 providers)
├─ ProtonMail: Best for End-to-End Encryption
├─ Tutanota: Best for German Privacy Standards
├─ StartMail: Best for Easy Gmail Migration
├─ How to Switch Email Providers Securely
└─ FAQ (4 questions)
Word count: 1,847 | Links: 18 external, 3 internal | Score: 67/100 (Express pass)
Related Skills
- - seo-geo: For broader SEO strategy and AI search optimization
- content-qa: For additional quality assurance workflows
- competitor-alternatives: For specialized comparison page structures
- programmatic-seo: For scaling this approach across multiple pages
- copy-editing: For detailed editing and refinement passes
Skill Metadata
Version: 3.1.0
Dependencies: websearch, webfetch, file operations
Optional: browser automation (for JS-heavy sites)
Output format: Markdown + JSON + Schema
Estimated time: 5-35 minutes based on mode
Target audience: Anyone with a website who needs SEO content
Distribution: ClawHub compatible, zero hardcoded dependencies
Last updated: April 2026
Testing status: Validated against SaaS, e-commerce, service, and content sites
Success rate: 89% first-run publishable quality (internal testing)