{"skill":{"slug":"link-checker","displayName":"Link Checker","summary":"Crawl web pages and detect broken links, redirects, and HTTP errors. Use when auditing site links, finding 404 errors, validating URLs before launch.","description":"---\nversion: \"2.1.0\"\nname: link-checker\ndescription: \"Crawl web pages and detect broken links, redirects, and HTTP errors. Use when auditing site links, finding 404 errors, validating URLs before launch.\"\nauthor: BytesAgain\nhomepage: https://bytesagain.com\nsource: https://github.com/bytesagain/ai-skills\n---\n\n# Link Checker\n\nCheck URLs for HTTP status codes, find broken links in documents, and track link health over time. Feed it a single URL, a file full of links, or a batch of addresses — it hits each one with `curl`, records the status code, and tells you what's alive and what's dead. Results are stored in `~/.link-checker/` so you can review history, pull stats, and export reports.\n\n## Commands\n\n### `check`\n\nCheck a single URL. Sends an HTTP HEAD request and returns the status code.\n\n```\nlink-checker check <url>\n```\n\nOutput includes status code, a human-readable label (OK, REDIRECT, CLIENT_ERROR, etc.), and an icon.\n\n### `scan`\n\nExtract all URLs from a file (markdown, HTML, plain text — anything with `http://` or `https://` links) and check each one.\n\n```\nlink-checker scan <file>\n```\n\nUses `grep` to pull URLs, deduplicates them, then checks each. Prints a summary at the end with pass/fail counts.\n\n### `batch`\n\nCheck multiple URLs in one go. Pass them as arguments.\n\n```\nlink-checker batch <url1> <url2> <url3> ...\n```\n\n### `report`\n\nGenerate a report from the current session's results. Supports three formats.\n\n```\nlink-checker report [txt|csv|json]\n```\n\nDefault format is `txt`. Reports are saved to `~/.link-checker/report.<format>`.\n\n### `history`\n\nDisplay the last 50 check results from the history log.\n\n```\nlink-checker history\n```\n\nShows timestamp, status code, status label, and URL for each entry.\n\n### `broken`\n\nFilter results to show only failed links — status codes 4xx, 5xx, timeouts, and connection errors.\n\n```\nlink-checker broken\n```\n\n### `stats`\n\nShow statistics across all checks: total count, breakdown by status category (2xx, 3xx, 4xx, 5xx, timeout, error), success rate percentage, and the most common status codes.\n\n```\nlink-checker stats\n```\n\n### `export`\n\nExport the full history log to a file. Supports `csv`, `json`, and `txt`.\n\n```\nlink-checker export <format>\n```\n\nExported files are timestamped and saved to `~/.link-checker/`.\n\n### `config`\n\nView current configuration or change settings.\n\n```\nlink-checker config\nlink-checker config set <key> <value>\n```\n\nAvailable keys: `timeout` (seconds per request), `retries` (retry count on failure), `user_agent`.\n\n### `help`\n\nShow usage information and available commands.\n\n```\nlink-checker help\n```\n\n### `version`\n\nPrint the current version.\n\n```\nlink-checker version\n```\n\n## Examples\n\n```bash\n# Check if a URL is reachable\nlink-checker check https://example.com\n\n# Scan a markdown file for broken links\nlink-checker scan ./README.md\n\n# Batch check several URLs\nlink-checker batch https://example.com https://httpstat.us/404 https://httpstat.us/500\n\n# See only the broken ones\nlink-checker broken\n\n# Get a stats overview\nlink-checker stats\n\n# Generate a JSON report\nlink-checker report json\n\n# Export full history as CSV\nlink-checker export csv\n\n# Set request timeout to 15 seconds\nlink-checker config set timeout 15\n\n# Set retry count to 3\nlink-checker config set retries 3\n```\n\n## Configuration\n\nSettings are stored in `~/.link-checker/config` as key-value pairs.\n\n| Key | Default | Description |\n|-----|---------|-------------|\n| `timeout` | `10` | Connection timeout in seconds per request |\n| `retries` | `2` | Number of retry attempts on timeout/error |\n| `user_agent` | `LinkChecker/1.0.0` | User-Agent header sent with requests |\n\nChange any setting with `link-checker config set <key> <value>`.\n\n## Data Storage\n\nAll data lives in `~/.link-checker/`:\n\n| File | Purpose |\n|------|---------|\n| `results.log` | Current session results (pipe-delimited) |\n| `history.log` | Cumulative log of all checks ever run |\n| `config` | Configuration key-value file |\n| `report.*` | Generated reports (txt/csv/json) |\n| `export_*.*` | Timestamped exports |\n\nLog format: `timestamp|url|status_code|status_label`\n\n## Status Categories\n\n| Icon | Category | Codes |\n|------|----------|-------|\n| ✅ | OK | 2xx |\n| 🔄 | Redirect | 3xx |\n| ❌ | Client Error | 4xx |\n| ⚠️ | Server Error | 5xx |\n| ⏱️ | Timeout | Connection timed out |\n| 🚫 | Error | DNS failure, connection refused |\n\n## Requirements\n\n- `bash` (4.0+)\n- `curl`\n- `grep`, `sort`, `awk` (standard Unix tools)\n\n*Powered by BytesAgain | bytesagain.com | hello@bytesagain.com*\n","tags":{"latest":"2.1.0","productivity":"1.0.0"},"stats":{"comments":0,"downloads":1481,"installsAllTime":13,"installsCurrent":13,"stars":0,"versions":11},"createdAt":1773296296964,"updatedAt":1778491848315},"latestVersion":{"version":"2.1.0","createdAt":1773879261358,"changelog":"v2.1.0: Real link checker with curl-based HTTP validation, batch scanning, broken link detection.","license":"MIT-0"},"metadata":{"setup":[],"os":null,"systems":null},"owner":{"handle":"xueyetianya","userId":"s1716dgb4pf37kmebjdxfdexmh83ehwx","displayName":"bytesagain4","image":"https://avatars.githubusercontent.com/u/218210530?v=4"},"moderation":null}