What it does
Ahrefs re-crawls your site on a schedule and recalculates the health score, but the score only helps if someone notices it moving. A release that breaks internal links or adds a redirect chain drops it a few points, and by the time anyone opens Site Audit, the cause is three deploys back.
This skill reads the score from the latest finished crawl every Monday, compares it with last week, and lists the error-level issues that grew or appeared. Developers get the issue names and URL counts; SEO leads get the trend. The score itself is free to read through the API.
How it works
1Read the latest score
GET https://api.ahrefs.com/v3/site-audit/projects?project_id=<id>returnshealth_score,urls_with_errors,urls_with_warnings,total(crawled internal URLs),dateandstatus. This endpoint costs no API units. IfstatusisIn_progress, say so and use the previous finished crawl.2Read last week's score
Call the same endpoint with
dateset to 7 days ago; it returns the crawl at or before that time. Keep itsdatefor the next step.3Find new and growing errors
GET /v3/site-audit/issues?project_id=<id>&date_compared=<last week's crawl date>(50 units per call). Keep issues withimportanceError, and sort bynew(URLs newly affected) andchange.- 4
4Post the tile
Health score is the headline with 8 weeks of history. URLs with errors, crawled URLs and the count of error issues that grew go in the glance; the issue table opens with the card, with the issue most likely tied to a release on top.
Post it to the board
With
BRIEFKIN_TOKENset, the agent sends the result as one card that updates in place every run. Without it, you get the report in the chat.
Install and run it
Pick your agent, where the data comes from and how to schedule it; the commands below follow.
Install the skill
One command. It puts the SKILL.md in ~/.claude/skills and in ~/.agents/skills, which Codex, Cursor, Gemini CLI, Copilot CLI and OpenCode read too.
shell
curl -fsSL https://briefkin.dev/skills/ahrefs-site-audit-health-score/install | shRun it
Ask Claude Code:
prompt
Run the ahrefs-site-audit-health-score skillOr paste the prompt instead of installing:
prompt
Using the Ahrefs API v3, read my Site Audit project with GET /v3/site-audit/projects?project_id=<id>: health_score, urls_with_errors, urls_with_warnings, total, date and status. If the crawl is still in progress, use the previous finished one. Read the same for 7 days ago. Then call /v3/site-audit/issues with date_compared set to last week's crawl date and list Error issues sorted by newly affected URLs. Give me the score and its change, URLs with errors, and the new or growing error issues with URL counts, and say which one is most likely tied to a recent release.Put it on a schedule
Mondays at 9:00, from cron on any machine where Claude Code is signed in:
crontab
0 9 * * 1 claude -p "Run the ahrefs-site-audit-health-score skill"Add it with
crontab -e. A laptop asleep at that time runs it when it wakes if you use launchd or Task Scheduler instead; GitHub Actions works for the API route.Send it to your board
Connect Briefkin once with
curl -fsSL https://briefkin.dev/install | shand every run lands on your board as a stat tile. How setup works
View the SKILL.mdRaw file
SKILL.md---
name: ahrefs-site-audit-health-score
description: "Every Monday: your Ahrefs Site Audit health score from the latest crawl, the change on last week, and the error issues that are new. Use when the user asks for this, or when it runs on a schedule."
---
# Ahrefs site audit health score
Every Monday: your Ahrefs Site Audit health score from the latest crawl, the change on last week, and the error issues that are new.
Ahrefs re-crawls your site on a schedule and recalculates the health score, but the score only helps if someone notices it moving. A release that breaks internal links or adds a redirect chain drops it a few points, and by the time anyone opens Site Audit, the cause is three deploys back.
This skill reads the score from the latest finished crawl every Monday, compares it with last week, and lists the error-level issues that grew or appeared. Developers get the issue names and URL counts; SEO leads get the trend. The score itself is free to read through the API.
## Two ways to get the data
Use the API or MCP route when you have an MCP server, a CLI or an API token for the app. Otherwise, if you can drive a browser the user is signed in to (Claude in Chrome, a Playwright or Chrome DevTools MCP server), use the browser route. Say which one you used.
## Route A: API or MCP server
### What you need
- An Ahrefs plan with API access and a Site Audit project for the site, with its project ID (in the project's URL).
- Ahrefs' remote MCP server (`https://api.ahrefs.com/mcp/mcp`, OAuth or an MCP-scoped key, Lite plan or above, its Site Audit tools) or an API v3 key in `AHREFS_API_KEY` sent as a Bearer token.
If something is missing, say what and stop; do not invent numbers.
### Steps
1. **Read the latest score** (Ahrefs): `GET https://api.ahrefs.com/v3/site-audit/projects?project_id=<id>` returns `health_score`, `urls_with_errors`, `urls_with_warnings`, `total` (crawled internal URLs), `date` and `status`. This endpoint costs no API units. If `status` is `In_progress`, say so and use the previous finished crawl.
2. **Read last week's score** (Ahrefs): Call the same endpoint with `date` set to 7 days ago; it returns the crawl at or before that time. Keep its `date` for the next step.
3. **Find new and growing errors** (Ahrefs): `GET /v3/site-audit/issues?project_id=<id>&date_compared=<last week's crawl date>` (50 units per call). Keep issues with `importance` Error, and sort by `new` (URLs newly affected) and `change`.
4. **Post the tile**: Health score is the headline with 8 weeks of history. URLs with errors, crawled URLs and the count of error issues that grew go in the glance; the issue table opens with the card, with the issue most likely tied to a release on top.
## Route B: the browser
### What you need
- Signed in to Ahrefs with a user in the workspace that owns the Site Audit project; any member who can open the project can read it.
If something is missing, say what and stop; do not invent numbers.
### Steps
Start at https://app.ahrefs.com/site-audit. The user is signed in already; never type passwords or codes, and ask if a sign-in page appears.
1. **Open the project's Overview**: The URL lists your Site Audit projects; open the one for the site. The **Overview** shows Health Score, the crawl date, crawled URLs and URLs with errors. If the latest crawl is still running, switch the crawl picker at the top to the previous finished one.
2. **Read last week's score**: The Health Score chart on the Overview plots every crawl; hover the point from about 7 days ago and note its score and date. That crawl is the comparison for the issues step.
3. **Find new and growing errors**: Open **All issues**, filter importance to **Errors**, and set the comparison to last week's crawl so the table shows the change per issue. Sort by the new or changed column and keep the issues that appeared or grew, with their URL counts.
4. **Write the report**: Score with its change, URLs with errors, crawled URLs, the crawl date, and the issue table with the one most likely tied to a recent release on top (new 404s and broken internal links usually point at a deploy).
Note: The browser route is the easier one here: the Overview already shows the score and its history, and no API units are spent. The score only moves when a crawl finishes, so a flat number with an old crawl date means the project is not re-crawling. Ahrefs renames report tabs now and then; look for Overview and All issues inside Site Audit.
## The report
- **Health score** from the latest finished crawl, with an 8-week trend.
- **URLs with errors** and crawled URLs.
- **Error issues** that are new or grew since last week, with URL counts.
- The crawl date, so a stale crawl is obvious.
## Post it to Briefkin
When `BRIEFKIN_TOKEN` is set, or `~/.config/briefkin/env` exists (the installer from https://briefkin.dev/docs writes it), also send the result to the user's Briefkin board as one card. Keep the `item_key` the same on every run so the card updates in place, use a new `event_id` per run, and put today's real numbers in place of the example ones. If the request fails, say so once and carry on.
```bash
[ -n "${BRIEFKIN_TOKEN:-}" ] || . ~/.config/briefkin/env
curl -sS -X POST "${BRIEFKIN_URL:-https://briefkin.dev}/v1/events" \
-H "authorization: Bearer $BRIEFKIN_TOKEN" \
-H "content-type: application/json" \
-d @- <<'JSON'
{
"v": 1,
"event_id": "ahrefs-site-audit-health-score/<date of this run, e.g. 2026-10-16>",
"item_key": "ahrefs-site-audit-health-score",
"project": "example.com",
"source": "Ahrefs site audit health score skill",
"kind": "metric",
"title": "Health score down 3 points to 87",
"metric": {
"label": "Health score",
"value": 87,
"better": "higher",
"period_start": "<start of the period, ISO 8601>",
"period_end": "<end of the period, ISO 8601>"
},
"glance": {
"type": "Grid",
"props": {
"columns": 3
},
"children": [
{
"type": "Stat",
"props": {
"label": "URLs with errors",
"value": 214,
"delta": 33,
"better": "lower"
}
},
{
"type": "Stat",
"props": {
"label": "Crawled URLs",
"value": 1642
}
},
{
"type": "Stat",
"props": {
"label": "Error issues growing",
"value": 3,
"tone": "warn"
}
}
]
},
"widget": [
{
"type": "Table",
"props": {
"columns": [
"Issue",
"URLs",
"New this week"
],
"align": [
"left",
"right",
"right"
],
"rows": [
[
"Page has links to broken page",
96,
54
],
[
"404 page",
38,
31
],
[
"Canonical points to redirect",
22,
0
],
[
"Title tag missing or empty",
9,
2
]
]
}
},
{
"type": "Callout",
"props": {
"text": "31 new 404s are all under /help/; 54 pages link to them. Likely the help center move on Wednesday.",
"tone": "warn"
}
}
],
"size": "md"
}
JSON
```
Widgets come from the Briefkin catalog (https://briefkin.dev/v1/catalog). Without a token, just give the user the report.
Set `period_start` and `period_end` to the window the number covers: the tile names it from them ("Last 7 days", "Today", "This month"). For a count right now (open items, a balance), send `"period_label": ""` so no period shows; for another name, send it as `period_label` (at most 24 characters).
## Run it on a schedule
Suggested: Mondays at 9:00 (`0 9 * * 1`). From cron, with the agent signed in on that machine:
```bash
0 9 * * 1 claude -p "Run the ahrefs-site-audit-health-score skill"
# Codex: codex exec, Gemini CLI: gemini -p, Copilot CLI: copilot -p, OpenCode: opencode run
```
Or use the agent's own scheduler (Claude Code routines, Codex automations, Claude or ChatGPT scheduled tasks): https://briefkin.dev/skills/ahrefs-site-audit-health-score#schedule
Source: https://briefkin.dev/skills/ahrefs-site-audit-health-score
What your agent needs
An Ahrefs plan with API access and a Site Audit project for the site, with its project ID (in the project's URL).
Ahrefs' remote MCP server (
https://api.ahrefs.com/mcp/mcp, OAuth or an MCP-scoped key, Lite plan or above, its Site Audit tools) or an API v3 key inAHREFS_API_KEYsent as a Bearer token.
Connecting Ahrefs
- Ahrefs MCP server, Ahrefs' official remote server at
https://api.ahrefs.com/mcp/mcp. In Claude, add Ahrefs from the connector directory and sign in to your workspace with OAuth (setup guide). For Claude Code, Codex or Cursor, use the same URL with an MCP key from Account settings > API keys ("Generate MCP key"). - API v3 with a key. Call
https://api.ahrefs.com/v3/...withAuthorization: Bearerand the key fromAHREFS_API_KEY. Whether you get API access, and how many units, depends on your Ahrefs plan.
These reports only read data, so the thing to manage is unit spend: keep limit low and schedule weekly rather than hourly.
Questions
How often does the score change?
Only when Ahrefs finishes a crawl, on the schedule set in the Site Audit project (weekly is common). If the crawl date on the card does not move, the project is not re-crawling; check its schedule in Ahrefs before reading anything into a flat score.
What does it cost in API units?
Reading the project and its health score is free. The issues call costs 50 units, so one weekly run with a comparison costs 50 units, well inside any plan with API access.
Do I need Briefkin to use the Ahrefs site audit health score skill?
No. The skill runs with your own agent and gives you the report in the chat. With a Briefkin token set, each run also posts it to your board as a stat tile, so you can glance at it instead of asking again.
Which agents can run it?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot CLI, OpenCode, Windsurf and Amp all read SKILL.md files. The install command puts it in ~/.claude/skills and ~/.agents/skills, where they look. ChatGPT, the Claude app and Grok take the prompt instead. Pick your agent under "Install and run it" and the commands change to match.
Can it work without an API or MCP server, from my browser?
Yes. Switch the data source to "Your browser" and the steps change to the Ahrefs pages themselves: the agent opens app.ahrefs.com/site-audit in a browser you are signed in to and reads the numbers off the page. Claude Code, Codex, Cursor, Claude app and ChatGPT can drive a browser out of the box; Gemini CLI, Copilot CLI and OpenCode need a Playwright or Chrome DevTools MCP server first. It is slower than the API and needs you signed in, so it suits a report you run by hand or from a scheduler on your own computer.