/croftweaver:outgoing-link-auditfrom Croftweaver
Audits all external links on an Astro site by building the site, extracting hrefs, and fetching each to classify as OK, REDIRECT, REBRAND, or DEAD. Run monthly or before releases to catch link rot.
Ships in Croftweaver. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Links to other people's sites rot: companies rebrand, move domains, or shut down.
The offline test gate (tests/links.spec.ts) can only catch domains you already
know are dead. This skill is the active sweep that discovers the rot.
Read-only with respect to the site: it diagnoses and reports. You apply fixes (and add any newly-dead domain to the test) only after the user confirms.
Monthly, or before a notable release / before launch. It hits third-party servers,
so it is deliberately not part of CI (npm test must stay hermetic and offline).
If the build has no outgoing anchors there is nothing to audit — say so and stop:
cd "$(git rev-parse --show-toplevel)"
[ -d dist ] || npm run build >/dev/null
SITE_HOST=$(grep -oE "site:[[:space:]]*['\"]https?://[^'\"]+" astro.config.mjs \
| sed -E "s#.*://(www\.)?##; s#/.*##" | head -1)
grep -rhoE '<a [^>]*href="https?://[^"]+"' dist --include='*.html' \
| grep -oE 'href="https?://[^"]+"' | sed -E 's/^href="//; s/"$//' \
| grep -vE "://(www\.)?${SITE_HOST}(/|$|:)" | sort -u | wc -l
scripts/check_external_links.sh already builds, extracts, fetches and prints the
grouped report (DEAD / REDIRECT / UNVERIFIED / OK). Run it first:
bash scripts/check_external_links.sh
Then apply judgment to its output (the bit a script can't do — see the box in step 2) and do step 4 (fixes). The procedure below explains what the script does and is the manual fallback.
Audit the built output so it matches exactly what Cloudflare serves. The script
derives your own host from site: in astro.config.mjs and excludes it; everything
else absolute and http(s) from an <a href> is an outgoing link. To keep "which
page is this on?" for the report, run grep -rl "<url>" dist per finding.
Use a real browser User-Agent — several hosts return 403 to a bare curl. Follow redirects but record the final URL and status. Classify each result:
200 and the final host is the same registrable domain.200 but final host differs only by www/scheme/trailing path.
Usually harmless; note it, low priority.200 but the final host is a different domain. This is
the high-value finding: update the link to the new canonical URL.4xx, 5xx, connection error, or timeout. Re-check once (could be
transient); if it stays dead, flag for removal/replacement.Judgment, not just codes: a
403/429can mean "bot-blocked", not "dead" — try a second UA or note it as unverified rather than calling a live page dead. A200that lands on a parked / "for sale" page is effectively dead even though the code is green. Use the model for these calls; let the script do the fetching.
Group findings by severity. For each: the URL, the classification, the final URL (if changed), and the source page(s). Lead with REBRAND + DEAD (the actionable ones); list OK as a count.
For each REBRAND/DEAD link, after the user confirms:
src/pages/*.astro or a content collection
entry). Use the new canonical URL.tests/links.spec.ts → STALE_DOMAINS with the reason, so it can never be
re-introduced. This is how the offline guard stays current — the audit feeds it.npm run build && npm test to confirm green, then commit.dist/ is the build of src/, which is
what Cloudflare serves and what we fetch from..html hops) is already covered by the
navigation + seo specs in website-qa — this skill is external links only.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub karero/croftweaver --plugin croftweaver40 skills in this plugin
/ai-seoWhen the user wants to optimize content for AI search engines, get cited by LLMs, or appear in AI-generated answers. Also use when the user mentions 'AI SEO,' 'AEO,' 'GEO,' 'LLMO,' 'answer engine optimization,' 'generative engine optimization,' 'LLM optimization,' 'AI Overviews,' 'optimize for ChatGPT,' 'optimize for Perplexity,' 'AI citations,' 'AI visibility,' 'zero-click search,' 'how do I show up in AI answers,' 'LLM mentions,' or 'optimize for Claude/Gemini.' Use this whenever someone wants their content to be cited or surfaced by AI assistants and AI search engines. For traditional technical and on-page SEO audits, see seo-audit. For structured data implementation, see schema-markup./astro-i18n-setupTurn a new-website scaffold into a turnkey multi-language site: Astro i18n routing (clean default locale + prefixed others), self-referencing hreflang + x-default in the Base layout, i18n sitemap alternates, a language switcher, and the test-harness changes that keep the green-from-commit-1 gate honest across locales. Run at scaffold time when new-website Q4 = "two+ languages at launch", OR later to add a second language to a single-locale site whose default stays unprefixed (phased rollout). Trigger phrases: "multi-language site", "add i18n", "DE+EN site", "internationalization", "hreflang setup", "two languages at launch".
Other plugins' skills for the same job