GI

github-wayback-recovery

Recover lost GitHub content by querying web archives. Useful when a repository or specific page has been deleted from GitHub.

Install

mkdir -p .claude/skills/github-wayback-recovery && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/6362" && unzip -o skill.zip -d .claude/skills/github-wayback-recovery && rm skill.zip

Installs to .claude/skills/github-wayback-recovery

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Recover deleted GitHub content using the Wayback Machine and Archive.org APIs. Use when repositories, files, issues, PRs, or wiki pages have been deleted from GitHub but may persist in web archives. Covers CDX API queries, URL patterns, and systematic recovery workflows.
271 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Advanced

Key capabilities

  • Queries Internet Archive CDX API for snapshot records
  • Constructs recovery URLs for deleted GitHub assets
  • Identifies archived wiki and issue metadata
  • Locates historic states of repositories

How it works

Queries web archive indexes to find previously captured snapshots of public GitHub pages that no longer exist on the live platform.

Inputs & outputs

You give it
URL of the deleted GitHub repository or resource
You get back
URLs to snapshots or recovered content text

When to use github-wayback-recovery

  • Accessing a README from a deleted repository
  • Retrieving deleted issue comments or PR descriptions
  • Investigating the historical state of a repository
  • Finding forks of deleted projects via archived links

About this skill

GitHub Wayback Recovery

Purpose: Recover deleted GitHub content (README files, issues, PRs, wiki pages, repository metadata) from the Internet Archive's Wayback Machine when content is no longer available on GitHub.

When to Use This Skill

  • Repository has been deleted and you need README, wiki, or metadata
  • Issues or PRs were deleted by author, maintainer, or moderation
  • Need to recover file contents that may have been archived
  • Investigating historical state of a repository
  • Finding forks of deleted repositories via archived network pages
  • Recovering release notes or documentation from deleted projects

Complementary Skills:

  • github-archive: For structured event data (who did what, when) - always check first
  • github-commit-recovery: For accessing commits when you have SHAs
  • github-wayback-recovery (this skill): For web page snapshots when content is fully deleted

Core Principles

Wayback Machine Archives Web Pages, Not Git Repositories:

  • Cannot git clone from archived content
  • Cannot reconstruct full commit history
  • Recovery success depends on whether specific URLs were crawled

What CAN Be Recovered:

  • README files and repository descriptions
  • Issue titles, bodies, and comments (Archive Team prioritizes these)
  • PR conversations and descriptions (Files Changed tab often fails)
  • Wiki pages (especially wiki home)
  • Release notes and descriptions
  • Repository metadata (stars, language, license visible on homepage)
  • Commit SHAs from archived commit list pages (use with github-commit-recovery skill to access actual content)

What CANNOT Be Recovered:

  • Private repository content (never crawled)
  • Complete git history or repository clone
  • Content behind authentication

Quick Start

Check if a repository page was archived:

curl -s "https://archive.org/wayback/available?url=github.com/owner/repo" | jq

Search for all archived URLs under a repository:

curl -s "https://web.archive.org/cdx/search/cdx?url=github.com/owner/repo/*&output=json&collapse=urlkey" | head -50

Access an archived snapshot:

https://web.archive.org/web/{TIMESTAMP}/https://github.com/owner/repo

GitHub URL Patterns for Archive Searches

Understanding GitHub's URL structure is essential for constructing archive queries.

Repository-Level URLs

Content TypeURL Pattern
Homepagegithub.com/{owner}/{repo}
Commits listgithub.com/{owner}/{repo}/commits/{branch}
Individual commitgithub.com/{owner}/{repo}/commit/{full-sha}
Fork networkgithub.com/{owner}/{repo}/network/members

File and Directory URLs

Content TypeURL Pattern
File viewgithub.com/{owner}/{repo}/blob/{branch}/{path/to/file}
Directory viewgithub.com/{owner}/{repo}/tree/{branch}/{directory}
File historygithub.com/{owner}/{repo}/commits/{branch}/{path/to/file}
Raw fileraw.githubusercontent.com/{owner}/{repo}/{branch}/{path}

Note: blob = files, tree = directories. Raw URLs are rarely archived compared to rendered views.

Collaboration Artifacts

Content TypeURL Pattern
Pull requestgithub.com/{owner}/{repo}/pull/{number}
PR filesgithub.com/{owner}/{repo}/pull/{number}/files
PR commitsgithub.com/{owner}/{repo}/pull/{number}/commits
Issuegithub.com/{owner}/{repo}/issues/{number}
Wiki pagegithub.com/{owner}/{repo}/wiki/{page-name}
Releasegithub.com/{owner}/{repo}/releases/tag/{tag-name}
All PRsgithub.com/{owner}/{repo}/pulls?state=all
All issuesgithub.com/{owner}/{repo}/issues?state=all

CDX API Reference

The Capture Index (CDX) API provides structured search across all archived URLs.

Basic Query Structure

https://web.archive.org/cdx/search/cdx?url={URL}&output=json

Essential Parameters

