Publication link audit

From AtlasOmnia/hermes-custom-pack · View interactive version

Publication link audit is an AI agent skill from the GitHub repository AtlasOmnia/hermes-custom-pack. publication-link-audit — Verify every outbound URL in a Reddit post, megathread, guide, wiki page, or README before publication. Detects transcribed IDs, GitHub filename drift, and HuggingFace repo naming mismatches that HTTP status codes alone miss.

How to use this skill

Skill file

Publication Link Audit

Use this when the user has a Reddit post, megathread, guide, wiki page, or any README that is about to be published — and needs every outbound URL verified before going live. Also use when a published post is reported to have broken links.

This skill exists because HTTP 200 is necessary but not sufficient: a link can return 200 and still resolve to the wrong destination when the URL's opaque identifier was transcribed incorrectly.

When to use

Use when:

Do not use for:

The three failure modes

Mode 1: Reddit post-ID transcription errors

Reddit post IDs are 7-character opaque alphanumeric strings. A single transposed character produces a different thread entirely — not a 404.

Symptom: The link labeled "Model Civil War" opens a post about an unrelated topic. HTTP status is 200; the label lies.

Detection pattern: Extract the page's <title> tag for every Reddit URL. Compare the title against the surrounding link text. Any mismatch means the ID is wrong.

Example from production:

Fix: Search the target subreddit with the intended label as query; extract the correct post ID from search results.

Mode 2: GitHub dot-vs-no-dot filename drift

Repository filenames can differ by character class in ways invisible in review: qwen3.6-combined.md vs qwen36-combined.md, or main vs master.

Complication: requests.head() can return 404 for a valid GitHub URL where curl -sL (follow-redirect GET) returns 200. Different HTTP methods produce different status codes.

Detection pattern:

  1. Verify with curl -sL -w "%{http_code}" or browser navigation — not HEAD alone.
  2. If a GitHub URL 404s on HEAD, retry with GET before declaring broken.
  3. If still 404, browse the repo's megathreads/ (or equivalent) directory listing to find the actual committed filename.

Mode 3: HuggingFace repo-name prefix drift

Some HF authors use a Huihui- prefix in one repo but bare Qwen3.6-... in another; some always suffix with -GGUF, others don't. A 100-character repo URL can be wrong in a single hyphen.

Detection pattern: For each author in the document, query the HF API to list their actual repos:

requests.get("https://huggingface.co/api/models?author=<name>&search=<keyword>")

Match the exact modelId from the result — don't reconstruct URLs from guesses.

Public repos return 200 on HEAD; private/misspelled repos return 401 or 404.

Workflow

  1. Extract. Pull every URL from the document (regex: https?://[^\s\)\]<>]+). Group by host:
  1. Pair. For each URL, note the surrounding text that claims what it links to. The label-URL pairing is what you'll verify.
  1. Verify reachability (host-specific):

| Host | Method | Notes |

|---|---|---|

| Reddit (old.reddit.com) | requests.head with browser UA; batch ≤8 concurrent requests | Sequential is safer. www.reddit.com triggers bot-protection pages more aggressively than old.reddit.com. Expect 429s under parallel load — these are not broken links. |

| HuggingFace | requests.head (no auth needed for public repos; 401/404 = repo ID wrong) | Use the /api/models/<owner>/<repo> endpoint for metadata. |

| GitHub | curl -sL -w "%{http_code}" (GET, follow redirects) | HEAD is unreliable — see Mode 2. |

  1. Verify content matches label. This catches Mode 1 and is the only step that finds transposed IDs:
  1. Resolve failures. For every 404/401/mismatch, run a targeted search to find the correct URL:
  1. Produce a final table — one row per URL with: URL, status code, label match (✓/✗), corrective action (if any).

Rate-limit and method gotchas

Checklist (use before declaring "all links verified")

Pitfalls

  1. Trusting HTTP status alone. A 200 from a transcribed post ID gives a false sense of security. The label-vs-content check is the real verification.
  1. Stopping at HEAD for GitHub. GitHub's blob endpoint can legitimately return 404 on HEAD and 200 on GET. Use GET.
  1. Treating Reddit 429 as broken. Parallel requests.head to Reddit will get 429s. These are rate-limits, not missing pages. Retry.
  1. Reconstructing HF URLs from partial recall. Don't guess huihui-ai/Qwen3.6-35B-A3B-abliterated from memory — query the HF API to get the exact modelId. Prefix drift, capitalization, and -GGUF suffixes are unreliable.
  1. Assuming post IDs are stable. Reddit post IDs are permanent. But transcribing them from handwritten lists or chat history is where errors creep in. Verify every single one.
  1. Skipping the "label matches content" step. This is the most valuable step and the one most likely to be skipped because it's the slowest. It is the step that catches Mode 1, which is the highest-impact failure mode.
  1. Bulk-parallel without stagger. Batching 45 HF URLs in one parallel call is fine. Batching 45 Reddit URLs in one parallel call is not — you'll get 429 floods and lose signal.
  1. Publishing before verification passes. If any URL fails both reachability and label match, do not publish. Fix first, verify again, then publish.
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.