seomachine README

The project's README from github.com/TheCraigHewitt/seomachine. As one markdown file: README.md.

SEO Machine

A 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.

Overview

SEO Machine is built on Claude Code and provides:

Getting Started

Prerequisites

Installation

  1. Clone this repository:
git clone https://github.com/TheCraigHewitt/seomachine.git
cd seomachine

Planning to contribute? Fork this repo first, then clone your fork instead: git clone https://github.com/<your-username>/seomachine.git

  1. Install Python dependencies for analysis modules:
pip install -r data_sources/requirements.txt

This installs:

  1. Open in Claude Code:
claude-code .
  1. Customize Context Files (Important!):

    All context files are provided as templates. Fill them out with your company's information:

    • context/brand-voice.md - Define your brand voice and messaging (see examples/castos/ for reference)
    • context/writing-examples.md - Add 3-5 exemplary blog posts from your site
    • context/features.md - List your product/service features and benefits
    • context/internal-links-map.md - Map your key pages for internal linking
    • context/style-guide.md - Fill in your style preferences
    • context/target-keywords.md - Add your keyword research and topic clusters
    • context/competitor-analysis.md - Add competitor analysis and insights
    • context/seo-guidelines.md - Review and adjust SEO requirements

    Quick Start: Check out examples/castos/ to see a complete real-world example of all context files filled out for a podcast hosting SaaS company.

Docker Setup

Before running Docker, configure data_sources/config/.env with your credentials.

docker-compose build
docker-compose run seomachine bash

Content directories are mounted as volumes, so files in topics/, research/, drafts/, published/, output/, rewrites/, context/, and credentials/ persist on your host.

Workflows

Creating New Content

1. Start with Research

/research [topic]

What it does:

Example:

/research content marketing strategies for B2B SaaS

2. Write the Article

/write [topic or research brief]

What it does:

Example:

/write content marketing strategies for B2B SaaS

Agent Auto-Execution: After writing, these agents automatically analyze the content:

3. Final Optimization

/optimize [article file]

What it does:

Example:

/optimize drafts/content-marketing-strategies-2025-10-29.md

Updating Existing Content

1. Analyze Existing Post

/analyze-existing [URL or file path]

What it does:

Examples:

/analyze-existing https://yoursite.com/blog/marketing-guide
/analyze-existing published/marketing-guide-2024-01-15.md

2. Rewrite/Update Content

/rewrite [topic or analysis file]

What it does:

Example:

/rewrite marketing guide

Commands Reference

/research [topic]

Comprehensive keyword and competitive research for new content.

Output: Research brief in /research/brief-[topic]-[date].md

Includes:


/write [topic]

Create long-form SEO-optimized article (2000-3000+ words).

Output: Article in /drafts/[topic]-[date].md

Includes:

Auto-Triggers:


/rewrite [topic]

Update and improve existing content.

Output: Updated article in /rewrites/[topic]-rewrite-[date].md

Includes:


/analyze-existing [URL or file]

Analyze existing blog posts for improvement opportunities.

Output: Analysis report in /research/analysis-[topic]-[date].md

Includes:


/optimize [file]

Final SEO optimization pass before publishing.

Output: Optimization report in /drafts/optimization-report-[topic]-[date].md

Includes:


/publish-draft [file]

Publish article to WordPress via REST API with Yoast SEO metadata.


/article [topic]

Simplified article creation workflow.


/priorities

Content prioritization matrix using analytics data to identify highest-impact content tasks.


/scrub [file]

Remove AI watermarks and patterns from content (em-dashes, filler phrases, robotic patterns).


Research Commands

Command Description
/research-serp [keyword] SERP analysis for a target keyword
/research-gaps Competitor content gap analysis
/research-trending Trending topic opportunities
/research-performance Performance-based content priorities
/research-topics Topic cluster research

Landing Page Commands

Command Description
/landing-write [topic] Create conversion-optimized landing page
/landing-audit [file] Audit landing page for CRO issues
/landing-research [topic] Research competitors and positioning
/landing-competitor [URL] Deep competitor landing page analysis
/landing-publish [file] Publish landing page to WordPress

Agents

Specialized agents that automatically analyze content and provide expert recommendations.

Content Analyzer (NEW!)