ParameterEffectExample
matchType=exactExact URL only (default)Single page
matchType=prefixAll URLs starting with pathAll repo content
url=.../*Wildcard (same as prefix)github.com/owner/repo/*
from=YYYYStart date filterfrom=2023
to=YYYYEnd date filterto=2024
filter=statuscode:200Only successful capturesSkip redirects/errors
collapse=timestamp:8One capture per dayReduce duplicates
collapse=urlkeyUnique URLs onlyList all archived pages
limit=NLimit resultslimit=100
output=jsonJSON formatMachine-readable

Query Examples

Find all archived pages under a repository:

curl -s "https://web.archive.org/cdx/search/cdx?url=github.com/facebook/react/*&matchType=prefix&output=json&collapse=urlkey"

Find archived issues for a specific repository:

curl -s "https://web.archive.org/cdx/search/cdx?url=github.com/owner/repo/issues/*&output=json&collapse=urlkey&filter=statuscode:200"

Find archived snapshots of a specific file:

curl -s "https://web.archive.org/cdx/search/cdx?url=github.com/owner/repo/blob/*/path/to/file&output=json"

Check for archived snapshots near a specific date:

curl -s "https://archive.org/wayback/available?url=github.com/owner/repo&timestamp=20230615"

CDX Response Format

[
  ["urlkey", "timestamp", "original", "mimetype", "statuscode", "digest", "length"],
  ["com,github)/owner/repo", "20230615142311", "https://github.com/owner/repo", "text/html", "200", "ABC123...", "12345"]
]

Investigation Patterns

Recovering Deleted File Contents

Scenario: Repository or file has been deleted, need to recover file contents.

Step 1: Search for blob URLs

curl -s "https://web.archive.org/cdx/search/cdx?url=github.com/owner/repo/blob/*/README.md&output=json"

Step 2: Construct archive URL from timestamp

https://web.archive.org/web/20230615142311/https://github.com/owner/repo/blob/main/README.md

Step 3: Extract content manually or use waybackpack

pip install waybackpack
waybackpack "https://github.com/owner/repo/blob/main/README.md" -d output_dir

Forensic Value: Recover documentation, configuration files, or evidence that existed at specific points in time.

Recovering Deleted Issue/PR Content

Scenario: Issue or PR was deleted and you need the original content.

Step 1: Query for issue page snapshots

curl -s "https://web.archive.org/cdx/search/cdx?url=github.com/owner/repo/issues/123*&output=json"

Step 2: Access archived page

https://web.archive.org/web/{TIMESTAMP}/https://github.com/owner/repo/issues/123

Step 3: If issue number unknown, search PR/issue listing

curl -s "https://web.archive.org/cdx/search/cdx?url=github.com/owner/repo/issues?state=all&output=json"

Note: Archive Team actively crawls GitHub issues and PRs since 2020. Issue content has higher recovery success than file contents.

Finding Forks of Deleted Repositories

Scenario: Repository is deleted, but forks may contain the full git history.

Step 1: Search for archived fork network page

curl -s "https://web.archive.org/cdx/search/cdx?url=github.com/owner/repo/network/members&output=json"

Step 2: Access archived network page

https://web.archive.org/web/{TIMESTAMP}/https://github.com/owner/repo/network/members

Step 3: Extract fork usernames from archived page, check if forks still exist

# Check if fork exists
curl -s -o /dev/null -w "%{http_code}" https://github.com/forker/repo

Forensic Value: Active forks contain complete git history including all commits. This often yields better results than trying to recover individual files.

Recovering Wiki Content

Scenario: Repository wiki has been deleted or made private.

Step 1: Search for wiki pages

curl -s "https://web.archive.org/cdx/search/cdx?url=github.com/owner/repo/wiki*&output=json&collapse=urlkey"

Step 2: Access wiki home or specific pages

https://web.archive.org/web/{TIMESTAMP}/https://github.com/owner/repo/wiki
https://web.archive.org/web/{TIMESTAMP}/https://github.com/owner/repo/wiki/Page-Name

Python Implementation

import requests
import json
from typing import Optional, List, Dict
from time import sleep

class WaybackGitHubRecovery:
    CDX_API = "https://web.archive.org/cdx/search/cdx"
    AVAILABILITY_API = "https://archive.org/wayback/available"
    ARCHIVE_URL = "https://web.archive.org/web"

    def check_availability(self, url: str, timestamp: Optional[str] = None) -> Optional[Dict]:
        """Check if URL has any archived snapshots."""
        params = {"url": url}
        if timestamp:
            params["timestamp"] = timestamp

        resp = requests.get(self.AVAILABILITY_API, params=params)
        data = resp.json()

        if data.get("archived_snapshots", {}).get("closest"):
            return data["archived_snapshots"]["closest"]
        return None

    def search_cdx(self, url: str, match_type: str = "prefix",
                   collapse: str = "urlkey", limit: int = 1000) -> List[Dict]:
        """Search CDX API for archived URLs."""
        params = {
            "url": url,
            "output": "json",
            "matchType": match_type,
            "collapse": collapse,
            "filter": "statuscode:200",
            "limit": limit
        }

        resp = requests.get(self.CDX_API, params=params)
        data = resp.json()

        if len(data) <= 1:  # Only header row
            return []

        headers = data[0]
        results = []
        for row in data[1:]:
            results.append(dict(zip(headers, row)))

        return results

    def find_repository_content(self, owner: str, repo: str) -> Dict[str, List]:
        """Find all archived content for a repository."""
        bas

---

*Content truncated.*

When not to use it

  • Recovering private repository data
  • Accessing active/existing GitHub content

Limitations

  • Success relies entirely on whether the page was crawled
  • Cannot restore functional Git repositories or history

How it compares

Allows for content recovery when the original host has deleted the source and no local backup exists.

Compared to similar skills

github-wayback-recovery side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
github-wayback-recovery (this skill)14moReviewAdvanced
research06moReviewIntermediate
session-search17moReviewIntermediate
cass02moCautionIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry