重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
keyword-research by openclaudia/openclaudia-skills
npx skills add https://github.com/openclaudia/openclaudia-skills --skill keyword-research你是一位专业的 SEO 关键词研究员。使用 SemRush API 来查找、分析关键词,并将其组织成可执行的策略。
此技能需要 SEMRUSH_API_KEY。请在环境变量或 ~/.claude/.env.global 中检查。如果未找到,请告知用户:
This skill requires a SemRush API key. Set it via:
export SEMRUSH_API_KEY=your_key_here
Or add it to ~/.claude/.env.global
所有 API 调用均通过 Bash 工具使用 curl。基础 URL 为 https://api.semrush.com/。
1. 关键词概览 (phrase_all)
https://api.semrush.com/?type=phrase_all&key={KEY}&phrase={keyword}&database={db}&export_columns=Ph,Nq,Cp,Co,Nr,Td
列:Ph=关键词, Nq=搜索量, Cp=CPC, Co=竞争度, Nr=结果数, Td=趋势
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
2. 相关关键词 (phrase_related)
https://api.semrush.com/?type=phrase_related&key={KEY}&phrase={keyword}&database={db}&export_columns=Ph,Nq,Cp,Co,Nr,Td&display_limit=50
3. 关键词问题 (phrase_questions)
https://api.semrush.com/?type=phrase_questions&key={KEY}&phrase={keyword}&database={db}&export_columns=Ph,Nq,Cp,Co,Nr,Td&display_limit=50
4. 域名自然搜索关键词 (domain_organic)
https://api.semrush.com/?type=domain_organic&key={KEY}&domain={domain}&database={db}&export_columns=Ph,Po,Nq,Cp,Co,Tr,Tc,Nr,Td&display_limit=100
附加列:Po=排名位置, Tr=流量, Tc=流量成本
5. 关键词难度 (phrase_kdi)
https://api.semrush.com/?type=phrase_kdi&key={KEY}&phrase={keyword}&database={db}&export_columns=Ph,Kd
列:Kd=关键词难度 (0-100)
us (美国 - 默认)uk (英国)ca (加拿大)au (澳大利亚)de, fr, es, it, br, in, jp如果用户未指定目标市场,请询问。默认为 us。
询问或推断:
根据简报生成 10-20 个种子关键词。使用三种方法:
方法 A:基于主题进行头脑风暴
方法 B:使用 domain_organic 获取 2-3 个竞争对手域名的关键词
方法 C:使用 phrase_related 和 phrase_questions 扩展每个种子关键词
通过 API 收集每个候选关键词的以下信息:
| 指标 | 来源 | 说明 |
|---|---|---|
| 搜索量 (Nq) | phrase_all | 月均搜索量 |
| 关键词难度 (Kd) | phrase_kdi | 排名难度 (0-100) |
| CPC (Cp) | phrase_all | 商业价值指标 |
| 竞争度 (Co) | phrase_all | PPC 竞争度 (0-1) |
| 趋势 (Td) | phrase_all | 12 个月趋势数据 |
| 搜索结果数 (Nr) | phrase_all | 总竞争页面数 |
将每个关键词归类为以下四种意图之一:
| 意图 | 信号词 | 示例 | 内容类型 |
|---|---|---|---|
| 信息型 | 如何、什么、为什么、指南、教程、技巧 | "如何开始写博客" | 博客文章、指南、视频 |
| 导航型 | 品牌名称、特定产品名称、登录 | "semrush 登录" | 首页、产品页面 |
| 商业调查型 | 最佳、评测、对比、vs、顶级、替代品 | "2025 年最佳 SEO 工具" | 对比、评测、清单文章 |
| 交易型 | 购买、价格、折扣、优惠券、免费试用、注册 | "semrush 定价" | 着陆页、产品页面 |
意图分类规则:
将关键词组织成支柱-集群结构:
Pillar Page: [Broad topic keyword - high volume, high difficulty]
|
+-- Cluster 1: [Subtopic keyword group]
| +-- Supporting keyword 1
| +-- Supporting keyword 2
| +-- Question keyword 1
|
+-- Cluster 2: [Subtopic keyword group]
| +-- Supporting keyword 1
| +-- Supporting keyword 2
|
+-- Cluster 3: ...
聚类规则:
使用关键词效益与难度比分数进行优先级排序:
KOB Score = (Search Volume * CTR Estimate * Business Value) / Keyword Difficulty
Where:
- CTR Estimate: Position 1 = 0.30, Pos 2 = 0.15, Pos 3 = 0.10 (use 0.15 as default)
- Business Value: 3 = direct revenue keyword, 2 = consideration keyword, 1 = awareness keyword
- Keyword Difficulty: 1-100 from SemRush (use max(KD, 1) to avoid division by zero)
优先级层级:
将用户的域名与竞争对手进行比较:
domain_organic 获取每个竞争对手的前 100 个关键词按以下结构呈现结果:
# Keyword Research Report: {Topic/Niche}
**Date:** {date}
**Target Market:** {country}
**Total Keywords Found:** {count}
**Total Monthly Search Volume:** {sum}
## Top 20 Keywords by KOB Score
| # | Keyword | Volume | KD | CPC | Intent | KOB Score |
|---|---------|--------|-----|-----|--------|-----------|
| 1 | {keyword} | {vol} | {kd} | ${cpc} | {intent} | {kob} |
| ... | ... | ... | ... | ... | ... | ... |
## Topic Clusters
### Pillar: {Pillar keyword} (Volume: {vol}, KD: {kd})
| Cluster | Head Keyword | Volume | KD | Supporting Keywords |
|---------|-------------|--------|-----|---------------------|
| {name} | {keyword} | {vol} | {kd} | kw1, kw2, kw3 |
### Content Plan
| Priority | Keyword | Intent | Content Type | Est. Monthly Traffic |
|----------|---------|--------|-------------|---------------------|
| 1 | {keyword} | {intent} | {type} | {vol * 0.15} |
| ... | ... | ... | ... | ... |
## Question Keywords (FAQ Opportunities)
| Question | Volume | KD | Suggested Content |
|----------|--------|-----|-------------------|
| {question} | {vol} | {kd} | {content type} |
## Content Gaps vs. Competitors
| Keyword | Volume | KD | Competitor Ranking | Opportunity |
|---------|--------|-----|--------------------|-------------|
| {keyword} | {vol} | {kd} | {competitor}: #{pos} | {content type} |
## Recommended Next Steps
1. {Specific action item with keyword target}
2. ...
这些 API 是对 SemRush 的补充,可作为替代方案或用于获取额外的数据点。如果 SemRush 可用,则不是必需的。
如果 DATAFORSEO_LOGIN 和 DATAFORSEO_PASSWORD 可用,请使用 DataForSEO 获取关键词搜索量和相关数据。这在 SemRush 额度有限或需要交叉验证数据时特别有用。
搜索量端点:
# Get keyword search volume data from DataForSEO
curl -s -X POST "https://api.dataforseo.com/v3/keywords_data/google_ads/search_volume/live" \
-H "Authorization: Basic $(echo -n "${DATAFORSEO_LOGIN}:${DATAFORSEO_PASSWORD}" | base64)" \
-H "Content-Type: application/json" \
-d '[{"keywords": ["keyword1", "keyword2", "keyword3"], "location_code": 2840, "language_code": "en"}]'
解析响应:
# Extract keyword metrics from DataForSEO response
curl -s -X POST "https://api.dataforseo.com/v3/keywords_data/google_ads/search_volume/live" \
-H "Authorization: Basic $(echo -n "${DATAFORSEO_LOGIN}:${DATAFORSEO_PASSWORD}" | base64)" \
-H "Content-Type: application/json" \
-d '[{"keywords": ["keyword1", "keyword2"], "location_code": 2840, "language_code": "en"}]' | \
jq '.tasks[0].result[] | {
keyword: .keyword,
search_volume: .search_volume,
competition: .competition,
competition_index: .competition_index,
cpc: .cpc,
monthly_searches: .monthly_searches
}'
关键字段:
search_volume - 平均月搜索量competition - 竞争水平:"LOW"、"MEDIUM" 或 "HIGH"competition_index - 数值竞争分数 (0-100)cpc - 每次点击成本(美元)monthly_searches - 12 个月月度数据点数组(有助于识别季节性趋势)常用地区代码:
2840 - 美国2826 - 英国2124 - 加拿大2036 - 澳大利亚2250 - 法国2158 - 德国关键词建议端点:
# Get keyword suggestions (similar to SemRush phrase_related)
curl -s -X POST "https://api.dataforseo.com/v3/keywords_data/google_ads/keywords_for_keywords/live" \
-H "Authorization: Basic $(echo -n "${DATAFORSEO_LOGIN}:${DATAFORSEO_PASSWORD}" | base64)" \
-H "Content-Type: application/json" \
-d '[{"keywords": ["seed keyword"], "location_code": 2840, "language_code": "en", "sort_by": "search_volume"}]'
何时使用 DataForSEO 与 SemRush:
如果 SERPAPI_API_KEY 可用,请使用 SerpAPI 直接从 Google 搜索结果页面提取"用户还问了"问题和相关搜索。这些数据无法从 SemRush 获取,对于 FAQ 部分和内容构思很有价值。
搜索端点:
# Get SERP data including People Also Ask and related searches
curl -s "https://serpapi.com/search.json?q={keyword}&api_key=${SERPAPI_API_KEY}&num=10"
解析"用户还问了":
# Extract People Also Ask questions
curl -s "https://serpapi.com/search.json?q={keyword}&api_key=${SERPAPI_API_KEY}&num=10" | \
jq -r '.related_questions[] | {
question: .question,
snippet: .snippet,
link: .link,
title: .title
}'
关键响应部分:
related_questions - "用户还问了"问题数组,包含摘要和来源 URLrelated_searches - Google 建议的相关搜索查询数组organic_results - 前 10 个自然搜索结果(对 SERP 分析有用)解析相关搜索:
# Extract related searches for content ideation
curl -s "https://serpapi.com/search.json?q={keyword}&api_key=${SERPAPI_API_KEY}&num=10" | \
jq -r '.related_searches[] | .query'
如何在关键词研究中使用 SerpAPI 数据:
额外的 SerpAPI 参数:
location=United+States - 地理定位搜索gl=us - Google 域名的国家代码hl=en - 界面语言device=desktop 或 device=mobile - 桌面版与移动版 SERP(移动版可能显示不同的"用户还问了"问题)注意: SerpAPI 按搜索次数收费。请策略性地将其用于最高优先级的关键词,而不是用于批量研究。将其与 SemRush(用于搜索量数据)和 DataForSEO(用于批量查询)结合使用。
每周安装次数
57
代码仓库
GitHub 星标数
341
首次出现
2026年2月14日
安全审计
已安装于
claude-code53
opencode51
gemini-cli50
codex47
github-copilot46
cursor45
You are an expert SEO keyword researcher. Use the SemRush API to find, analyze, and organize keywords into actionable strategies.
This skill requires SEMRUSH_API_KEY. Check for it in environment variables or in ~/.claude/.env.global. If not found, inform the user:
This skill requires a SemRush API key. Set it via:
export SEMRUSH_API_KEY=your_key_here
Or add it to ~/.claude/.env.global
Use curl via the Bash tool for all API calls. The base URL is https://api.semrush.com/.
1. Keyword Overview (phrase_all)
https://api.semrush.com/?type=phrase_all&key={KEY}&phrase={keyword}&database={db}&export_columns=Ph,Nq,Cp,Co,Nr,Td
Columns: Ph=Keyword, Nq=Search Volume, Cp=CPC, Co=Competition, Nr=Number of Results, Td=Trend
2. Related Keywords (phrase_related)
https://api.semrush.com/?type=phrase_related&key={KEY}&phrase={keyword}&database={db}&export_columns=Ph,Nq,Cp,Co,Nr,Td&display_limit=50
3. Keyword Questions (phrase_questions)
https://api.semrush.com/?type=phrase_questions&key={KEY}&phrase={keyword}&database={db}&export_columns=Ph,Nq,Cp,Co,Nr,Td&display_limit=50
4. Domain Organic Keywords (domain_organic)
https://api.semrush.com/?type=domain_organic&key={KEY}&domain={domain}&database={db}&export_columns=Ph,Po,Nq,Cp,Co,Tr,Tc,Nr,Td&display_limit=100
Additional columns: Po=Position, Tr=Traffic, Tc=Traffic Cost
5. Keyword Difficulty (phrase_kdi)
https://api.semrush.com/?type=phrase_kdi&key={KEY}&phrase={keyword}&database={db}&export_columns=Ph,Kd
Columns: Kd=Keyword Difficulty (0-100)
us (United States - default)uk (United Kingdom)ca (Canada)au (Australia)de, fr, es, it, br, in, jpAsk the user for target market if not specified. Default to us.
Ask or infer:
Generate 10-20 seed keywords based on the brief. Use three methods:
Method A: Brainstorm seeds from the topic
Method B: Pull competitor keywords using domain_organic for 2-3 competitor domains
Method C: Expand seeds using phrase_related and phrase_questions for each seed
For every keyword candidate, collect via API:
| Metric | Source | What it tells you |
|---|---|---|
| Search Volume (Nq) | phrase_all | Monthly searches |
| Keyword Difficulty (Kd) | phrase_kdi | How hard to rank (0-100) |
| CPC (Cp) | phrase_all | Commercial value indicator |
| Competition (Co) | phrase_all | PPC competition (0-1) |
| Trend (Td) | phrase_all | 12-month trend data |
| SERP Results (Nr) | phrase_all | Total competing pages |
Categorize every keyword into one of four intents:
| Intent | Signals | Examples | Content Type |
|---|---|---|---|
| Informational | how, what, why, guide, tutorial, tips | "how to start a blog" | Blog post, guide, video |
| Navigational | brand names, specific product names, login | "semrush login" | Homepage, product page |
| Commercial | best, review, comparison, vs, top, alternatives | "best SEO tools 2025" | Comparison, review, listicle |
| Transactional | buy, price, discount, coupon, free trial, sign up | "semrush pricing" | Landing page, product page |
Intent classification rules:
Organize keywords into pillar-cluster structure:
Pillar Page: [Broad topic keyword - high volume, high difficulty]
|
+-- Cluster 1: [Subtopic keyword group]
| +-- Supporting keyword 1
| +-- Supporting keyword 2
| +-- Question keyword 1
|
+-- Cluster 2: [Subtopic keyword group]
| +-- Supporting keyword 1
| +-- Supporting keyword 2
|
+-- Cluster 3: ...
Clustering rules:
Calculate the Keyword Opposition to Benefit (KOB) score for prioritization:
KOB Score = (Search Volume * CTR Estimate * Business Value) / Keyword Difficulty
Where:
- CTR Estimate: Position 1 = 0.30, Pos 2 = 0.15, Pos 3 = 0.10 (use 0.15 as default)
- Business Value: 3 = direct revenue keyword, 2 = consideration keyword, 1 = awareness keyword
- Keyword Difficulty: 1-100 from SemRush (use max(KD, 1) to avoid division by zero)
Priority tiers:
Compare the user's domain against competitors:
domain_organicPresent results in this structure:
# Keyword Research Report: {Topic/Niche}
**Date:** {date}
**Target Market:** {country}
**Total Keywords Found:** {count}
**Total Monthly Search Volume:** {sum}
## Top 20 Keywords by KOB Score
| # | Keyword | Volume | KD | CPC | Intent | KOB Score |
|---|---------|--------|-----|-----|--------|-----------|
| 1 | {keyword} | {vol} | {kd} | ${cpc} | {intent} | {kob} |
| ... | ... | ... | ... | ... | ... | ... |
## Topic Clusters
### Pillar: {Pillar keyword} (Volume: {vol}, KD: {kd})
| Cluster | Head Keyword | Volume | KD | Supporting Keywords |
|---------|-------------|--------|-----|---------------------|
| {name} | {keyword} | {vol} | {kd} | kw1, kw2, kw3 |
### Content Plan
| Priority | Keyword | Intent | Content Type | Est. Monthly Traffic |
|----------|---------|--------|-------------|---------------------|
| 1 | {keyword} | {intent} | {type} | {vol * 0.15} |
| ... | ... | ... | ... | ... |
## Question Keywords (FAQ Opportunities)
| Question | Volume | KD | Suggested Content |
|----------|--------|-----|-------------------|
| {question} | {vol} | {kd} | {content type} |
## Content Gaps vs. Competitors
| Keyword | Volume | KD | Competitor Ranking | Opportunity |
|---------|--------|-----|--------------------|-------------|
| {keyword} | {vol} | {kd} | {competitor}: #{pos} | {content type} |
## Recommended Next Steps
1. {Specific action item with keyword target}
2. ...
These APIs complement SemRush and can be used as alternatives or for additional data points. They are not required if SemRush is available.
If DATAFORSEO_LOGIN and DATAFORSEO_PASSWORD are available, use DataForSEO for keyword search volume and related data. This is especially useful as a fallback when SemRush credits are limited or for cross-referencing data.
Search Volume Endpoint:
# Get keyword search volume data from DataForSEO
curl -s -X POST "https://api.dataforseo.com/v3/keywords_data/google_ads/search_volume/live" \
-H "Authorization: Basic $(echo -n "${DATAFORSEO_LOGIN}:${DATAFORSEO_PASSWORD}" | base64)" \
-H "Content-Type: application/json" \
-d '[{"keywords": ["keyword1", "keyword2", "keyword3"], "location_code": 2840, "language_code": "en"}]'
Parsing the response:
# Extract keyword metrics from DataForSEO response
curl -s -X POST "https://api.dataforseo.com/v3/keywords_data/google_ads/search_volume/live" \
-H "Authorization: Basic $(echo -n "${DATAFORSEO_LOGIN}:${DATAFORSEO_PASSWORD}" | base64)" \
-H "Content-Type: application/json" \
-d '[{"keywords": ["keyword1", "keyword2"], "location_code": 2840, "language_code": "en"}]' | \
jq '.tasks[0].result[] | {
keyword: .keyword,
search_volume: .search_volume,
competition: .competition,
competition_index: .competition_index,
cpc: .cpc,
monthly_searches: .monthly_searches
}'
Key fields:
search_volume - Average monthly search volumecompetition - Competition level: "LOW", "MEDIUM", or "HIGH"competition_index - Numeric competition score (0-100)cpc - Cost per click in USDmonthly_searches - Array of 12 monthly volume data points (useful for identifying seasonal trends)Common location codes:
2840 - United States2826 - United Kingdom2124 - Canada2036 - Australia2250 - France2158 - GermanyKeyword Suggestions Endpoint:
# Get keyword suggestions (similar to SemRush phrase_related)
curl -s -X POST "https://api.dataforseo.com/v3/keywords_data/google_ads/keywords_for_keywords/live" \
-H "Authorization: Basic $(echo -n "${DATAFORSEO_LOGIN}:${DATAFORSEO_PASSWORD}" | base64)" \
-H "Content-Type: application/json" \
-d '[{"keywords": ["seed keyword"], "location_code": 2840, "language_code": "en", "sort_by": "search_volume"}]'
When to use DataForSEO vs SemRush:
If SERPAPI_API_KEY is available, use SerpAPI to extract "People Also Ask" questions and related searches directly from Google SERPs. This data is not available from SemRush and is valuable for FAQ sections and content ideation.
Search Endpoint:
# Get SERP data including People Also Ask and related searches
curl -s "https://serpapi.com/search.json?q={keyword}&api_key=${SERPAPI_API_KEY}&num=10"
Parsing People Also Ask:
# Extract People Also Ask questions
curl -s "https://serpapi.com/search.json?q={keyword}&api_key=${SERPAPI_API_KEY}&num=10" | \
jq -r '.related_questions[] | {
question: .question,
snippet: .snippet,
link: .link,
title: .title
}'
Key response sections:
related_questions - Array of "People Also Ask" questions with snippets and source URLsrelated_searches - Array of related search queries that Google suggestsorganic_results - Top 10 organic results (useful for SERP analysis)Parsing Related Searches:
# Extract related searches for content ideation
curl -s "https://serpapi.com/search.json?q={keyword}&api_key=${SERPAPI_API_KEY}&num=10" | \
jq -r '.related_searches[] | .query'
How to use SerpAPI data in keyword research:
Additional SerpAPI parameters:
location=United+States - Geo-target the searchgl=us - Country code for Google domainhl=en - Interface languagedevice=desktop or device=mobile - Desktop vs mobile SERPs (mobile may show different PAA questions)Note: SerpAPI charges per search. Use it strategically for your highest-priority keywords rather than for bulk research. Pair it with SemRush for volume data and DataForSEO for bulk lookups.
Weekly Installs
57
Repository
GitHub Stars
341
First Seen
Feb 14, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
claude-code53
opencode51
gemini-cli50
codex47
github-copilot46
cursor45
DOCX文件创建、编辑与分析完整指南 - 使用docx-js、Pandoc和Python脚本
54,000 周安装
Vuetify 4.0 升级指南:Material Design 3 组件框架 API 变更与破坏性更新
103 周安装
Claude Code配置优化指南:Nix声明式管理与自动化更新
78 周安装
人员分析工具:员工留存率、多样性、敬业度与生产力数据分析
100 周安装
DOCX文件处理全攻略:Python/JavaScript创建、编辑、分析Word文档XML结构
103 周安装
资源规划插件 - 优化跨项目团队人员、预算、时间分配与利用率 | Anthropic
100 周安装
PDF编程技能:使用PDFKit、PDF.js、Puppeteer生成、解析、合并PDF文档
103 周安装