LW

l1angjy/wordpress-seo-agent-skill

Developer tools
10 stars Quality 44 Trend 12

AI Agent Skill — Automated SEO pipeline: Keyword Research → Content Writing → WordPress Publishing via REST API with RankMath

Overview

Keyword Research → Content Writing → WordPress Publishing, fully automated in one go. 一站式 AI Agent SEO 自动化技能:从关键词挖掘、文章撰写到 WordPress 发布,一句话触发全自动执行。 - 🔍 — Automated multilingual keyword matrix with commercial intent filtering 关键词挖掘 — 多语言关键词矩阵自动生成,商业意图过滤 - ✍️ — SEO-optimized articles with AEO (Answer Engine Optimization) for AI search 文章撰写 — SEO 优化文章,内置 AEO 模板捕获 AI 搜索引擎流量 - 🚀 — One-click publish via REST API with RankMath SEO meta WordPress 发布 — 通过 REST API 一键发布,自动设置 RankMath SEO 元数据 - 📁 — JSON artifacts between phases for auditability and resumability 文件交接 — 阶段间以 JSON 文件传递,可审计、可断点恢复 - 🌐 — Industry-agnostic, multi-language, multi-region support 通用适配 — 行业无关,支持多语言、多地区 - ⚙️ — Agent guides setup once, then runs fully autonomous 一次配置 — Agent 引导完成初始设置后,后续全自动执行 - Python 3 (standard library only, no pip dependencies) Python 3(仅使用标准库,无需 pip 依赖) - WordPress site with: WordPress 站点需要: - RankMath SEO Free plugin installed | 已安装 RankMath SEO Free 插件 - Application Password created | 已创建应用密码 -...

README

SEO Auto Publisher

AI Agent Skill — End-to-end SEO content pipeline for WordPress

Keyword Research → Content Writing → WordPress Publishing, fully automated in one go.

一站式 AI Agent SEO 自动化技能:从关键词挖掘、文章撰写到 WordPress 发布,一句话触发全自动执行。


✨ Features | 功能特性

  • 🔍 Keyword Research — Automated multilingual keyword matrix with commercial intent filtering 关键词挖掘 — 多语言关键词矩阵自动生成,商业意图过滤
  • ✍️ Content Writing — SEO-optimized articles with AEO (Answer Engine Optimization) for AI search 文章撰写 — SEO 优化文章,内置 AEO 模板捕获 AI 搜索引擎流量
  • 🚀 WordPress Publishing — One-click publish via REST API with RankMath SEO meta WordPress 发布 — 通过 REST API 一键发布,自动设置 RankMath SEO 元数据
  • 📁 File-Based Handoff — JSON artifacts between phases for auditability and resumability 文件交接 — 阶段间以 JSON 文件传递,可审计、可断点恢复
  • 🌐 Universal — Industry-agnostic, multi-language, multi-region support 通用适配 — 行业无关,支持多语言、多地区
  • ⚙️ One-Time Config — Agent guides setup once, then runs fully autonomous 一次配置 — Agent 引导完成初始设置后,后续全自动执行

📋 Prerequisites | 前置要求

  • Python 3 (standard library only, no pip dependencies) Python 3(仅使用标准库,无需 pip 依赖)
  • WordPress site with: WordPress 站点需要:

🚀 Quick Start | 快速开始

1. Clone | 克隆仓库

git clone https://github.com/L1angjy/WordPress-SEO-Agent-Skill.git

2. WordPress Setup (One-Time) | WordPress 配置(一次性)

Add the code from docs/wordpress-setup.php to your theme’s functions.php.

将 docs/wordpress-setup.php 中的代码添加到你的主题 functions.php 文件中。

3. Configure Environment | 配置环境变量

Create a .env file in your workspace directory: 在你的工作目录中创建 .env 文件:

WP_SITE_URL=https://your-domain.com
WP_USERNAME=your_wp_username
WP_APP_PASSWORD=xxxx xxxx xxxx xxxx xxxx xxxx
WP_CATEGORY_ID=1

4. Install as Agent Skill | 安装为 Agent 技能

Place this repository in your AI agent’s skills directory. The agent will read SKILL.md and guide you through the one-time business configuration.

