ai-crawler-analyticslisted
Install: claude install-skill StovBuilds/ai-crawler-analytics
# AI crawler analytics
Turn a Cloudflare zone's analytics into an honest picture of AI crawler activity, and show it as a
dashboard (an Artifact in claude.ai, or the static page in `dashboard/` in Claude Code).
## 1. Get the data
**In Claude Code (or anywhere with a shell and Node 18+):**
1. Ask the user for a Cloudflare API token with **only** `Zone > Analytics > Read` (plus
`Zone > Zone > Read` if they want to pass a domain instead of a zone id), scoped to the one zone.
Never ask for a Global API Key, and never write the token into a file in the repo.
2. Run, from this repo:
```
CF_API_TOKEN=<token> node bin/fetch.mjs --zone <domain> --days 7 --sitemap auto --out /tmp/ai-crawlers.json
```
Add `--exclude-ip` for the user's own servers and `--exclude-ua` for a tag their own uptime
checks carry, if they have them. If `--sitemap auto` reports 0 paths, ask for the sitemap URL.
3. Read the JSON. Then either open `dashboard/index.html` with it as `dashboard/data.json`
(`npm run dashboard`), or build an Artifact from it (step 2).
**In claude.ai (no shell):** you cannot call the Cloudflare API from here. Ask the user to either
run the command above on their machine and paste the JSON, or paste the output of the GraphQL query in
`docs/manual-query.md` (Cloudflare dashboard > Analytics > GraphQL explorer, or curl). If they paste
raw GraphQL rows, classify them yourself using `data/ai-crawlers.json` and the rules in section 3.
Never invent numbers: if they