Purpose: Comprehensive, data-driven content analysis using 5 specialized modules

Analyzes:

Output:

Powered by:


SEO Optimizer

Purpose: On-page SEO analysis and optimization recommendations

Analyzes:

Output: SEO score (0-100) with specific improvement recommendations


Meta Creator

Purpose: Generate high-converting meta titles and descriptions

Creates:

Output: Multiple options with recommendation and reasoning


Internal Linker

Purpose: Strategic internal linking recommendations

Provides:

References: context/internal-links-map.md


Keyword Mapper

Purpose: Keyword placement and integration analysis

Analyzes:

Output: Distribution map, gap analysis, specific revision suggestions


Editor

Purpose: Transform technically accurate content into human-sounding, engaging articles

Analyzes:

Provides:

Output: Editorial report with specific improvements to make content sound human


Performance

Purpose: Data-driven content prioritization using real analytics

Analyzes:

Provides:

Output: Comprehensive performance report with actionable priorities


Headline Generator

Purpose: Generate high-converting headline variations and A/B testing recommendations

Provides:


CRO Analyst

Purpose: Conversion rate optimization analysis for landing pages

Analyzes:


Landing Page Optimizer

Purpose: Comprehensive landing page optimization recommendations

Provides:

Marketing Skills

SEO Machine includes 26 marketing skills accessible as slash commands:

Category Skills
Copywriting /copywriting, /copy-editing
CRO /page-cro, /form-cro, /signup-flow-cro, /onboarding-cro, /popup-cro, /paywall-upgrade-cro
Strategy /content-strategy, /pricing-strategy, /launch-strategy, /marketing-ideas
Channels /email-sequence, /social-content, /paid-ads
SEO /seo-audit, /schema-markup, /programmatic-seo, /competitor-alternatives
Analytics /analytics-tracking, /ab-test-setup
Other /referral-program, /free-tool-strategy, /marketing-psychology

Data Sources

Integration with Analytics

SEO Machine integrates with real-time data sources to inform content strategy:

Google Analytics 4:

Google Search Console:

DataForSEO:

Advanced SEO Analysis Modules (NEW!)

SEO Machine includes 5 specialized Python modules for comprehensive content analysis:

Search Intent Analyzer (search_intent_analyzer.py):

Keyword Analyzer (keyword_analyzer.py):

SEO Quality Rater (seo_quality_rater.py):

Content Length Comparator (content_length_comparator.py):

Readability Scorer (readability_scorer.py):

All modules can be used directly in Python or through the Content Analyzer agent.

CRO Analysis Modules

Six Python modules for landing page conversion optimization:

Additional Analysis Modules

Python Research Scripts

Run from repo root:

# Content research
python3 research_quick_wins.py
python3 research_competitor_gaps.py
python3 research_performance_matrix.py
python3 research_priorities_comprehensive.py
python3 research_serp_analysis.py
python3 research_topic_clusters.py
python3 research_trending.py

# SEO analysis (config-driven - set up config/competitors.json first)
python3 seo_baseline_analysis.py
python3 seo_bofu_rankings.py
python3 seo_competitor_analysis.py

# Test API connectivity
python3 test_dataforseo.py

Note: SEO analysis scripts load competitor lists and keywords from config/competitors.json. Copy config/competitors.example.json and customize for your business.

WordPress Integration

Publishing uses the WordPress REST API with a custom MU-plugin that exposes Yoast SEO fields.

Setup:

  1. Install wordpress/seo-machine-yoast-rest.php as an MU-plugin on your WordPress site
  2. Add wordpress/functions-snippet.php to your theme's functions.php
  3. Configure WordPress credentials in .env:
    WP_URL=https://yoursite.com
    WP_USERNAME=your_username
    WP_APP_PASSWORD=your_application_password
    

See wordpress/README.md for detailed setup instructions.

See data_sources/README.md for analytics setup instructions.

Directory Structure