将本仓库放入你的 AI Agent 技能目录。Agent 会读取 SKILL.md 并引导你完成一次性业务配置。

Required Config | 必填配置:

Config Description 说明
core_topic Your industry / niche 核心主题 / 行业方向
target_region Target market 目标市场地区
languages Language combination 语言组合
audience_type B2B, B2C, or Mixed 受众类型
brand_name Your brand name 品牌名称
workspace_path Working directory for output 输出文件工作目录

After setup, just tell your agent: 配置完成后,只需对 Agent 说:

“Write and publish an SEO article.” “帮我写一篇 SEO 文章并发布。”

The agent handles everything automatically. Agent 会全自动处理一切。

🔄 How It Works | 工作原理

┌──────────────────────────────────────────────────────┐
│                   SKILL.md (Config)                  │
│  core_topic · target_region · languages · brand_name │
└──────────────────┬───────────────────────────────────┘
                   │
                   ▼
┌─────────────────────────────────┐
│  Phase 1: Keyword Research      │
│  web_search → filter → matrix   │
│  Output: seo_keyword/*.json     │
└──────────────┬──────────────────┘
               │ file handoff
               ▼
┌─────────────────────────────────┐
│  Phase 2: Content Writing       │
│  AEO templates · SEO structure  │
│  Output: seo_articles/*.json    │
└──────────────┬──────────────────┘
               │ file handoff
               ▼
┌─────────────────────────────────┐
│  Phase 3: WordPress Publish     │
│  REST API + RankMath meta       │
│  Output: wp-articles-log.md     │
└─────────────────────────────────┘

📂 Project Structure | 项目结构

WordPress-SEO-Agent-Skill/
├── SKILL.md                        # Agent skill definition | Agent 技能定义(含配置区 + 工作流)
├── scripts/
│   └── publish_wp_article.py       # WordPress REST API publisher | WordPress REST API 发布脚本
├── docs/
│   └── wordpress-setup.php         # functions.php snippet | functions.php 配置片段
├── .gitignore
└── README.md

🔧 WordPress Setup | WordPress 配置

Step 1: Install RankMath Free | 安装 RankMath Free

WordPress Admin → Plugins → Add New → Search “Rank Math SEO” → Install & Activate

Step 2: Create Application Password | 创建应用密码

WordPress Admin → Users → Profile → Application Passwords → Enter a name → Click “Add New” → Copy the password

Step 3: Register Meta Keys | 注册 Meta Keys

Add the code from docs/wordpress-setup.php to your active theme’s functions.php, or use the Code Snippets plugin.

将 docs/wordpress-setup.php 中的代码添加到主题 functions.php,或使用 Code Snippets 插件管理。

Exposed RankMath Fields | 暴露的 RankMath 字段:

Meta Key Purpose 用途
rank_math_title Custom SEO title 自定义 SEO 标题
rank_math_description Custom meta description 自定义 Meta 描述
rank_math_focus_keyword Content scoring keyword 内容评分焦点关键词

Step 4: Note Category ID | 记录分类 ID

WordPress Admin → Posts → Categories → Hover over target category → Note the ID from URL

🤖 Supported Platforms | 支持平台

This skill is compatible with any AI agent platform that supports SKILL.md files:

本技能兼容所有支持 SKILL.md 文件的 AI Agent 平台:

⚠️ Important Notes | 注意事项

  1. Test first | 先测试 — Use "status": "draft" on first run | 首次使用建议 status: "draft"
  2. HTTPS required | 需要 HTTPS — Application Passwords are only secure over HTTPS | 应用密码仅在 HTTPS 下安全
  3. Quality content | 高质量内容 — Designed for valuable SEO content, not spam | 用于有价值的 SEO 内容,拒绝垃圾
  4. Unique slugs | 唯一 Slug — Each article must have a unique URL slug | 每篇文章 slug 必须唯一

📄 License

MIT


Built for the AI-native SEO workflow. ⭐ Star if you find it useful!

专为 AI 原生 SEO 工作流打造。觉得有用请 ⭐ Star!

View the full README on GitHub

Recommended Tools

Try a different keyword or remove a filter.

Install

npx skillfish add l1angjy/wordpress-seo-agent-skill
New to MCP? Start with the mcpskill.org guide →