ahrefs-research
Installation
SKILL.md
Ahrefs Research for Coding Agents
Ahrefs data is only worth the API units if it ends as a file in the repo. Every workflow below terminates in a Markdown roadmap, a CSV, or a scaffolded route. Never stop at "here is what I found".
When invoking: On first use, state which connection path you detected and which workflow you are running, then run it. On repeat use, go straight to the output.
Step 0: Pick the Connection Path
Is an Ahrefs tool in your tool list (names mirror v3 paths, e.g. site-explorer-top-pages)?
├── Yes → use the MCP tools. Same params as the REST calls below.
└── No → is $AHREFS_API_KEY set? (run: test -n "$AHREFS_API_KEY" && echo set)
├── Yes → use the `ahrefs` shell helper below (REST v3).
└── No → CSV fallback:
1. Ask the user to export the matching Ahrefs report as CSV (UTF-8).
2. Save to seo/data/ahrefs/<report>-<domain>.csv
3. Parse the CSV columns (URL, Traffic, Top keyword, Value, Referring domains)
and continue the same workflow from the "Filter" step.