source-caching

A research workflow for caching web pages locally before using them. A cache is a local copy that can be read again without fetching the same page from the internet.

In plain words
What is it for?
Checking whether sources are cached, fetching uncached URLs, and preparing Markdown copies for research sessions.
Why use it?
It avoids repeated downloads and lets research work from consistent, already-saved source material.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/endogenai/dogma/source-caching
Any agent
npx skills add EndogenAI/dogma --skill source-caching
Clone the repo
git clone --depth 1 https://github.com/EndogenAI/dogma

Made for: Claude Code, Codex.

Per session 121 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,174 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00121 $0.01174
Opus 5 $0.00060 $0.00587
Sonnet 5 $0.00024 $0.00235
Haiku 4.5 $0.00012 $0.00117

Measured 2d ago against content hash 03abc1a9049f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

source-caching scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/skills/source-caching/SKILL.md · 125 lines

How it starts

The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Source Caching

This skill enacts the Local Compute-First axiom from MANIFESTO.md: populate the source cache locally first, then research sessions read from disk rather than re-fetching through the context window. The fetch-before-act posture is governed by AGENTS.md § Programmatic-First Principle and § Security Guardrails. When this skill and those documents conflict, the primary documents take precedence.


1. Pre-Warm at Session Start

At the beginning of any research session, warm the entire source cache before delegating to any scout:

# Dry run first — see what will be fetched without fetching
uv run python scripts/fetch_all_sources.py --dry-run

# Fetch all uncached sources (idempotent — skips already-cached URLs)
uv run python scripts/fetch_all_sources.py

This batch-fetches all URLs from OPEN_RESEARCH.md and existing research doc frontmatter. Scouts then read cached Markdown files with read_file rather than consuming tokens on live web fetches.


2. Check Before Fetching Any Individual URL

Before fetching a specific URL, always check whether it is already cached:

uv run python scripts/fetch_source.py <url> --check
# Exit 0 = cached; Exit 2 = not cached

Never re-fetch a cached source without --force — it wastes tokens and rate-limit budget.


3. Fetch and Cache a Single URL

uv run python scripts/fetch_source.py <url>
# Saves distilled Markdown to .cache/sources/<slug>.md
# Prints the slug and cache path on success

To force-refresh an already-cached page:

uv run python scripts/fetch_source.py <url> --force

4. Get the Cached File Path

After caching, retrieve the path for use with read_file:

uv run python scripts/fetch_source.py <url> --path
# Prints: .cache/sources/<slug>.md

Use this path with the read_file tool to read the distilled content without re-fetching.


5. List All Cached Sources

Read the full file on GitHub · 125 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 125 lines · 121 tokens per session scan A 03abc1a9049f

Subscribe to this mod's changes

source-caching is a skill published in the GitHub repository EndogenAI/dogma (2 stars, last pushed 8d ago), licensed Apache-2.0. It adds 121 tokens to every session and 1,174 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.