composiohq-awesome-claude-skills-seo-content-marketing

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ComposioHQ Awesome Claude Skills — SEO & Content Marketing

ComposioHQ Awesome Claude 技能套件 — SEO与内容营销

Skill by ara.so — Marketing Skills collection.
This skill suite provides AI-powered SEO and content marketing capabilities derived from the ComposioHQ/awesome-claude-skills framework. It delivers 10 specialized commands and 5 multi-step workflows for keyword research, content audits, technical SEO analysis, competitor intelligence, and content strategy.
ara.so开发的技能 — 营销技能合集。
本技能套件基于ComposioHQ/awesome-claude-skills框架,提供AI驱动的SEO和内容营销能力。它包含10个专业命令和5个多步骤工作流,覆盖关键词研究、内容审核、技术SEO分析、竞品情报和内容策略等场景。

What This Project Does

项目功能

The SEO & Content Marketing Skills Suite enables:
  • Keyword Research — Deep clustering, opportunity scoring, and SERP intent mapping
  • Content Audits — Quality scoring, duplication detection, and cannibalization analysis
  • Technical SEO — Crawl budget, Core Web Vitals, schema markup, and indexability audits
  • Competitor Analysis — Backlink gaps, topic gaps, and featured snippet opportunities
  • Content Strategy — AI-generated briefs, editorial calendars, and optimization workflows
  • Performance Monitoring — Rank tracking, volatility alerts, and CTR optimization
All commands use structured output with progress tracking, findings tables, prioritized action plans, and suggested next steps.
SEO与内容营销技能套件可实现:
  • 关键词研究 — 深度聚类、机会评分和SERP意图映射
  • 内容审核 — 质量评分、重复内容检测和关键词 cannibalization(内部竞争)分析
  • 技术SEO — 抓取预算、Core Web Vitals、Schema标记和可索引性审核
  • 竞品分析 — 反向链接缺口、主题缺口和精选摘要机会识别
  • 内容策略 — AI生成的内容 brief( brief保留英文)、编辑日历和优化工作流
  • 性能监控 — 排名跟踪、波动告警和点击率(CTR)优化
所有命令均提供结构化输出,包含进度跟踪、结果表格、优先级行动计划和下一步建议。

Installation

安装步骤

Clone the Skill Suite

克隆技能套件

bash
undefined
bash
undefined

Create skills directory if it doesn't exist

若技能目录不存在则创建

mkdir -p ~/.claude/skills
mkdir -p ~/.claude/skills

Clone into skills directory

克隆到技能目录

git clone https://github.com/ColonyShopkeeper/r08-composiohq-awesome-claude-skills-seo.git
~/.claude/skills/composiohq-seo-content-marketing
git clone https://github.com/ColonyShopkeeper/r08-composiohq-awesome-claude-skills-seo.git
~/.claude/skills/composiohq-seo-content-marketing

Or download and extract manually

或手动下载并解压

cd ~/.claude/skills curl -L https://github.com/ColonyShopkeeper/r08-composiohq-awesome-claude-skills-seo/archive/refs/heads/main.zip -o seo-skills.zip unzip seo-skills.zip mv r08-composiohq-awesome-claude-skills-seo-main composiohq-seo-content-marketing
undefined
cd ~/.claude/skills curl -L https://github.com/ColonyShopkeeper/r08-composiohq-awesome-claude-skills-seo/archive/refs/heads/main.zip -o seo-skills.zip unzip seo-skills.zip mv r08-composiohq-awesome-claude-skills-seo-main composiohq-seo-content-marketing
undefined

Register in Claude Code

在Claude Code中注册

In a Claude Code session:
bash
/read ~/.claude/skills/composiohq-seo-content-marketing/SKILL.md
Or add to your Claude Code configuration:
json
{
  "skills": [
    "~/.claude/skills/composiohq-seo-content-marketing"
  ]
}
在Claude Code会话中执行:
bash
/read ~/.claude/skills/composiohq-seo-content-marketing/SKILL.md
或添加到Claude Code配置文件:
json
{
  "skills": [
    "~/.claude/skills/composiohq-seo-content-marketing"
  ]
}

Core Commands

核心命令

1. Keyword Research

1. 关键词研究

Deep keyword clustering with opportunity scoring and SERP intent mapping.
bash
undefined
支持深度关键词聚类、机会评分和SERP意图映射。
bash
undefined

Basic keyword research

基础关键词研究

/keyword-research "sustainable fashion"
/keyword-research "sustainable fashion"

With advanced options

高级选项

/keyword-research "sustainable fashion" --cluster-by intent --min-volume 500 --max-difficulty 40
/keyword-research "sustainable fashion" --cluster-by intent --min-volume 500 --max-difficulty 40

Export results

导出结果

/keyword-research "sustainable fashion" --output csv --file keywords.csv

**Output Structure:**
- Keyword clusters grouped by intent (informational, commercial, transactional)
- Search volume, keyword difficulty, and opportunity score
- SERP feature opportunities (featured snippets, PAA, image pack)
- Primary and secondary keyword recommendations
/keyword-research "sustainable fashion" --output csv --file keywords.csv

**输出结构:**
- 按意图(信息型、商业型、交易型)分组的关键词集群
- 搜索量、关键词难度和机会评分
- SERP功能机会(精选摘要、PAA、图片包)
- 主关键词和次关键词推荐

2. Content Audit

2. 内容审核

Full-site content quality scoring with duplication and cannibalization detection.
bash
undefined
全站点内容质量评分,包含重复内容和关键词内部竞争检测。
bash
undefined

Audit entire site

审核整个站点

/content-audit https://example.com --scope full
/content-audit https://example.com --scope full

Audit specific section

审核特定板块

/content-audit https://example.com/blog --scope section
/content-audit https://example.com/blog --scope section

Generate markdown report

生成Markdown报告

/content-audit https://example.com --output md --file audit-report.md

**Analysis Includes:**
- Content quality scores (thin content, duplicate content, orphaned pages)
- Keyword cannibalization report
- Missing or duplicate meta tags
- Internal linking opportunities
- Content gap analysis
/content-audit https://example.com --output md --file audit-report.md

**分析内容:**
- 内容质量评分(薄内容、重复内容、孤立页面)
- 关键词内部竞争报告
- 缺失或重复的元标签
- 内部链接机会
- 内容缺口分析

3. Technical SEO Audit

3. 技术SEO审核

Comprehensive technical SEO analysis covering crawlability, performance, and indexability.
bash
undefined
全面的技术SEO分析,覆盖可抓取性、性能和可索引性。
bash
undefined

Full technical audit

完整技术审核

/technical-seo https://example.com
/technical-seo https://example.com

Focus on Core Web Vitals

聚焦Core Web Vitals

/technical-seo https://example.com --focus cwv
/technical-seo https://example.com --focus cwv

Mobile-specific audit

移动端专项审核

/technical-seo https://example.com --device mobile

**Audit Coverage:**
- Crawl budget analysis and robots.txt validation
- Core Web Vitals (LCP, FID, CLS)
- Schema markup validation
- Canonical and hreflang implementation
- Mobile usability
- HTTPS and security headers
- XML sitemap validation
/technical-seo https://example.com --device mobile

**审核范围:**
- 抓取预算分析和robots.txt验证
- Core Web Vitals(LCP、FID、CLS)
- Schema标记验证
- Canonical和hreflang实现
- 移动端可用性
- HTTPS和安全头
- XML站点地图验证

4. Competitor Gap Analysis

4. 竞品缺口分析

Identify backlink gaps, topic gaps, and featured snippet opportunities.
bash
undefined
识别反向链接缺口、主题缺口和精选摘要机会。
bash
undefined

Analyze competitor gaps

分析竞品缺口

/competitor-gap https://example.com --competitors competitor1.com,competitor2.com
/competitor-gap https://example.com --competitors competitor1.com,competitor2.com

Focus on backlinks

聚焦反向链接

/competitor-gap https://example.com --competitors competitor1.com --focus backlinks
/competitor-gap https://example.com --competitors competitor1.com --focus backlinks

Export opportunities

导出机会列表

/competitor-gap https://example.com --competitors competitor1.com --output json

