fetch_cache_web.py fetch web content into a named local cache for multiple reuse. Convert HTML to Markdown by default, refresh expired entries, and maintain a JSON manifest.
Fetch and name a page:
uv run fetch_cache_web.py get https://example.com/guide.html --name guideget prints only the cached file path. Reuse the stored URL by name:
uv run fetch_cache_web.py get guideInspect the full manifest or one entry:
uv run fetch_cache_web.py show
uv run fetch_cache_web.py show guideUse --refetch to bypass a fresh entry, --expiry-days N to change the 30-day freshness window, --skip-markdownify to skip HTML-to-Markdown conversion, and --cache-dir DIR to select another cache folder. Run uv run fetch_cache_web.py get --help or uv run fetch_cache_web.py show --help for the complete manual.
Each cache directory contains fetched files and manifest.json. The manifest records every entry's name, URL, local path, and fetch time.
- Python 3.12 or later
- uv
- markdownify
1.2.3or later
The script contains PEP 723 metadata, so uv run can resolve its dependency without a separate installation step.
The self-contained fetch_cache_web skill can be installed as an Agentic Skill to teach compatible agents how to efficiently fetch frequently used web resources, manage named web content caches, and bundle the script into other skills.