Capafy
Empezar
Dead Link Checker That Avoids False Positives

Dead Link Checker That Avoids False Positives

Turn URLs and saved-login notes into an ALIVE / DEAD / UNDETERMINED table; handles SPA 200s, 403 blocks, soft 404s. #Ingeniería

Valoración
Se necesitan más valoraciones
Vendidos
0
Cómo se usa
Descargar

You paste: a list of URLs and notes about saved login sessions (cookie names, flags and dates, never values).
You get: an ALIVE / DEAD / UNDETERMINED table with evidence and next step, plus curl or Playwright probes to run for the unclear ones.

How it works

Link and Session Liveness Checker is for the case where your link checker says everything is fine (or everything is dead) and you do not trust it. It reads what you observed and sorts each link or saved session into ALIVE, DEAD or UNDETERMINED with the reason.

Phase 1 — Evidence. Status, key headers and a body snippet for each URL; names, flags and dates (never values) for saved sessions.

Phase 2 — Classify. SPA that answers 200 for any path, 403/429/challenge pages as UNDETERMINED, login redirects, soft 404s, HEAD vs GET differences.

Phase 3 — Probes. Safe curl or Playwright snippets with decision rules, including an authenticated request to a logged-in-only page for sessions.

Phase 4 — Table. Verdict, evidence, confidence and next step per item, with pacing guidance so you do not hammer a site.

Sample output

Output from running this Skill on a sample problem:

## Evidence

- #: 1
  Item: docs…/guide/setup
  Observed: 200, 1840 bytes, `<div id="root"></div>` shell
  Marker: none
- #: 2
  Item: shop…/p/blue-mug
  Observed: 200, same final URL
  Marker: "Blue Mug" present
- #: 3
  Item: blog…/2023/old-post
  Observed: 404, body "Page not found"
  Marker: n/a
- #: 4
  Item: api…/v1/status
  Observed: 429, `Retry-After: 120`
  Marker: n/a
- #: 5
  Item: news…/archive
  Observed: 200, title "Example News", body "This article is no longer available"
  Marker: none
- #: A
  Item: dashboard.example.com
  Observed: `sid` (HttpOnly, Secure) expires 2027-03-01; `_ga`; verified 2 weeks ago
  Marker: "Sign out" on `/account`
- #: B
  Item: portal.example.org
  Observed: `sid` session-only; verified 3 months ago
  Marker: no logged-in URL or marker

## Verdicts

- Item: 1 docs setup
  Verdict: UNDETERMINED
  Evidence: 200 with an empty JS shell. A status code from an SPA proves nothing.
  Confidence: unconfirmed
  Next step: Pick a marker, then run Case C, and Case D if needed
- Item: 2 shop blue-mug
  Verdict: **ALIVE**
  Evidence: 200, no redirect, marker "Blue Mug" present
  Confidence: confirmed
  Next step: None
- Item: 3 blog old-post
  Verdict: **DEAD**
  Evidence: Real 404 with a not-found body
  Confidence: confirmed
  Next step: Replace or remove the link
- Item: 4 api status
  Verdict: UNDETERMINED (blocked, not dead)
  Evidence: 429 rate limit, `Retry-After: 120`
  Confidence: unconfirmed
  Next step: Wait at least 120 s, then send one GET
- Item: 5 news archive
  Verdict: **DEAD (likely)**
  Evidence: The body phrase "This article is no longer available" is the evidence.
    Going by status 200 alone, this would have been counted as alive.
  Confidence: likely
  Next step: Replace or remove. If the archive moved, find the new URL.
- Item: A dashboard
  Verdict: UNDETERMINED
  Evidence: The 2027-03-01 date is only what the cookie *claims*. It is not the
    server's session lifetime. `_ga` is analytics and doesn't matter here.
  Confidence: unconfirmed
  Next step: Run Case E once
- Item: B portal
  Verdict: UNDETERMINED
  Evidence: No logged-in URL or marker to test against. A session-only `sid` can
    last days, but 3 months unverified makes expiry plausible. That is a guess, not
    a verdict.
  Confidence: unconfirmed
  Next step: Supply a logged-in-only URL and marker, then run Case E

## Probes to run

**#1: control-path test**, once for this host:
curl -sS -o real.html -w 'real=%{http_code} %{size_download}\n'
'https://docs.example.com/guide/setup'
sleep 2
curl -sS -o fake.html -w 'fake=%{http_code} %{size_download}\n'
'https://docs.example.com/this-path-should-not-exist-7f3a'
cmp -s real.html fake.html && echo IDENTICAL || echo DIFFERENT
The result will almost certainly be IDENTICAL for a `#root` shell. In that case,
render the page:
`node probe.js 'https://docs.example.com/guide/setup' '<setup-page-heading>'`
Use a heading or sentence that appears only on the setup guide.

**#4: one GET, at least 120 s after the 429:**
curl -sS -D - -o status.json --max-time 20 'https://api.example.org/v1/status'
If it returns 2xx with the expected body (for example a `"status"` field you know),
it is ALIVE. If it returns another 429, stop for this run.

**A: authenticated check.** This sends one request and doesn't print any cookie
values:
curl -sS -L --max-time 20 --max-redirs 3 -b ~/sessions/dash.txt -c
~/sessions/dash.txt \
  -o me.html -w 'status=%{http_code} final=%{url_effective}\n'
  'https://dashboard.example.com/account'
grep -c 'Sign out' me.html
- **ALIVE:** final URL is `/account` and the count is at least 1.
- **DEAD:** the request bounces to a login page, or returns 401. Log in again in a
  normal browser and re-export the cookies.
- **UNDETERMINED:** 403 or a challenge page.

The `-c` flag saves rotated cookies. Drop it if you don't want the file rewritten.

**B: blocked on missing info.** I need two things from you:
- `<logged-in-only-url>`, for example an account or settings page
- `<logged-in-only-marker>`, for example a logout link or your account name. Don't
  use "Log in".

Then run Case E with `~/sessions/portal.txt`. A curl-style cookie file *may* not
hold a session-only cookie at all. So if the probe shows a logged-out page, the
cause may be the file rather than the server. Check that a `sid` line exists in the
file, without printing its value: `grep -c 'sid' ~/sessions/portal.txt`.

## Notes

- **Pacing:** one probe per URL. The only extra is the single control request for
  docs.example.com. Leave 2 s or more between requests to the same host and about 1
  s across hosts.
- **api.example.org:** paused until its `Retry-After` has passed. Don't retry it in
  a loop.
- **Cookie dates vs. results:** trust the observed Case E result over any cookie
  date.
- **Re-check cadence:** sessions at most daily, links weekly.

Use cases

  • Cleaning dead links out of docs, a blog or a link list
  • Checking whether a saved login session still works
  • Telling a bot block from a dead page
  • Avoiding the trap of trusting a cookie's expiry date

FAQ

Do I paste my cookies? No. Paste names, flags and dates only; the Skill tells you to redact values.

Does it get around blocks? No. Changing a User-Agent is only a diagnostic aid; a deliberate block is reported as UNDETERMINED.

Does it call the sites? The Skill itself makes no network calls. The probes it writes run on your machine with curl or Playwright, and you paste the results back; use it only on links and accounts you own or may test. It sends one probe per URL, plus one control request per host for single-page apps.

Anthropic, Claude Code, OpenAI, Codex, OpenClaw and Playwright are trademarks of their respective owners. This Skill is an independent product and is not affiliated with, endorsed by or sponsored by them.