**Gap Analysis:**
- Backlink gap (links competitors have that you don't)
- Topic gap (keywords competitors rank for that you don't)
- Featured snippet opportunities
- Content format gaps (videos, infographics, tools)
- Domain authority and trust flow comparison
/competitor-gap https://example.com --competitors competitor1.com --output json

**缺口分析:**
- 反向链接缺口(竞品拥有但你没有的链接)
- 主题缺口(竞品排名但你未覆盖的关键词)
- 精选摘要机会
- 内容格式缺口(视频、信息图、工具类内容)
- 域名权重和信任流对比

5. Content Brief Generation

5. 内容Brief生成

AI-generated SEO content briefs with outlines, NLP terms, and optimization targets.
bash
undefined
AI生成的SEO内容Brief,包含大纲、NLP术语和优化目标。
bash
undefined

Generate content brief

生成内容Brief

/content-brief "how to start a podcast"
/content-brief "how to start a podcast"

With target word count

指定目标字数

/content-brief "how to start a podcast" --word-count 2500
/content-brief "how to start a podcast" --word-count 2500

Include competitor analysis

包含竞品分析

/content-brief "how to start a podcast" --analyze-top 5

**Brief Includes:**
- Target keyword and LSI keywords
- Recommended headings (H1, H2, H3 structure)
- NLP terms and entities to include
- Target word count and readability score
- Questions to answer (from PAA)
- Internal linking suggestions
- Meta title and description templates
/content-brief "how to start a podcast" --analyze-top 5

**Brief包含:**
- 目标关键词和LSI关键词
- 推荐标题结构(H1、H2、H3)
- 需要包含的NLP术语和实体
- 目标字数和可读性评分
- 需要解答的问题(来自PAA)
- 内部链接建议
- 元标题和描述模板

6. SERP Monitoring

6. SERP监控

Daily rank tracking with volatility alerts and CTR optimization recommendations.
bash
undefined
每日排名跟踪,包含波动告警和CTR优化建议。
bash
undefined

Monitor rankings

监控排名

/serp-monitor https://example.com --keywords keywords.txt
/serp-monitor https://example.com --keywords keywords.txt

Track specific keywords

跟踪特定关键词

/serp-monitor https://example.com --keywords "keyword1,keyword2,keyword3"
/serp-monitor https://example.com --keywords "keyword1,keyword2,keyword3"

Generate weekly report

生成周报告

/serp-monitor https://example.com --keywords keywords.txt --report weekly

**Monitoring Features:**
- Position tracking for target keywords
- SERP volatility alerts
- CTR optimization opportunities
- Featured snippet tracking
- Competitor position changes
- Ranking trend visualization
/serp-monitor https://example.com --keywords keywords.txt --report weekly

**监控功能:**
- 目标关键词的排名跟踪
- SERP波动告警
- CTR优化机会
- 精选摘要跟踪
- 竞品排名变化
- 排名趋势可视化

7. Link Prospecting

7. 链接 prospecting( prospecting保留英文)

Quality backlink prospect identification with DA/DR filtering and outreach templates.
bash
undefined
高质量反向链接 prospect识别,支持DA/DR过滤和 outreach( outreach保留英文)模板。
bash
undefined

Find link prospects

寻找链接prospect

/link-prospecting "sustainable fashion" --min-da 30
/link-prospecting "sustainable fashion" --min-da 30

Guest post opportunities

客座文章机会

/link-prospecting "sustainable fashion" --type guest-post --min-da 40
/link-prospecting "sustainable fashion" --type guest-post --min-da 40

Resource page opportunities

资源页面机会

/link-prospecting "sustainable fashion" --type resource-page

**Prospecting Output:**
- Qualified prospect list with DA/DR scores
- Contact information (where available)
- Outreach email templates
- Link placement opportunities
- Estimated response rates
/link-prospecting "sustainable fashion" --type resource-page

**Prospecting输出:**
- 带DA/DR评分的合格prospect列表
- 联系信息(如有)
- Outreach邮件模板
- 链接放置机会
- 预估回复率

8. Page Speed SEO Analysis

8. 页面速度SEO分析

Render-blocking resource identification with performance impact on rankings.
bash
undefined
识别阻塞渲染的资源及其对排名的性能影响。
bash
undefined

Analyze page speed

分析页面速度

/page-speed-seo https://example.com
/page-speed-seo https://example.com

Mobile performance focus

聚焦移动端性能

/page-speed-seo https://example.com --device mobile
/page-speed-seo https://example.com --device mobile

Generate optimization report

生成优化报告

/page-speed-seo https://example.com --output detailed

**Performance Analysis:**
- Render-blocking resources (CSS, JavaScript)
- Largest Contentful Paint (LCP) optimization
- Cumulative Layout Shift (CLS) issues
- First Input Delay (FID) analysis
- Image optimization opportunities
- Ranking impact estimation
/page-speed-seo https://example.com --output detailed

**性能分析:**
- 阻塞渲染的资源(CSS、JavaScript)
- Largest Contentful Paint(LCP)优化
- Cumulative Layout Shift(CLS)问题
- First Input Delay(FID)分析
- 图片优化机会
- 排名影响预估

9. Local SEO Audit

9. 本地SEO审核

NAP consistency check, Google Business Profile optimization, and local citation analysis.
bash
undefined
NAP一致性检查、Google Business Profile优化和本地引用分析。
bash
undefined

Local SEO audit

本地SEO审核

/local-seo "Business Name" --location "City, State"
/local-seo "Business Name" --location "City, State"

Citation consistency check

引用一致性检查

/local-seo "Business Name" --location "City, State" --focus citations
/local-seo "Business Name" --location "City, State" --focus citations

GBP optimization

GBP优化

/local-seo "Business Name" --location "City, State" --focus gbp

**Local Audit Coverage:**
- NAP (Name, Address, Phone) consistency across web
- Google Business Profile completeness score
- Local citation audit (Yelp, Apple Maps, Bing Places)
- Review quantity and sentiment analysis
- Local pack ranking factors
- Schema markup for local business
/local-seo "Business Name" --location "City, State" --focus gbp

**本地审核范围:**
- 全网NAP(名称、地址、电话)一致性
- Google Business Profile完整度评分
- 本地引用审核(Yelp、Apple Maps、Bing Places)
- 评论数量和情感分析
- 本地包排名因素
- 本地商家Schema标记

10. Content Calendar Generation

10. 内容日历生成

Data-driven editorial calendar based on search demand and seasonality.
bash
undefined
基于搜索需求和季节性的数据驱动型编辑日历。
bash
undefined

Generate content calendar

生成内容日历

/content-calendar --topics "sustainable fashion,ethical clothing" --months 3
/content-calendar --topics "sustainable fashion,ethical clothing" --months 3

Include seasonal trends

包含季节性趋势

/content-calendar --topics "sustainable fashion" --months 6 --seasonality
/content-calendar --topics "sustainable fashion" --months 6 --seasonality

Export to CSV

导出为CSV

/content-calendar --topics "sustainable fashion" --months 3 --output csv

**Calendar Features:**
- Keyword-driven topic recommendations
- Seasonal trend integration
- Content type suggestions (blog, video, infographic)
- Target publish dates
- Estimated search volume and competition
- Internal linking opportunities
/content-calendar --topics "sustainable fashion" --months 3 --output csv

**日历功能:**
- 关键词驱动的主题推荐
- 季节性趋势整合
- 内容类型建议(博客、视频、信息图)
- 目标发布日期
- 预估搜索量和竞争度
- 内部链接机会

Multi-Step Workflows

多步骤工作流

Full SEO Sprint

完整SEO冲刺

Comprehensive 12-step SEO workflow from audit to implementation.
bash
/workflows:full-seo-sprint https://example.com --scope full
Workflow Steps:
  1. Technical SEO audit
  2. Content quality audit
  3. Keyword research and mapping
  4. Competitor gap analysis
  5. On-page optimization priorities
  6. Content creation plan
  7. Internal linking strategy
  8. Backlink acquisition plan
  9. Schema markup implementation
  10. Core Web Vitals optimization
  11. Conversion rate optimization
  12. Measurement and reporting setup
从审核到实施的12步全面SEO工作流。
bash
/workflows:full-seo-sprint https://example.com --scope full
工作流步骤:
  1. 技术SEO审核
  2. 内容质量审核
  3. 关键词研究与映射
  4. 竞品缺口分析
  5. 页面优化优先级
  6. 内容创建计划
  7. 内部链接策略
  8. 反向链接获取计划
  9. Schema标记实施
  10. Core Web Vitals优化
  11. 转化率优化
  12. 度量与报告设置

Launch SEO

上线前SEO

Pre-launch SEO checklist with validation.
bash
/workflows:launch-seo https://staging.example.com
Pre-Launch Checklist:
  • Canonical URL validation
  • Hreflang implementation (if multi-language)
  • XML sitemap generation and submission
  • Robots.txt configuration
  • 301 redirect mapping (if migration)
  • Meta tags and structured data
  • Analytics and Search Console setup
  • Mobile responsiveness
  • Page speed baseline
带验证的上线前SEO检查清单。
bash
/workflows:launch-seo https://staging.example.com
上线前检查清单:
  • Canonical URL验证
  • Hreflang实现(多语言站点)
  • XML站点地图生成与提交
  • Robots.txt配置
  • 301重定向映射(如有迁移)
  • 元标签和结构化数据
  • 分析工具和Search Console设置
  • 移动端响应性
  • 页面速度基准

Content Refresh

内容刷新

Identify and refresh underperforming content to recover rankings.
bash
/workflows:content-refresh https://example.com --min-age 180
Refresh Process:
  1. Identify declining pages (traffic loss > 20%)
  2. Analyze ranking competitors
  3. Content gap analysis
  4. Update recommendations (freshness, depth, optimization)
  5. Internal linking improvements
  6. Re-optimization checklist
  7. Re-crawl and re-index strategy
识别并刷新表现不佳的内容以恢复排名。
bash
/workflows:content-refresh https://example.com --min-age 180
刷新流程:
  1. 识别流量下降超过20%的页面
  2. 分析排名竞品
  3. 内容缺口分析
  4. 更新建议(新鲜度、深度、优化)
  5. 内部链接改进
  6. 重新优化检查清单
  7. 重新抓取和重新索引策略

Authority Building

权威构建

End-to-end digital PR and link-building campaign.
bash
/workflows:authority-building --topic "sustainable fashion" --goal 50-links
Campaign Steps:
  1. Link gap analysis
  2. Content asset creation (linkable assets)
  3. Prospect identification
  4. Outreach template creation
  5. Email campaign execution
  6. Follow-up automation
  7. Link acquisition tracking
  8. Authority metric monitoring
端到端的数字PR和链接建设活动。
bash
/workflows:authority-building --topic "sustainable fashion" --goal 50-links
活动步骤:
  1. 链接缺口分析
  2. 内容资产创建(可链接资产)
  3. Prospect识别
  4. Outreach模板创建
  5. 邮件活动执行
  6. 跟进自动化
  7. 链接获取跟踪
  8. 权威指标监控

AI Content Pipeline

AI内容流水线

Automated keyword-to-publish content workflow.
bash
/workflows:ai-content-pipeline --keywords keywords.csv --quantity 10
Pipeline Stages:
  1. Keyword prioritization
  2. Content brief generation
  3. AI draft creation
  4. SEO optimization
  5. Fact-checking and editing
  6. Internal linking integration
  7. Schema markup addition
  8. Publishing and indexing
  9. Promotion and distribution
  10. Performance monitoring
从关键词到发布的自动化内容工作流。
bash
/workflows:ai-content-pipeline --keywords keywords.csv --quantity 10
流水线阶段:
  1. 关键词优先级排序
  2. 内容Brief生成
  3. AI草稿创建
  4. SEO优化
  5. 事实核查与编辑
  6. 内部链接整合
  7. Schema标记添加
  8. 发布与索引
  9. 推广与分发
  10. 性能监控

Configuration

配置

Environment Variables

环境变量

bash
undefined
bash
undefined

Required for API integrations

API集成必填

export COMPOSIO_API_KEY="your_composio_api_key"
export COMPOSIO_API_KEY="your_composio_api_key"

Optional: Third-party SEO tool integrations

可选:第三方SEO工具集成

export AHREFS_API_KEY="your_ahrefs_key" export SEMRUSH_API_KEY="your_semrush_key" export SCREAMING_FROG_LICENSE="your_sf_license"
export AHREFS_API_KEY="your_ahrefs_key" export SEMRUSH_API_KEY="your_semrush_key" export SCREAMING_FROG_LICENSE="your_sf_license"

Optional: Content generation

可选:内容生成

export OPENAI_API_KEY="your_openai_key" export ANTHROPIC_API_KEY="your_anthropic_key"
export OPENAI_API_KEY="your_openai_key" export ANTHROPIC_API_KEY="your_anthropic_key"

Optional: Analytics

可选:分析工具

export GOOGLE_ANALYTICS_CREDENTIALS="path/to/credentials.json" export GOOGLE_SEARCH_CONSOLE_CREDENTIALS="path/to/credentials.json"
undefined
export GOOGLE_ANALYTICS_CREDENTIALS="path/to/credentials.json" export GOOGLE_SEARCH_CONSOLE_CREDENTIALS="path/to/credentials.json"
undefined

Configuration File

配置文件

Create
~/.claude/skills/composiohq-seo-content-marketing/config.yaml
:
yaml
undefined
创建
~/.claude/skills/composiohq-seo-content-marketing/config.yaml
yaml
undefined

Default settings

默认设置

defaults: output_format: "markdown" progress_display: true auto_export: false
defaults: output_format: "markdown" progress_display: true auto_export: false

Keyword research defaults

关键词研究默认设置

keyword_research: min_search_volume: 100 max_keyword_difficulty: 50 cluster_method: "intent" serp_features: true
keyword_research: min_search_volume: 100 max_keyword_difficulty: 50 cluster_method: "intent" serp_features: true

Content audit settings

内容审核设置

content_audit: min_word_count: 300 duplicate_threshold: 0.85 cannibalization_threshold: 0.7
content_audit: min_word_count: 300 duplicate_threshold: 0.85 cannibalization_threshold: 0.7

Technical SEO thresholds

技术SEO阈值

technical_seo: max_page_load: 3.0 # seconds min_mobile_score: 90 crawl_depth: 10
technical_seo: max_page_load: 3.0 # 秒 min_mobile_score: 90 crawl_depth: 10

Competitor analysis

竞品分析

competitor_analysis: max_competitors: 5 min_domain_authority: 30
competitor_analysis: max_competitors: 5 min_domain_authority: 30

Link prospecting

链接prospecting

link_prospecting: min_da: 30 min_dr: 25 max_spam_score: 10
link_prospecting: min_da: 30 min_dr: 25 max_spam_score: 10

Reporting

报告设置

reporting: include_visualizations: true export_raw_data: true summary_only: false
undefined
reporting: include_visualizations: true export_raw_data: true summary_only: false
undefined

Code Examples

代码示例

Python: Custom Keyword Research Script

Python:自定义关键词研究脚本

python
#!/usr/bin/env python3
import os
import json
from composio import ComposioClient
python
#!/usr/bin/env python3
import os
import json
from composio import ComposioClient

Initialize client

初始化客户端

client = ComposioClient(api_key=os.getenv("COMPOSIO_API_KEY"))
def keyword_research(seed_keyword, min_volume=100, max_difficulty=50): """ Perform keyword research with clustering and intent mapping """ # Execute keyword research command result = client.execute_skill( skill="seo-content-marketing", command="keyword-research", params={ "seed_keyword": seed_keyword, "min_volume": min_volume, "max_difficulty": max_difficulty, "cluster_by": "intent", "include_serp_features": True } )
# Parse results
keywords = result.get("keywords", [])
clusters = result.get("clusters", {})

# Group by intent
by_intent = {
    "informational": [],
    "commercial": [],
    "transactional": []
}

for keyword in keywords:
    intent = keyword.get("intent", "informational")
    by_intent[intent].append({
        "keyword": keyword["term"],
        "volume": keyword["search_volume"],
        "difficulty": keyword["difficulty"],
        "opportunity_score": keyword["opportunity_score"]
    })

# Sort by opportunity score
for intent in by_intent:
    by_intent[intent].sort(key=lambda x: x["opportunity_score"], reverse=True)

return by_intent
client = ComposioClient(api_key=os.getenv("COMPOSIO_API_KEY"))
def keyword_research(seed_keyword, min_volume=100, max_difficulty=50): """ 执行带聚类和意图映射的关键词研究 """ # 执行关键词研究命令 result = client.execute_skill( skill="seo-content-marketing", command="keyword-research", params={ "seed_keyword": seed_keyword, "min_volume": min_volume, "max_difficulty": max_difficulty, "cluster_by": "intent", "include_serp_features": True } )
# 解析结果
keywords = result.get("keywords", [])
clusters = result.get("clusters", {})

# 按意图分组
by_intent = {
    "informational": [],
    "commercial": [],
    "transactional": []
}

for keyword in keywords:
    intent = keyword.get("intent", "informational")
    by_intent[intent].append({
        "keyword": keyword["term"],
        "volume": keyword["search_volume"],
        "difficulty": keyword["difficulty"],
        "opportunity_score": keyword["opportunity_score"]
    })

# 按机会分数排序
for intent in by_intent:
    by_intent[intent].sort(key=lambda x: x["opportunity_score"], reverse=True)

return by_intent

Example usage

示例用法

if name == "main": results = keyword_research("sustainable fashion", min_volume=500)
print("Top Informational Keywords:")
for kw in results["informational"][:5]:
    print(f"  {kw['keyword']} (Vol: {kw['volume']}, Score: {kw['opportunity_score']})")

print("\nTop Commercial Keywords:")
for kw in results["commercial"][:5]:
    print(f"  {kw['keyword']} (Vol: {kw['volume']}, Score: {kw['opportunity_score']})")
undefined
if name == "main": results = keyword_research("sustainable fashion", min_volume=500)
print("Top Informational Keywords:")
for kw in results["informational"][:5]:
    print(f"  {kw['keyword']} (Vol: {kw['volume']}, Score: {kw['opportunity_score']})")

print("\nTop Commercial Keywords:")
for kw in results["commercial"][:5]:
    print(f"  {kw['keyword']} (Vol: {kw['volume']}, Score: {kw['opportunity_score']})")
undefined

JavaScript: Content Audit Integration

JavaScript:内容审核集成

javascript
const { ComposioClient } = require('composio-sdk');

// Initialize client
const client = new ComposioClient({
  apiKey: process.env.COMPOSIO_API_KEY
});

async function auditWebsite(url, options = {}) {
  const {
    scope = 'full',
    minWordCount = 300,
    checkCannibalization = true
  } = options;

  // Execute content audit
  const result = await client.executeSkill({
    skill: 'seo-content-marketing',
    command: 'content-audit',
    params: {
      url,
      scope,
      min_word_count: minWordCount,
      check_cannibalization: checkCannibalization,
      output: 'json'
    }
  });

  // Categorize issues by severity
  const issues = {
    critical: [],
    warning: [],
    info: []
  };

  result.findings.forEach(finding => {
    if (finding.severity === 'critical') {
      issues.critical.push(finding);
    } else if (finding.severity === 'warning') {
      issues.warning.push(finding);
    } else {
      issues.info.push(finding);
    }
  });

  // Generate summary
  const summary = {
    total_pages: result.stats.total_pages,
    issues_found: result.findings.length,
    critical_issues: issues.critical.length,
    warning_issues: issues.warning.length,
    content_quality_score: result.stats.avg_quality_score,
    cannibalization_instances: result.cannibalization?.length || 0
  };

  return { summary, issues, raw: result };
}

// Example usage
(async () => {
  const audit = await auditWebsite('https://example.com', {
    scope: 'full',
    minWordCount: 500
  });

  console.log('Content Audit Summary:');
  console.log(`Total Pages: ${audit.summary.total_pages}`);
  console.log(`Quality Score: ${audit.summary.content_quality_score}/100`);
  console.log(`Critical Issues: ${audit.summary.critical_issues}`);
  
  if (audit.summary.critical_issues > 0) {
    console.log('\nCritical Issues:');
    audit.issues.critical.forEach(issue => {
      console.log(`  - ${issue.page}: ${issue.description}`);
    });
  }
})();
javascript
const { ComposioClient } = require('composio-sdk');

// 初始化客户端
const client = new ComposioClient({
  apiKey: process.env.COMPOSIO_API_KEY
});

async function auditWebsite(url, options = {}) {
  const {
    scope = 'full',
    minWordCount = 300,
    checkCannibalization = true
  } = options;

  // 执行内容审核
  const result = await client.executeSkill({
    skill: 'seo-content-marketing',
    command: 'content-audit',
    params: {
      url,
      scope,
      min_word_count: minWordCount,
      check_cannibalization: checkCannibalization,
      output: 'json'
    }
  });

  // 按严重程度分类问题
  const issues = {
    critical: [],
    warning: [],
    info: []
  };

  result.findings.forEach(finding => {
    if (finding.severity === 'critical') {
      issues.critical.push(finding);
    } else if (finding.severity === 'warning') {
      issues.warning.push(finding);
    } else {
      issues.info.push(finding);
    }
  });

  // 生成摘要
  const summary = {
    total_pages: result.stats.total_pages,
    issues_found: result.findings.length,
    critical_issues: issues.critical.length,
    warning_issues: issues.warning.length,
    content_quality_score: result.stats.avg_quality_score,
    cannibalization_instances: result.cannibalization?.length || 0
  };

  return { summary, issues, raw: result };
}

// 示例用法
(async () => {
  const audit = await auditWebsite('https://example.com', {
    scope: 'full',
    minWordCount: 500
  });

  console.log('Content Audit Summary:');
  console.log(`Total Pages: ${audit.summary.total_pages}`);
  console.log(`Quality Score: ${audit.summary.content_quality_score}/100`);
  console.log(`Critical Issues: ${audit.summary.critical_issues}`);
  
  if (audit.summary.critical_issues > 0) {
    console.log('\nCritical Issues:');
    audit.issues.critical.forEach(issue => {
      console.log(`  - ${issue.page}: ${issue.description}`);
    });
  }
})();

Shell Script: Automated SEO Sprint

Shell脚本:自动化SEO冲刺

bash
#!/bin/bash
bash
#!/bin/bash

Automated SEO Sprint Runner

自动化SEO冲刺运行器

Usage: ./seo-sprint.sh https://example.com

使用方法: ./seo-sprint.sh https://example.com

set -e
DOMAIN=$1 OUTPUT_DIR="./seo-sprint-$(date +%Y%m%d)"
if [ -z "$DOMAIN" ]; then echo "Usage: $0 <domain>" exit 1 fi
echo "Starting SEO Sprint for $DOMAIN" mkdir -p "$OUTPUT_DIR"
set -e
DOMAIN=$1 OUTPUT_DIR="./seo-sprint-$(date +%Y%m%d)"
if [ -z "$DOMAIN" ]; then echo "Usage: $0 <domain>" exit 1 fi
echo "Starting SEO Sprint for $DOMAIN" mkdir -p "$OUTPUT_DIR"

Step 1: Technical Audit

步骤1: 技术审核

echo "Running technical SEO audit..." /technical-seo "$DOMAIN" --output json --file "$OUTPUT_DIR/technical-audit.json"
echo "Running technical SEO audit..." /technical-seo "$DOMAIN" --output json --file "$OUTPUT_DIR/technical-audit.json"

Step 2: Content Audit

步骤2: 内容审核

echo "Running content audit..." /content-audit "$DOMAIN" --scope full --output json --file "$OUTPUT_DIR/content-audit.json"
echo "Running content audit..." /content-audit "$DOMAIN" --scope full --output json --file "$OUTPUT_DIR/content-audit.json"

Step 3: Keyword Research (extract main topics first)

步骤3: 关键词研究(先提取主要主题)

echo "Performing keyword research..." MAIN_TOPIC=$(curl -s "$DOMAIN" | grep -oP '<title>\K[^<]+' | head -1) /keyword-research "$MAIN_TOPIC" --cluster-by intent --output csv --file "$OUTPUT_DIR/keywords.csv"
echo "Performing keyword research..." MAIN_TOPIC=$(curl -s "$DOMAIN" | grep -oP '<title>\K[^<]+' | head -1) /keyword-research "$MAIN_TOPIC" --cluster-by intent --output csv --file "$OUTPUT_DIR/keywords.csv"

Step 4: Competitor Analysis

步骤4: 竞品分析

echo "Analyzing competitors..."
echo "Analyzing competitors..."

Extract top 3 competitors from SERP

从SERP提取前3个竞品

COMPETITORS=$(curl -s "https://www.google.com/search?q=$MAIN_TOPIC" |
grep -oP 'href="https?://[^"]+' |
grep -v google |
head -3 |
cut -d'"' -f2 |
tr '\n' ',' |
sed 's/,$//')
/competitor-gap "$DOMAIN" --competitors "$COMPETITORS" --output json --file "$OUTPUT_DIR/competitor-gap.json"
COMPETITORS=$(curl -s "https://www.google.com/search?q=$MAIN_TOPIC" |
grep -oP 'href="https?://[^"]+' |
grep -v google |
head -3 |
cut -d'"' -f2 |
tr '\n' ',' |
sed 's/,$//')
/competitor-gap "$DOMAIN" --competitors "$COMPETITORS" --output json --file "$OUTPUT_DIR/competitor-gap.json"

Step 5: Generate Content Brief for top opportunity keyword

步骤5: 为顶级机会关键词生成内容Brief

echo "Generating content brief..." TOP_KEYWORD=$(awk -F',' 'NR==2 {print $1}' "$OUTPUT_DIR/keywords.csv") /content-brief "$TOP_KEYWORD" --analyze-top 5 --output md --file "$OUTPUT_DIR/content-brief.md"
echo "Generating content brief..." TOP_KEYWORD=$(awk -F',' 'NR==2 {print $1}' "$OUTPUT_DIR/keywords.csv") /content-brief "$TOP_KEYWORD" --analyze-top 5 --output md --file "$OUTPUT_DIR/content-brief.md"

Step 6: Page Speed Analysis

步骤6: 页面速度分析

echo "Analyzing page speed..." /page-speed-seo "$DOMAIN" --device mobile --output json --file "$OUTPUT_DIR/page-speed.json"
echo "Analyzing page speed..." /page-speed-seo "$DOMAIN" --device mobile --output json --file "$OUTPUT_DIR/page-speed.json"

Generate Summary Report

生成摘要报告

echo "Generating summary report..." cat > "$OUTPUT_DIR/SUMMARY.md" << EOF
echo "Generating summary report..." cat > "$OUTPUT_DIR/SUMMARY.md" << EOF

SEO Sprint Summary — $(date +%Y-%m-%d)

SEO Sprint Summary — $(date +%Y-%m-%d)

Domain

Domain

$DOMAIN
$DOMAIN

Audits Completed

Audits Completed

  • ✅ Technical SEO Audit
  • ✅ Content Quality Audit
  • ✅ Keyword Research
  • ✅ Competitor Gap Analysis
  • ✅ Content Brief Generation
  • ✅ Page Speed Analysis
  • ✅ Technical SEO Audit
  • ✅ Content Quality Audit
  • ✅ Keyword Research
  • ✅ Competitor Gap Analysis
  • ✅ Content Brief Generation
  • ✅ Page Speed Analysis

Quick Wins

Quick Wins

EOF
EOF

Extract critical issues from technical audit

从技术审核中提取关键问题

jq -r '.findings[] | select(.severity=="critical") | "- " + .description'
"$OUTPUT_DIR/technical-audit.json" >> "$OUTPUT_DIR/SUMMARY.md"
echo "" echo "SEO Sprint completed! Results saved to $OUTPUT_DIR" echo "View summary: cat $OUTPUT_DIR/SUMMARY.md"
undefined
jq -r '.findings[] | select(.severity=="critical") | "- " + .description'
"$OUTPUT_DIR/technical-audit.json" >> "$OUTPUT_DIR/SUMMARY.md"
echo "" echo "SEO Sprint completed! Results saved to $OUTPUT_DIR" echo "View summary: cat $OUTPUT_DIR/SUMMARY.md"
undefined

Common Patterns

常见模式

Pattern: Monthly SEO Health Check

模式:月度SEO健康检查

bash
#!/bin/bash
bash
#!/bin/bash

monthly-seo-check.sh

monthly-seo-check.sh

DOMAIN="example.com" DATE=$(date +%Y-%m) REPORT_DIR="./seo-reports/$DATE"
mkdir -p "$REPORT_DIR"
DOMAIN="example.com" DATE=$(date +%Y-%m) REPORT_DIR="./seo-reports/$DATE"
mkdir -p "$REPORT_DIR"

Core health metrics

核心健康指标

/technical-seo "https://$DOMAIN" --output json > "$REPORT_DIR/technical.json" /serp-monitor "https://$DOMAIN" --keywords ./tracked-keywords.txt --report monthly > "$REPORT_DIR/rankings.json" /content-audit "https://$DOMAIN" --scope full --output json > "$REPORT_DIR/content.json"
/technical-seo "https://$DOMAIN" --output json > "$REPORT_DIR/technical.json" /serp-monitor "https://$DOMAIN" --keywords ./tracked-keywords.txt --report monthly > "$REPORT_DIR/rankings.json" /content-audit "https://$DOMAIN" --scope full --output json > "$REPORT_DIR/content.json"

Compare to previous month

与上月对比

python compare-reports.py "$REPORT_DIR" "./seo-reports/$(date -d '1 month ago' +%Y-%m)"
undefined
python compare-reports.py "$REPORT_DIR" "./seo-reports/$(date -d '1 month ago' +%Y-%m)"
undefined

Pattern: Content Optimization Loop

模式:内容优化循环

python
undefined
python
undefined

content-optimization-loop.py

content-optimization-loop.py

import os from composio import ComposioClient
client = ComposioClient(api_key=os.getenv("COMPOSIO_API_KEY"))
def optimize_content_pipeline(keyword, domain): """ Complete content optimization workflow """ # 1. Generate brief brief = client.execute_skill( skill="seo-content-marketing", command="content-brief", params={"keyword": keyword, "analyze_top": 5} )
# 2. Check if we already rank for this keyword
current_ranking = client.execute_skill(
    skill="seo-content-marketing",
    command="serp-monitor",
    params={"domain": domain, "keywords": [keyword]}
)

# 3. If we rank poorly or not at all, create new content
if not current_ranking or current_ranking["position"] > 10:
    # Generate draft using AI
    draft = generate_content_from_brief(brief)
    return {"action": "create", "brief": brief, "draft": draft}
else:
    # Refresh existing content
    url = current_ranking["url"]
    gap_analysis = analyze_content_gap(url, keyword)
    return {"action": "refresh", "url": url, "improvements": gap_analysis}
def generate_content_from_brief(brief): # Use OpenAI or Anthropic to generate draft from brief # Implementation depends on your preferred AI service pass
def analyze_content_gap(url, keyword): # Compare your content to top-ranking pages pass
undefined
import os from composio import ComposioClient
client = ComposioClient(api_key=os.getenv("COMPOSIO_API_KEY"))
def optimize_content_pipeline(keyword, domain): """ 完整的内容优化工作流 """ # 1. 生成Brief brief = client.execute_skill( skill="seo-content-marketing", command="content-brief", params={"keyword": keyword, "analyze_top": 5} )
# 2. 检查是否已针对该关键词排名
current_ranking = client.execute_skill(
    skill="seo-content-marketing",
    command="serp-monitor",
    params={"domain": domain, "keywords": [keyword]}
)

# 3. 如果排名不佳或未排名,则创建新内容
if not current_ranking or current_ranking["position"] > 10:
    # 使用AI生成草稿
    draft = generate_content_from_brief(brief)
    return {"action": "create", "brief": brief, "draft": draft}
else:
    # 刷新现有内容
    url = current_ranking["url"]
    gap_analysis = analyze_content_gap(url, keyword)
    return {"action": "refresh", "url": url, "improvements": gap_analysis}
def generate_content_from_brief(brief): # 使用OpenAI或Anthropic根据Brief生成草稿 # 实现方式取决于你偏好的AI服务 pass
def analyze_content_gap(url, keyword): # 将你的内容与排名靠前的页面进行对比 pass
undefined

Pattern: Backlink Campaign Tracker

模式:反向链接活动跟踪器

javascript
// backlink-campaign.js
const { ComposioClient } = require('composio-sdk');
const fs = require('fs').promises;

class BacklinkCampaign {
  constructor(domain, topic) {
    this.domain = domain;
    this.topic = topic;
    this.client = new ComposioClient({ apiKey: process.env.COMPOSIO_API_KEY });
    this.campaignFile = `./campaigns/${topic.replace(/\s+/g, '-')}.json`;
  }

  async initialize() {
    // Find link prospects
    const prospects = await this.client.executeSkill({
      skill: 'seo-content-marketing',
      command: 'link-prospecting',
      params: {
        topic: this.topic,
        min_da: 30,
        type: 'guest-post'
      }
    });

    // Save campaign
    await fs.writeFile(this.campaignFile, JSON.stringify({
      domain: this.domain,
      topic: this.topic,
      created: new Date().toISOString(),
      prospects: prospects.prospects.map(p => ({
        ...p,
        status: 'new',
        contacted: null,
        response: null
      }))
    }, null, 2));

    return prospects.prospects.length;
  }

  async updateProspect(prospectUrl, status, notes) {
    const campaign = JSON.parse(await fs.readFile(this.campaignFile));
    const prospect = campaign.prospects.find(p => p.url === prospectUrl);
    
    if (prospect) {
      prospect.status = status;
      prospect.notes = notes;
      prospect.updated = new Date().toISOString();
      
      await fs.writeFile(this.campaignFile, JSON.stringify(campaign, null, 2));
    }
  }

  async getStats() {
    const campaign = JSON.parse(await fs.readFile(this.campaignFile));
    const stats = {
      total: campaign.prospects.length,
      contacted: 0,
      responded: 0,
      acquired: 0
    };

    campaign.prospects.forEach(p => {
      if (p.status === 'contacted') stats.contacted++;
      if (p.status === 'responded') stats.responded++;
      if (p.status === 'acquired') stats.acquired++;
    });

    return stats;
  }
}

// Usage
(async () => {
  const campaign = new BacklinkCampaign('example.com', 'sustainable fashion');
  const prospectCount = await campaign.initialize();
  console.log(`Campaign created with ${prospectCount} prospects`);
})();
javascript
// backlink-campaign.js
const { ComposioClient } = require('composio-sdk');
const fs = require('fs').promises;

class BacklinkCampaign {
  constructor(domain, topic) {
    this.domain = domain;
    this.topic = topic;
    this.client = new ComposioClient({ apiKey: process.env.COMPOSIO_API_KEY });
    this.campaignFile = `./campaigns/${topic.replace(/\s+/g, '-')}.json`;
  }

  async initialize() {
    // 寻找链接prospect
    const prospects = await this.client.executeSkill({
      skill: 'seo-content-marketing',
      command: 'link-prospecting',
      params: {
        topic: this.topic,
        min_da: 30,
        type: 'guest-post'
      }
    });

    // 保存活动
    await fs.writeFile(this.campaignFile, JSON.stringify({
      domain: this.domain,
      topic: this.topic,
      created: new Date().toISOString(),
      prospects: prospects.prospects.map(p => ({
        ...p,
        status: 'new',
        contacted: null,
        response: null
      }))
    }, null, 2));

    return prospects.prospects.length;
  }

  async updateProspect(prospectUrl, status, notes) {
    const campaign = JSON.parse(await fs.readFile(this.campaignFile));
    const prospect = campaign.prospects.find(p => p.url === prospectUrl);
    
    if (prospect) {
      prospect.status = status;
      prospect.notes = notes;
      prospect.updated = new Date().toISOString();
      
      await fs.writeFile(this.campaignFile, JSON.stringify(campaign, null, 2));
    }
  }

  async getStats() {
    const campaign = JSON.parse(await fs.readFile(this.campaignFile));
    const stats = {
      total: campaign.prospects.length,
      contacted: 0,
      responded: 0,
      acquired: 0
    };

    campaign.prospects.forEach(p => {
      if (p.status === 'contacted') stats.contacted++;
      if (p.status === 'responded') stats.responded++;
      if (p.status === 'acquired') stats.acquired++;
    });

    return stats;
  }
}

// 使用示例
(async () => {
  const campaign = new BacklinkCampaign('example.com', 'sustainable fashion');
  const prospectCount = await campaign.initialize();
  console.log(`Campaign created with ${prospectCount} prospects`);
})();

Troubleshooting

故障排除

Command Not Found

命令未找到

If commands are not recognized:
bash
undefined
如果命令未被识别:
bash
undefined

Verify skill is loaded

验证技能已加载

claude skills list
claude skills list

Reload skill

重新加载技能

/read ~/.claude/skills/composiohq-seo-content-marketing/SKILL.md
/read ~/.claude/skills/composiohq-seo-content-marketing/SKILL.md

Check PATH if using CLI directly

如果直接使用CLI,检查PATH

export PATH="$PATH:~/.claude/skills/composiohq-seo-content-marketing/bin"
undefined
export PATH="$PATH:~/.claude/skills/composiohq-seo-content-marketing/bin"
undefined

API Rate Limits

API速率限制

When hitting third-party API limits:
bash
undefined
当触发第三方API限制时:
bash
undefined

Use caching to reduce API calls

使用缓存减少API调用

/keyword-research "topic" --use-cache --cache-ttl 86400
/keyword-research "topic" --use-cache --cache-ttl 86400

Reduce batch size

减小批量大小

/content-audit https://example.com --batch-size 10 --delay 2
/content-audit https://example.com --batch-size 10 --delay 2

Check quota

检查配额

composio quota check
undefined
composio quota check
undefined

Slow Performance

性能缓慢

Optimize large audits:
bash
undefined
优化大型审核:
bash
undefined

Limit crawl depth

限制抓取深度

/technical-seo https://example.com --max-depth 5
/technical-seo https://example.com --max-depth 5

Sample pages instead of full audit

抽样页面而非完整审核

/content-audit https://example.com --sample 100
/content-audit https://example.com --sample 100

Run in parallel (if supported)

并行运行(如支持)

/content-audit https://example.com --parallel 4
undefined
/content-audit https://example.com --parallel 4
undefined

Missing Dependencies

缺少依赖

Install required tools:
bash
undefined
安装所需工具:
bash
undefined

Python dependencies

Python依赖

pip install composio-sdk requests beautifulsoup4 pandas
pip install composio-sdk requests beautifulsoup4 pandas

Node.js dependencies

Node.js依赖

npm install composio-sdk axios cheerio
npm install composio-sdk axios cheerio

System tools

系统工具

sudo apt-get install curl jq
undefined
sudo apt-get install curl jq
undefined

Authentication Errors

认证错误

bash
undefined
bash
undefined

Verify API key

验证API密钥

echo $COMPOSIO_API_KEY
echo $COMPOSIO_API_KEY

Re-authenticate

重新认证

composio auth login
composio auth login

Check credentials file

检查凭证文件

cat ~/.composio/credentials.json
undefined
cat ~/.composio/credentials.json
undefined

Export Failures

导出失败

bash
undefined
bash
undefined

Ensure output directory exists

确保输出目录存在

mkdir -p ./reports
mkdir -p ./reports

Check write permissions

检查写入权限

chmod +w ./reports
chmod +w ./reports

Use absolute paths

使用绝对路径

/content-audit https://example.com --output json --file /full/path/to/report.json
undefined
/content-audit https://example.com --output json --file /full/path/to/report.json
undefined

Advanced Usage

高级用法

Custom Scoring Models

自定义评分模型

Override default scoring algorithms:
python
undefined
覆盖默认评分算法:
python
undefined

custom-scoring.py

custom-scoring.py

def custom_opportunity_score(keyword_data): """ Custom keyword opportunity scoring Factors: volume, difficulty, intent, SERP features """ volume_score = min(keyword_data['volume'] / 10000, 1.0) * 40 difficulty_score = (100 - keyword_data['difficulty']) / 100 * 30 intent_score = {'transactional': 30, 'commercial': 20, 'informational': 10}.get( keyword_data['intent'], 10 ) serp_bonus = len(keyword_data.get('serp_features', [])) * 5
return volume_score + difficulty_score + intent_score + serp_bonus
def custom_opportunity_score(keyword_data): """ 自定义关键词机会评分 因素:搜索量、难度、意图、SERP功能 """ volume_score = min(keyword_data['volume'] / 10000, 1.0) * 40 difficulty_score = (100 - keyword_data['difficulty']) / 100 * 30 intent_score = {'transactional': 30, 'commercial': 20, 'informational': 10}.get( keyword_data['intent'], 10 ) serp_bonus = len(keyword_data.get('serp_features', [])) * 5
return volume_score + difficulty_score + intent_score + serp_bonus

Apply to results

应用到结果

keywords = keyword_research_results['keywords'] for kw in keywords: kw['custom_score'] = custom_opportunity_score(kw)
keywords.sort(key=lambda x: x['custom_score'], reverse=True)
undefined
keywords = keyword_research_results['keywords'] for kw in keywords: kw['custom_score'] = custom_opportunity_score(kw)
keywords.sort(key=lambda x: x['custom_score'], reverse=True)
undefined

Automated Reporting

自动化报告

Schedule daily reports:
bash
undefined
安排每日报告:
bash
undefined

crontab -e

crontab -e

0 8 * * * /usr/local/bin/daily-seo-report.sh
0 8 * * * /usr/local/bin/daily-seo-report.sh

daily-seo-report.sh

daily-seo-report.sh

#!/bin/bash DOMAIN="example.com" DATE=$(date +%Y-%m-%d)
/serp-monitor "https://$DOMAIN"
--keywords ./tracked-keywords.txt
--output html
--file "./reports/daily-$DATE.html"
#!/bin/bash DOMAIN="example.com" DATE=$(date +%Y-%m-%d)
/serp-monitor "https://$DOMAIN"
--keywords ./tracked-keywords.txt
--output html
--file "./reports/daily-$DATE.html"

Email report

邮件发送报告

mail -s "SEO Report $DATE" team@example.com < "./reports/daily-$DATE.html"
undefined
mail -s "SEO Report $DATE" team@example.com < "./reports/daily-$DATE.html"
undefined

Integration Examples

集成示例

Google Search Console Integration

Google Search Console集成

python
from google.oauth2 import service_account
from googleapiclient.discovery import build
python
from google.oauth2 import service_account
from googleapiclient.discovery import build

Authenticate

认证

credentials = service_account.Credentials.from_service_account_file( os.getenv('GOOGLE_SEARCH_CONSOLE_CREDENTIALS') )
webmasters = build('searchconsole', 'v1', credentials=credentials)
credentials = service_account.Credentials.from_service_account_file( os.getenv('GOOGLE_SEARCH_CONSOLE_CREDENTIALS') )
webmasters = build('searchconsole', 'v1', credentials=credentials)

Get Search Console data

获取Search Console数据

site_url = 'https://example.com/' request = { 'startDate': '2024-01-01', 'endDate': '2024-01-31', 'dimensions': ['query', 'page'] }
response = webmasters.searchanalytics().query( siteUrl=site_url, body=request ).execute()
site_url = 'https://example.com/' request = { 'startDate': '2024-01-01', 'endDate': '2024-01-31', 'dimensions': ['query', 'page'] }
response = webmasters.searchanalytics().query( siteUrl=site_url, body=request ).execute()

Combine with keyword research

与关键词研究结合

for row in response['rows']: keyword = row['keys'][0] # Run keyword research for related terms suggestions = keyword_research(keyword)
undefined
for row in response['rows']: keyword = row['keys'][0] # 为相关术语执行关键词研究 suggestions = keyword_research(keyword)
undefined

Slack Notifications

Slack通知

javascript
const { WebClient } = require('@slack/web-api');

const slack = new WebClient(process.env.SLACK_BOT_TOKEN);

async function notifyRankingChanges(changes) {
  const message = {
    channel: '#seo-alerts',
    blocks: [
      {
        type: 'header',
        text: {
          type: 'plain_text',
          text: '🚨 Ranking Changes Detected'
        }
      },
      {
        type: 'section',
        fields: changes.map(change => ({
          type: 'mrkdwn',
          text: `*${change.keyword}*\n${change.old_position}${change.new_position} (${change.change > 0 ? '+' : ''}${change.change})`
        }))
      }
    ]
  };

  await slack.chat.postMessage(message);
}
javascript
const { WebClient } = require('@slack/web-api');

const slack = new WebClient(process.env.SLACK_BOT_TOKEN);

async function notifyRankingChanges(changes) {
  const message = {
    channel: '#seo-alerts',
    blocks: [
      {
        type: 'header',
        text: {
          type: 'plain_text',
          text: '🚨 排名变化通知'
        }
      },
      {
        type: 'section',
        fields: changes.map(change => ({
          type: 'mrkdwn',
          text: `*${change.keyword}*\n${change.old_position}${change.new_position} (${change.change > 0 ? '+' : ''}${change.change})`
        }))
      }
    ]
  };

  await slack.chat.postMessage(message);
}

Resources

资源