AgentSkillsCN

wayback-oldest

从 Wayback Machine 中找到某个 URL 的最早归档版本。当用户想要查看首次捕获、最古老的归档,或网页的原始版本时,可使用此功能。

SKILL.md
--- frontmatter
name: wayback-oldest
description: Find the earliest archived version of a URL from the Wayback Machine. Use when the user wants to see the first capture, oldest archive, or original version of a webpage.

Find Oldest Wayback Machine Capture

Find the earliest archived snapshot of a URL from the Wayback Machine.

Usage

bash
npx tsx scripts/oldest-newest.ts <url> --oldest-only [options]

Arguments

ArgumentRequiredDescription
urlYesThe URL to search for

Options

OptionDescription
--fullInclude archive URL in output
--jsonOutput as JSON
--no-cacheBypass cache and fetch fresh data from API

Output

Default (compact):

code
1998-12-01 08:00 (9200 days ago)

With --full:

code
📜 OLDEST:
  1998-12-01 08:00 (9200 days ago)
  https://web.archive.org/web/19981201080000id_/https://example.com

Script Execution

bash
npx tsx scripts/oldest-newest.ts <url> --oldest-only

Run from the wayback plugin directory: ~/.claude/plugins/cache/wayback/

CDX API Endpoint

code
https://web.archive.org/cdx/search/cdx?url={URL}&output=json&limit=1&filter=statuscode:200

The limit=1 parameter with default ascending sort returns the oldest capture first.

Caching

CDX API responses are cached for 1 hour. Use --no-cache to bypass.

Related Skills

  • wayback-newest - Find the most recent capture
  • wayback-range - Show both oldest and newest with archive span
  • wayback-list - List all snapshots with pagination