ahrefs-seo
Skill1 starsChanged 2 months agoMITView on GitHub
Pull raw SEO data from Ahrefs for any domain — organic keywords, top pages, backlinks, referring domains, Domain Rating, traffic history, anchors, organic competitors, keyword volumes — through the Ahrefs MCP server or a script fallback, while keeping API-unit spend under control. Use when someone asks for a domain's organic traffic, backlinks, SEO metrics of a competitor, or keyword volumes. Triggers: "check in Ahrefs", "organic traffic of X", "backlinks of X", "keyword volumes".
- Reads credentials
In this repository10 other files it gives its agents.
- ads-parserSkill
- ads-video-librarySkill
- competitor-researchSkill
- connectSkill
- funnel-screenshotsSkill
- ga4-reportsSkill
- image-genSkill
- motion-cardSkill
- parallel-researchSkill
- plain-copySkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Call the doc tool before the first use of any tool.
- Distinctive: line 15
Every money value is in USD cents — divide by 100.
- Very specific: line 16
If a response carries render_with metadata, call that render tool with the data.
- Very specific: line 49
Every call costs at least 50 units, and fields are billed per row.
- Very specific: line 50
Check remaining units (subscription-info-limits-and-usage) before a long series of calls.
- Very specific: line 60
Put the volume floor into where — only kept rows are billed.
- Very specific: line 65
Keep a domains.json with your own domain and your competitors, so "compare us with the usual three" needs no lookups.
- Distinctive: line 66
If you run the same SEO snapshot monthly, turn the calls into a fixed script and keep the agent for interpreting changes — a stable report …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Ahrefs SEO data
Ahrefs data through the official Ahrefs MCP server, with an optional script for API v3 keys. Every call spends API units from your Ahrefs plan (MCP needs a paid plan, Lite or higher). Setup: connections/ahrefs-mcp.md, or run the connect skill.
Path 1 — the Ahrefs MCP server (default)
Tools are named mcp__ahrefs__*. If they aren't loaded, search for them (for example "ahrefs organic keywords"); if the server isn't connected, send the user to connections/ahrefs-mcp.md. Server rules:
- Call the
doctool before the first use of any tool. - Every money value is in USD cents — divide by 100.
- If a response carries
render_withmetadata, call that render tool with the data. - Save what matters: write each response you will quote to
raw/seo/<name>.json.
Path 2 — API v3 script (Enterprise API keys only)
For repeatable pulls with an API v3 key (AHREFS_API_KEY):
python3 ${CLAUDE_SKILL_DIR}/scripts/ahrefs_api.py site-explorer/organic-keywords target=example.com date=2026-09-30 \
select=keyword,sum_traffic,best_position limit=100 order_by=sum_traffic:desc --out raw/seo/kw.jsonThe endpoint path is the MCP tool name with the first dash turned into a slash. MCP keys and API v3 keys are not interchangeable — the wrong one returns 401. Don't write your own client for the MCP endpoint: Ahrefs' terms don't permit scripts that call it directly; scripted access goes through API v3.
Recipes (tool names as of 2026 — verify with tools)
| Task | Tool |
| DR and summary metrics | site-explorer-domain-rating, site-explorer-metrics |
| Organic keywords (top by traffic) | site-explorer-organic-keywords (order by traffic, limit<=150) |
| Top pages by organic traffic | site-explorer-top-pages |
| Referring domains, backlink summary | site-explorer-referring-domains, site-explorer-backlinks-stats |
| Anchors | site-explorer-anchors |
| Traffic and keyword history | site-explorer-metrics-history, site-explorer-keywords-history |
| Organic competitors | site-explorer-organic-competitors |
| Organic traffic by country | site-explorer-metrics-by-country |
| SERP for a keyword | serp-overview |
| Keyword ideas | keywords-explorer-matching-terms, keywords-explorer-related-terms |
| Keyword volume and difficulty | keywords-explorer-overview |
| Units left this month | subscription-info-limits-and-usage (free) |
Hard rules
- Every call costs at least 50 units, and fields are billed per row.
limit<=150per call by default. Never pull raw backlinks by the thousand —site-explorer-all-backlinksis the most expensive tool; start with stats and referring domains. - Check remaining units (
subscription-info-limits-and-usage) before a long series of calls. - Don't trust Ahrefs paid-traffic and ad-budget estimates, and don't put them in reports. They are systematically off. Mentioning that a domain has paid keywords is fine; dollar figures are not.
- Save raw responses with
--outnext to the analysis. Numbers in a report must be checkable against raw files.
Keyword research costs
Large keyword pulls are where units disappear. Read references/unit-costs.md before pricing more than a few dozen keywords. The short version:
- Volume-type fields (
volume,global_volume,difficulty,traffic_potential,parent_volume) cost about 10 units per row each;keywordalone costs about 1. Select only the field you need. - Discover with
select=keywordfirst, then price only the shortlist. - Put the volume floor into
where— only kept rows are billed. - Send pricing calls sequentially, in batches of 2–5 keywords.
Adapt it
- Keep a
domains.jsonwith your own domain and your competitors, so "compare us with the usual three" needs no lookups. - If you run the same SEO snapshot monthly, turn the calls into a fixed script and keep the agent for interpreting changes — a stable report doesn't need an agent every time.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

