SERP Analysis: [Topic]
【免费下载链接】seomachineA specialized Claude Code workspace for creating long-form, SEO-optimized blog content for any business. This system helps you research, write, analyze, and optimize content that ranks well and serves your target audience.项目地址: https://gitcode.com/GitHub_Trending/se/seomachine
Date: [YYYY-MM-DD]Keyword: [target keyword]Search Intent: [informational/commercial/transactional]
Top Ranking Articles
1. [Article Title] - [Domain]
- URL: [url]
- Word Count: ~[count]
- Structure: [H2 headings list]
- Strengths: [what they do well]
- Gaps: [what they miss]
- Outdated: [old info found]
[Repeat for top 5]
Google-Validated Structure
Based on what's ranking, these sections appear essential:
- [Common H2 found across multiple articles]
- [Another common section] ...
Competitor Gap Blueprint
MUST-FILL GAPS (found in 3+ competitors)
- [Gap 1]: [How to address]
- [Gap 2]: [How to address]
DIFFERENTIATION OPPORTUNITIES
- [Unique angle 1]
- [Unique angle 2]
DATA NEEDED
- [Specific statistic to find]
- [Expert quote needed]
OUTDATED INFO TO UPDATE
- [Old stat] → Need 2025 version
### 2.3 源码佐证:自动化的 SERP 分析脚本 人工 WebSearch/WebFetch 之外,仓库还提供了可脚本化的 SERP 分析入口。命令文档 [.claude/commands/research-serp.md](https://link.gitcode.com/i/a75fd8f1edf4b81db10c3a8562b3adfa) 记录了其用法: ```bash python3 research_serp_analysis.py "your target keyword"从该命令文档看,这条命令会通过 DataForSEO 拉取 Top 20 自然结果,分析 Top 10 的内容模式与类型,抓取各结果字数,识别 SERP 特性(featured snippet、PAA、视频等),评估搜索意图与竞争难度,最终生成内容简报并输出到research/serp-analysis-[keyword].md。命令文档还标注了该脚本的成本量级(约每关键词 1–2 分钟、API 花费约 $0.02),可作为预算参考,但具体数据以实际运行环境为准。
三、STEP 2:社交研究(强制)——最好的洞察藏在 Reddit 帖子和 YouTube 教程里
命令文档的原话点明了这一步的价值:"The best insights aren't in SEO content - they're in Reddit threads and YouTube tutorials."(最好的洞察不在 SEO 内容里,而在 Reddit 帖子和 YouTube 教程中。)这对应仓库中的 data_sources/modules/social_research_aggregator.py 模块方向。
3.1 Reddit 研究(访问 5 个真实帖子)
搜索 Reddit:
WebSearch: site:reddit.com [topic] industry WebSearch: site:reddit.com r/industrying [topic]访问 5 个有潜力的帖子:对每个帖子 URL 用 WebFetch,提取:
要素 要找什么 OP's Question 具体的问题 Top Comments 高赞解决方案与建议 Pain Points 用户表达的挫败点 Success Stories 带细节的真实结果 Debates 不同观点 Recommendations 社区背书的东西 Real Language 真实用户如何谈论这个话题 提取可引用洞察:摘出可以写入(或直接引用进)文章的具体引语。
3.2 YouTube 研究(分析 5 个视频)
搜索 YouTube:
WebSearch: site:youtube.com [topic] industry tutorial WebSearch: site:youtube.com [topic] industry review分析 5 个视频页面:对每个视频页用 WebFetch,提取:
要素 要找什么 Title & Description 覆盖了什么 View Count 互动信号 Topics Covered 讨论的主要观点 Gaps 没讲好的部分 Comments 观众在问什么
3.3 输出模板:social-research 报告
结果保存到research/social-research-[topic-slug]-[YYYY-MM-DD].md:
# Social Research: [Topic] **Date**: [YYYY-MM-DD] ## Reddit Insights ### Thread 1: [Title] - URL: [url] - OP's Question: "[quote]" - Key Insight: [summary] - Quotable: "[specific quote that could inform article]" [Repeat for 5 threads] ### Pain Points Identified - [Pain point 1] - [Pain point 2] ### Success Stories Found - [Story with specific details] ### Real User Language - Users say "[phrase]" instead of "[what competitors say]" ## YouTube Insights ### Video 1: [Title] - [Channel] - URL: [url] - Views: [count] - Topics Covered: [list] - Gaps: [what they miss] - Top Comment Theme: [what viewers ask] [Repeat for 5 videos] ### Content Gaps in Video - [Topic tutorials don't cover well] ### Expert Takes - [Notable opinion from creator] ## Synthesis: Unique Insights for Article ### Insights NOT Available in SEO Content 1. [Unique insight from social research] 2. [Another unique insight] ### Questions to Answer (from real users) 1. [Real question from Reddit/YouTube] 2. [Another real question] ### Story Seeds (for mini-stories) - [Story possibility based on real user experience] ### Language to Use - Use "[real user phrase]" instead of "[generic SEO phrase]"模板中的Real User Language、Questions to Answer、Story Seeds三块,直接为第四步的"真实用户语言"与"mini-story"写作提供弹药。
四、STEP 3:文章规划——写之前先做章节级作战计划
第三步要求在动笔前创建"逐节"(section-by-section)计划。这一步的源码实体是 data_sources/modules/article_planner.py,其中ArticlePlanner类的注释明确写着 "Used by the /article command during the planning phase"(由 /article 命令在规划阶段使用)。
4.1 规划进程
合并研究,组合四类输入:
- SERP 分析(能排名的结构)
- 竞品缺口(可以打败的机会)
- 社交研究(独特洞察)
- 品牌上下文(features、brand voice)
创建 Google 验证过的结构:包含多篇 Top 文章共有的章节;新增填补缺口章节;按逻辑阅读顺序排列。
为每个章节分配细节:
要素 用途 Type intro / body-how-to / body-comparison / body-explanation / faq / conclusion Word Target 基于竞品深度 + 缺口填补 Strategic Angle 我们带来的独特视角 Engagement Hook 该章节如何抓住注意力 Knowledge Gaps 填补哪些竞品缺口 Unique Data 要包含的社交研究洞察 Internal Links 链接哪些品牌页面 CTA soft / medium / strong(如适用) Mini-Story 是否在此放故事 规划参与度分布(Engagement Distribution):
- Mini-stories:开头、中部、接近结尾(共 2–3 个)
- CTAs:前 500 词(soft)、中部(medium)、结尾(strong)
- Featured snippet 机会:FAQ、定义类章节
4.2 输出模板:article-plan 报告
保存到research/article-plan-[topic-slug]-[YYYY-MM-DD].md:
# Article Plan: [Topic] **Date**: [YYYY-MM-DD] **Total Word Target**: [count] **Primary Keyword**: [keyword] **Secondary Keywords**: [list] ## Meta Elements - **Title Options**: 1. [Option 1] 2. [Option 2] 3. [Option 3] - **Meta Description**: [150-160 chars — must directly answer the target query, not just tease] - **URL Slug**: /blog/[slug] ## Section Plan ### 1. Introduction - **Type**: intro - **Word Target**: 200 - **Hook Strategy**: [question / scenario / statistic / bold statement] - **APP Elements**: [Agree point, Promise, Preview] - **Mini-Story**: [Yes - place opening scenario here] - **CTA**: soft (within first 500 words) - **Unique Data**: [Insight from social research to include] ### 2. [H2 Title] - **Type**: body-explanation - **Word Target**: 300 - **Strategic Angle**: [What unique perspective] - **Knowledge Gap**: [Which competitor gap this fills] - **Internal Links**: [your brand page to link] - **Unique Data**: [Social insight to include] ### 3. [H2 Title] - **Type**: body-how-to - **Word Target**: 400 - **Strategic Angle**: [Unique angle] - **Knowledge Gap**: [Gap being filled] - **Mini-Story**: [Yes - real user scenario] [Continue for all sections...] ### N. FAQ - **Type**: faq - **Word Target**: 200 - **Questions from Research**: 1. [Real question from Reddit] 2. [Another real question] 3. [Question competitors don't answer] 4. [Featured snippet opportunity] - **Featured Snippet**: Yes ### N+1. Conclusion - **Type**: conclusion - **Word Target**: 200 - **CTA**: strong - **Mini-Story**: [Optional - reinforcing story] ## Engagement Map | Element | Location | |---------|----------| | Mini-Story 1 | Introduction | | Mini-Story 2 | Section [X] | | Mini-Story 3 | Conclusion (optional) | | CTA (soft) | Section 1 or 2 | | CTA (medium) | Section [X] | | CTA (strong) | Conclusion | ## Gap-to-Section Mapping | Competitor Gap | Section Addressing It | |----------------|----------------------| | [Gap 1] | Section [X] | | [Gap 2] | Section [Y] | ## Social Insight Mapping | Unique Insight | Where Used | |----------------|------------| | [Insight 1] | Section [X] | | [Insight 2] | Section [Y] |4.3 源码级原理:ArticlePlanner 如何把规划变成可计算逻辑
data_sources/modules/article_planner.py 将上述模板的每一项沉淀为数据类与算法:
- 章节类型枚举:
SectionType定义了INTRO / BODY_HOW_TO / BODY_COMPARISON / BODY_EXPLANATION / BODY_LIST / FAQ / CONCLUSION七种类型;CTAType定义了SOFT / MEDIUM / STRONG三档强度(源码注释分别对应 "Learn more, explore"、"Try it, start free"、"Convert, sign up now")。 - 默认字数目标:
DEFAULT_WORD_TARGETS为每种章节设定了基准字数——intro 200、body-how-to 350、body-comparison 400、body-explanation 300、body-list 400、faq 250、conclusion 200。 - 自动分类章节:
classify_section_type(heading)通过关键词表把 H2 标题映射为类型,例如含 "how to/steps/guide/tutorial/process" 判为 how-to,含 "vs/compare/versus" 判为 comparison,含 "top/best/tips/ways" 判为 list,无法匹配时默认 explanation。 - 动态字数计算:
calculate_word_target(section_type, competitor_avg, has_gap)的规则是——如果该章节要填补竞品缺口,字数在默认值基础上上浮 30%;如果竞品平均深度更深,则按"竞品均值 × 1.1"反超 10%。这正是规划模板中 "Word Target: Based on competitor depth + gap filling" 的实现。 - 参与度分布算法:
plan_engagement_distribution(num_sections)自动决定 mini-story 位置(第 1 节必放;≥4 节时中部放一个;≥6 节时倒数第二节再放一个)与 CTA 位置(soft 在第 2 节或更早、medium 在中部、strong 在结尾)。 - 报告格式化:
format_article_plan(plan)直接生成上述article-plan-*.md的 Markdown 文本,包括章节汇总表、Engagement Map、Gap-to-Section 与 Insight-to-Section 映射。
另外,create_default_structure(topic)提供了一个通用起步骨架(Introduction → What is X → Why X Matters → How to Get Started → Best Practices → Common Mistakes → FAQ → Conclusion),命令文档强调这只是起点,须按竞品研究修改。
五、STEP 4:逐节写作——每种章节有独立的写作与编辑标准
第四步是整个流水线的产出环节,核心原则是"每节单独写、单独编辑"(Write each section individually to maintain quality)。
5.1 为什么要逐节写
- 长文 AI 写作越写到后面质量越差(degrades in quality toward the end)
- 每节获得聚焦注意力
- 每节有自己的编辑轮次
- 全程保持质量一致
5.2 各章节类型与专项要求
Introduction(引言)
要求:
- 直接回答优先(AI Search Optimization):任何 "best/top/how" 类查询,前 1–2 句必须直接给出答案,再上叙事钩子。原因很直白:AI 爬虫(ChatGPT、Perplexity、Gemini)从页面顶部抓取内容。
- 钩子(Hook):不得用泛泛开场,用问题/场景/数据/大胆陈述。
- APP 公式:Agree(认同读者处境)、Promise(承诺收获)、Preview(预览结构)。
- 主关键词出现在前 100 词内。
- 信任信号(Trust signal)。
- 150–250 词。
禁止的开场:
- "[Product category] is..."
- "When it comes to..."
- "If you're looking for..."
- "In today's world..."
Key Takeaways 块(紧随引言、第一个 H2 之前)
要求:
- 3–5 条要点,概括文章真实结论
- 每条是独立的、带具体细节的主张(数字、名字、结果)
- 不是目录——这是前置结论
- 用带加粗 "Key Takeaways" 标题的 blockquote 格式
- 整篇初稿完成后撰写,再放到这里
Body: How-To(操作指南体)
要求:
- 顺序流程用编号步骤
- 每步可执行、具体
- 必要时给出耗时估算
- 列出常见错误
- 每节 250–400 词
Body: Comparison(对比体)
要求:
- 立场平衡(承认竞品优势)
- 关键指标用数据表
- 具体价格/功能
- "Best for" 推荐
- 每节 300–400 词
Body: Explanation(解释体)
要求:
- 复杂度渐进(简单 → 进阶)
- 用类比讲复杂概念
- 带具体细节的例子
- 在正文某节嵌入至少一个相关 YouTube 视频(优先自家频道,其次权威第三方)以补充语境
- 每节 250–400 词
FAQ
要求:
- 4–6 个来自研究的问题(真实用户问题)
- 40–60 词答案(面向 featured snippet 优化)
- 先直接回答,再给语境
- 总计 200–300 词
Conclusion(结论)
要求:
- 不只是总结——要增加价值
- 3–5 条可执行的关键要点
- 明确的下一步("This week:"、"This month:")
- 带风险逆转(risk reversal)的强 CTA
- 赋能式、向前看的收尾
- 150–250 词
5.3 每节的写作流程:草稿 → 编辑 → 验证
1. 写草稿:套用该节专项要求;放入规划好的独特数据/洞察;贴合字数目标;应用规划的参与度钩子。
2. 编辑轮次:
- 删除 AI 套话("In today's"、"It's important to note"、"When it comes to")
- 用具体数字替换模糊词("many" → "73%")
- 检查段落长度(最多 4 句)
- 变换句子节奏(混用 5–10 词短句与 15–25 词长句)
- 加入口语化手段(缩约、设问、括号插话)
- 验证主动语态
3. 验证要求:该节专项标准是否达标;规划的洞察是否写入;字数是否在目标 ±10% 内。
5.4 源码级支撑:SectionWriter 的章节指南引擎
data_sources/modules/section_writer.py 把上述所有章节要求做成了可编程的指南系统(文件头部注释同样标注 "Used by the /article command during the section-by-section writing phase"):
- WritingGuidelines 数据结构:每种
SectionType对应一份包含requirements(要求)、dos(该做)、donts(不该做)、quality_checks(质量自检)的指南,get_writing_guidelines()按类型路由。 - AI 短语黑名单:
AI_PHRASES_TO_REMOVE列出 16 条要删除的套话,如 "In today's"、"When it comes to"、"It's important to note"、"First and foremost"、"Without further ado" 等,与content_scorer.py的检测模式相互印证。 - 模糊词替换表:
VAGUE_WORDS字典给出 17 组"模糊词 → 具体化"映射,例如 "many" → 具体数字或百分比、"significant" → 具体百分比或金额、"often" → 具体频率。 - 通用编辑清单:
get_editing_checklist()返回 8 项通用检查(移除 AI 短语、替换模糊词、段落 ≤4 句、长短句混排、加缩约、主动语态 80%+、加括号插话/设问、品牌一致性),再加各类型专属检查。 - 提示词生成器:
format_writing_prompt()与format_editing_prompt()把上述指南渲染成可直接喂给模型的写作/编辑提示词,内含字数目标、战略角度、独特洞察、内链、mini-story 与 CTA 要求。
5.5 组装与 Meta 元素
所有章节写完并编辑后:
合并章节:按计划顺序组装;检查节间过渡;核对内链位置;确认 CTA 分布。
添加 Meta 元素(frontmatter 格式):
--- Meta Title: [50-60 chars] Meta Description: [150-160 chars] Primary Keyword: [keyword] Secondary Keywords: [list] URL Slug: /blog/[slug] Word Count: [count] Internal Links: [list] External Links: [list] ---生成检查清单,共 4 份:
SEO Checklist:
- Primary keyword in H1
- Primary keyword in first 100 words
- Primary keyword in 2+ H2 headings
- Keyword density 1-2%
- 3-5+ internal links
- 2-3 external authority links
- Meta title 50-60 chars
- Meta description 150-160 chars
- 2000+ words
AI Search Optimization Checklist:
- Direct answer in first 1-2 sentences (not buried behind narrative)
- Key Takeaways block with 3-5 specific bullet points after introduction
- Meta description directly answers the target query
- At least one relevant YouTube video embedded
- FAQ questions written in natural prompt language
- One idea per section (each H2/H3 focuses on single concept)
- Author attribution in frontmatter
Engagement Checklist:
- Hook (not generic opening)
- APP Formula in intro
- 2-3 mini-stories with names/details/outcomes
- 2-3 contextual CTAs
- First CTA within 500 words
- No paragraphs > 4 sentences
- Varied sentence rhythm
Research Integration Checklist:
- Addresses 3+ competitor gaps
- Includes 5+ social research insights
- Uses real user language
- Answers questions from Reddit/YouTube
- Updates outdated info with 2025 data
输出位置:保存到drafts/[topic-slug]-[YYYY-MM-DD].md。
六、写后质量闭环:去 AI 痕迹 → 多维评分 → 自动修订 → 优化 Agent
初稿落盘并不等于结束,命令文档规定了四段式质量闭环,每一段都有仓库源码背书。
6.1 第一步:/scrub 清除 AI 痕迹
/scrub drafts/[filename].md/scrub的完整规范见 .claude/commands/scrub.md,其实现位于 data_sources/modules/content_scrubber.py 的ContentScrubber类(对外暴露scrub_file(file_path, output_path, verbose))。它做四类清理:
- 移除隐形 Unicode 水印:
WATERMARK_CHARS列表列出 15 个字符,包括零宽空格(U+200B)、BOM(U+FEFF)、零宽非连接符(U+200C)、零宽连接符(U+200D)、词连接符(U+2060)、软连字符(U+00AD)、窄不换行空格(U+202F)等;随后_remove_format_control_chars()再按 Unicode 类别Cf兜底清除所有格式控制字符。 - 按上下文替换 em-dash:
_determine_emdash_replacement()分析破折号前后语境决定替换标点——归属/引用场景换逗号,独立分句换分号("however/therefore/moreover" 等连接副词前也换分号),句子级强停顿换句号,列表或补充说明换逗号。 - 替换 AI 套话:
AI_PHRASE_REPLACEMENTS内置了 13 组正则替换,例如 "It's important to note that X" → "X"、"leverage" → "use"、"utilize" → "use"、"dive into" → "explore"、"In conclusion," → 删除。 - 空白归一化:多空格压为单空格、清理标点前空格、句尾补空格(并刻意避免破坏 URL 与文件扩展名)、连续 3+ 换行压为 2。
该模块是幂等的:对已清理内容重复运行不会产生额外修改,因此可以安全地多次执行、纳入自动化流程。运行后会输出统计:Unicode 水印移除数、格式控制字符移除数、em-dash 替换数、AI 短语替换数。最佳实践要求"发布前必须 scrub",且/write、/rewrite保存文件后应立即自动执行。
6.2 第二步:多维内容评分(阈值 70+)
python data_sources/modules/content_scorer.py drafts/[filename].mddata_sources/modules/content_scorer.py 的ContentScorer.score()对文章做五维加权评分,复合分 ≥70 才通过:
| 维度 | 权重 |
|---|---|
| Humanity/Voice(人性化/声音) | 30% |
| Specificity(具体性) | 25% |
| Structure Balance(结构平衡) | 20% |
| SEO Compliance(SEO 合规) | 15% |
| Readability(可读性) | 10% |
各维度的判定逻辑值得展开(均可从源码确认):
- Humanity(30%):检测 25 条 AI 短语正则(如 "in today's digital/modern"、"when it comes to"、"let's dive in"、"furthermore"、"leverage"、"robust"、"game-changer"),按每千词密度扣分(最高 -30);统计被动语态(最高 -15);奖励对话手段(括号插话、设问、缩约,最高 +15);缩约密度过低扣 10 分。
- Specificity(25%):以 70 分为基线;模糊词(many/some/various/significant/very 等 30 个)密度过高最高扣 25 分;奖励具体性信号(百分比、美元金额、年份、日期、带名字的引语、长引号文本,最高 +30);数字密度过低(每千词 <3)扣分。
- Structure Balance(20%):按字符统计 prose(正文)占比,目标 50%–75% 得满分;低于 50%(列表/表格过多)或高于 75%(纯文字墙)都会按偏离度扣分——这与命令文档"prose-to-list ratio (target 50-75%)"一致。
- SEO Compliance(15%):检查 meta title(50–60 字符)、meta description(150–160 字符)、主关键词是否在 H1、是否在前 100 词、全文是否 ≥2000 词;meta 缺失最高各扣 15 分。
- Readability(10%):委托
ReadabilityScorer计算 Flesch Reading Ease(目标 60–70)与年级水平(目标 8–10);新增两项检查——段落 >4 句扣分(每处 3 分,最高 15)、句子节奏单调扣分(用 5 句滑动窗口检测长度近似的"单调段",并结合句子长度标准差评分)。
评分结果会给出priority_fixes(按"维度权重 × 分数缺口"排序的前 5 条修复建议),format_report()则输出人读报告。
6.3 第三步:低于 70 分自动修订
如果复合分 <70:
- 查看评分器的
priority_fixes - 应用前 3–5 条修复
- 重新评分
- 若仍不足,再迭代一次
- 仍 <70 则移入
review-required/目录,并附_REVIEW_NOTES.md(含最终分数、各维度分解、剩余修复项与人工复核原因)
6.4 第四步:运行优化 Agent
通过质量门槛后,依次运行 5 个优化 agent(定义于 .claude/agents/ 目录,例如 .claude/agents/content-analyzer.md):
content-analyzeragent:综合内容分析(search intent、关键词密度、与竞品字数对比、可读性、SEO 质量评分),底层调用search_intent_analyzer.py、keyword_analyzer.py、content_length_comparator.py、readability_scorer.py、seo_quality_rater.py五个模块seo-optimizeragent:SEO 优化报告meta-creatoragent:多个 meta title/description 候选internal-linkeragent:内链建议keyword-mapperagent:关键词布局分析
6.5 完整输出结构
一次/article会话最终在命令运行时生成的research/、drafts/目录下产出如下文件集:
research/ ├── serp-analysis-[topic]-[date].md # SERP research ├── social-research-[topic]-[date].md # Reddit/YouTube insights └── article-plan-[topic]-[date].md # Section-by-section plan drafts/ ├── [topic]-[date].md # Final article ├── content-analysis-[topic]-[date].md # Content analyzer output ├── seo-report-[topic]-[date].md # SEO optimizer output ├── meta-options-[topic]-[date].md # Meta creator output ├── link-suggestions-[topic]-[date].md # Internal linker output └── keyword-analysis-[topic]-[date].md # Keyword mapper output【免费下载链接】seomachineA specialized Claude Code workspace for creating long-form, SEO-optimized blog content for any business. This system helps you research, write, analyze, and optimize content that ranks well and serves your target audience.项目地址: https://gitcode.com/GitHub_Trending/se/seomachine
创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考