seomachine/
├── .claude/
│   ├── commands/          # Custom workflow commands
│   │   ├── analyze-existing.md
│   │   ├── research.md
│   │   ├── write.md
│   │   ├── rewrite.md
│   │   ├── optimize.md
│   │   ├── scrub.md
│   │   ├── performance-review.md
│   │   ├── publish-draft.md
│   │   ├── article.md
│   │   ├── priorities.md
│   │   ├── research-serp.md
│   │   ├── research-gaps.md
│   │   ├── research-trending.md
│   │   ├── research-performance.md
│   │   ├── research-topics.md
│   │   ├── landing-write.md
│   │   ├── landing-audit.md
│   │   ├── landing-research.md
│   │   ├── landing-competitor.md
│   │   └── landing-publish.md
│   ├── agents/            # Specialized analysis agents
│   │   ├── content-analyzer.md
│   │   ├── seo-optimizer.md
│   │   ├── meta-creator.md
│   │   ├── internal-linker.md
│   │   ├── keyword-mapper.md
│   │   ├── editor.md
│   │   ├── performance.md
│   │   ├── headline-generator.md
│   │   ├── cro-analyst.md
│   │   └── landing-page-optimizer.md
│   └── skills/            # 26 marketing skills
├── data_sources/          # Analytics integrations
│   ├── modules/          # Python analysis modules
│   │   ├── google_analytics.py
│   │   ├── google_search_console.py
│   │   ├── dataforseo.py
│   │   ├── data_aggregator.py
│   │   ├── search_intent_analyzer.py
│  

seomachine (TheCraigHewitt/seomachine)

Searching Database…

这是什么?SEO Machine 是一个专门为 Claude Code 打造的工作区,用于为各类企业创作长篇、经过 SEO 优化的博客内容。它可以帮你做调研、写作、分析和优化内容,让文章获得更好的排名,并服务于目标受众。
这是独立应用,还是运行在 Claude Code 里面的?它不是独立应用,而是一组自定义斜杠命令、专用代理和营销技能文件,你可以直接在 Claude Code 中将其作为工作区打开。
我该怎么把它跑起来?克隆代码仓库,安装分析模块所需的 Python 依赖,在 Claude Code 中打开该文件夹,然后用你的品牌信息填写 context/ 目录下的模板文件。
开始之前,我需要先装好 Claude Code 并拥有 Anthropic API 账户吗?需要。你必须安装 Claude Code 并拥有 Anthropic API 账户。分析模块还需要 Python,它会用到 NLTK、textstat、scikit-learn 和 BeautifulSoup4。
开箱即用,能直接产出好内容吗?不能。所有上下文文件出厂时都是空模板,所以输出质量取决于你是否先填写品牌语气、写作示例、产品功能和关键词研究。你可以参考 examples/castos/ 中已填写完整的示例进行学习。
它是为谁设计的?它面向需要大规模制作和维护长篇博客及落地页内容的企业、营销人员和 SEO 团队,而不是个人的休闲博主。
它能在所有操作系统上运行吗?还有 Docker 选项吗?它是基于 Python 的 Claude Code 工作区,只要 Claude Code 能运行的地方,它就能在 macOS、Windows 和 Linux 上运行。此外,它还提供了用于容器化使用的 Docker 配置。
我的分析数据和 API 凭证最终存放在哪里?Google Analytics、Search Console 和 DataForSEO 的 API 密钥都配置在本地的 datasources/config/.env 中,内容文件夹则以 Docker 卷的形式挂载,因此所有数据都保存在你自己的电脑上,而不是远程服务器。
什么是营销技能(Marketing Skills)?SEO Machine 包含 26 项营销技能,以斜杠命令的形式提供,涵盖文案撰写、CRO(页面、表单、注册流程、新手引导、弹窗、付费墙)、内容策略、定价策略等内容。
它能帮我自动发布成品文章吗?可以。/publish-draft 会通过 REST API 把文章直接发布到 WordPress,并附带 Yoast SEO 元数据;/landing-publish 对落地页执行相同的操作。
我写完文章后,会自动发生什么?/write 命令会自动触发 SEO Optimizer、Meta Creator、Internal Linker 和 Keyword Mapper 代理,它们会立即分析新草稿并提出改进建议。
在重写之前,它如何给现有内容打分?/analyze-existing 命令会评估现有文章的 SEO 表现和竞争定位,给出 0 到 100 分的内容健康度评分以及建议的更新优先级,之后你再运行 /rewrite。
Size
0.4 MB
Stars
7.5K
Updated
CommitOct 15
Age
11mo
Commits · 90 Days