Ahrefs automation

From onfire7777/universal-ai-skills-library · View interactive version

Ahrefs automation is an AI agent skill from the GitHub repository onfire7777/universal-ai-skills-library. Automate SEO research with Ahrefs -- analyze backlink profiles, research keywords, track domain metrics history, audit organic rankings, and perform batch URL analysis through the Composio Ahrefs integration.

How to use this skill

Skill file

Ahrefs Automation

Run Ahrefs SEO analytics directly from Claude Code. Analyze backlink profiles, research keywords, track domain authority over time, audit organic keyword rankings, and batch-analyze multiple URLs without leaving your terminal.

Toolkit docs: composio.dev/toolkits/ahrefs


Setup

  1. Add the Composio MCP server to your configuration:

```

https://rube.app/mcp

```

  1. Connect your Ahrefs account when prompted. The agent will provide an authentication link.
  2. Most tools require a target (domain or URL) and a country code (ISO 3166-1 alpha-2). Some also require a date in YYYY-MM-DD format.

Core Workflows

1. Site Explorer Metrics

Retrieve comprehensive SEO metrics for a domain including backlink counts, referring domains, organic keyword rankings, and traffic estimates.

Tool: AHREFS_RETRIEVE_SITE_EXPLORER_METRICS

Key parameters:

Example prompt: "Get Ahrefs site metrics for example.com as of today in the US"


2. Historical Metrics Tracking

Track how a domain's SEO metrics have changed over time for trend analysis and competitive benchmarking.

Tools: AHREFS_RETRIEVE_SITE_EXPLORER_METRICS_HISTORY, AHREFS_DOMAIN_RATING_HISTORY

For full metrics history:

For Domain Rating (DR) history:

Example prompt: "Show me the monthly Domain Rating history for example.com over the last year"


3. Backlink Analysis

Retrieve a comprehensive list of backlinks including source URLs, anchor text, link attributes, and referring domain metrics.

Tool: AHREFS_FETCH_ALL_BACKLINKS

Key parameters:

Example prompt: "Get the top 100 dofollow backlinks to example.com with anchor text and referring DR"


4. Keyword Research

Get keyword overview metrics and discover matching keyword variations for content strategy.

Tools: AHREFS_EXPLORE_KEYWORDS_OVERVIEW, AHREFS_EXPLORE_MATCHING_TERMS_FOR_KEYWORDS

For keyword overview:

For matching terms:

Example prompt: "Find keyword variations for 'project management' in the US with volume and difficulty"


5. Organic Keywords Audit

See which keywords a domain ranks for in organic search, with position tracking and historical comparison.

Tool: AHREFS_RETRIEVE_ORGANIC_KEYWORDS

Key parameters:

Example prompt: "Show all organic keywords where example.com ranks in the top 10 in the US"


6. Batch URL Analysis

Analyze up to 100 URLs or domains simultaneously to compare SEO metrics across competitors or site sections.

Tool: AHREFS_BATCH_URL_ANALYSIS

Key parameters:

Example prompt: "Compare SEO metrics for competitor1.com, competitor2.com, and competitor3.com"


Known Pitfalls


Quick Reference

| Tool Slug | Description |

|---|---|

| AHREFS_RETRIEVE_SITE_EXPLORER_METRICS | Current SEO metrics for a domain/URL |

| AHREFS_RETRIEVE_SITE_EXPLORER_METRICS_HISTORY | Historical SEO metrics over time |

| AHREFS_DOMAIN_RATING_HISTORY | Domain Rating (DR) history |

| AHREFS_FETCH_ALL_BACKLINKS | Comprehensive backlink list with filtering |

| AHREFS_FETCH_SITE_EXPLORER_REFERRING_DOMAINS | List of referring domains |

| AHREFS_GET_SITE_EXPLORER_COUNTRY_METRICS | Country-level traffic breakdown |

| AHREFS_BATCH_URL_ANALYSIS | Batch analysis of up to 100 URLs |

| AHREFS_EXPLORE_KEYWORDS_OVERVIEW | Keyword metrics overview |

| AHREFS_EXPLORE_MATCHING_TERMS_FOR_KEYWORDS | Matching keyword variations |

| AHREFS_EXPLORE_KEYWORD_VOLUME_BY_COUNTRY | Keyword volume across countries |

| AHREFS_RETRIEVE_ORGANIC_KEYWORDS | Organic keyword rankings for a domain |

| AHREFS_RETRIEVE_SITE_EXPLORER_KEYWORDS_HISTORY | Historical keyword ranking data |

| AHREFS_RETRIEVE_TOP_PAGES_FROM_SITE_EXPLORER | Top performing pages by SEO metrics |

| AHREFS_GET_SERP_OVERVIEW | SERP overview for specific keywords |


Powered by Composio

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.