ars-cache-invalidate

ars-cache-invalidate is a command for Claude Code from Lzy599775/agent-auto-sci-skills. It costs 20 tokens per session (419 once invoked), scanned A, original, MIT.

A command that removes saved verification results for one citation. The next run checks that citation again against external scholarly databases.

In plain words
What is it for?
Refresh verification for citations whose metadata, DOI, publication status, or evidence may be stale.
Why use it?
It prevents outdated or incorrect citation metadata from being reused after a source changes.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: model in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 scripts/ars_cache_invalidate.py $ARGUMENTS.

Good fit Refresh verification for citations whose metadata, DOI, publication status, or evidence may be stale.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/Lzy599775/agent-auto-sci-skills
agentmods
npx agentmods add commands/lzy599775/agent-auto-sci-skills/ars-cache-invalidate

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ars-cache-invalidate

README.md
[![agentmods](https://agentmods.dev/badge/commands/lzy599775/agent-auto-sci-skills/ars-cache-invalidate/github.svg)](https://agentmods.dev/commands/lzy599775/agent-auto-sci-skills/ars-cache-invalidate)
Your own site
<a href="https://agentmods.dev/commands/lzy599775/agent-auto-sci-skills/ars-cache-invalidate"><img src="https://agentmods.dev/badge/commands/lzy599775/agent-auto-sci-skills/ars-cache-invalidate/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ars-cache-invalidate

Your own site · 80×15
<a href="https://agentmods.dev/commands/lzy599775/agent-auto-sci-skills/ars-cache-invalidate"><img src="https://agentmods.dev/badge/commands/lzy599775/agent-auto-sci-skills/ars-cache-invalidate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 419 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00020 $0.00419
Opus 5 $0.00010 $0.00210
Sonnet 5 $0.00004 $0.00084
Haiku 4.5 $0.00002 $0.00042

Measured yesterday against content hash 60c6dc0d42ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

ars-cache-invalidate 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 yesterday.

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.

skills/urban-exposure-review-radar-workflow/subskills/academic-research-suite/ars/commands/ars-cache-invalidate.md · 21 lines

What it actually says

Invalidate the persistent verification cache for one citation key, so the next pipeline run re-verifies it live against Crossref / OpenAlex / Semantic Scholar / arXiv instead of returning a stale cached verdict. Use this when a citation's metadata changed (e.g. a preprint gained a published DOI) or when a prior verification looks wrong.

The cache (spec v3.11 #182 Delta 2) is a local SQLite store at ~/.cache/ars/verification.db (override via ARS_VERIFICATION_CACHE_PATH), keyed by (citation_key, resolver_name, query_form) with a 90-day TTL. This command removes every cached entry for the named citation key (all four resolvers, all query forms); other citations are untouched. It is idempotent — invalidating a key with no cached rows succeeds as a no-op.

Invalidation cascade (#541, unconditional): after invalidation the next gate regenerates the citation's verification summary row and re-runs Phase E audit verdicts for claims citing it — unconditionally (no baseline is retained to diff against), covering existence status, metadata, and retrieved evidence alike. An age-based advisory also surfaces stale cache entries automatically at the gates (ARS_CACHE_STALE_ADVISORY_DAYS, default 30; opt-in live re-verification via ARS_CACHE_REVALIDATE=1).

To invalidate the entire cache at once (e.g. after a systemic resolver bug cached many false negatives), delete the database file directly: rm ~/.cache/ars/verification.db. It is recreated empty on the next run.

Implementation:

python3 scripts/ars_cache_invalidate.py $ARGUMENTS

Mode reference: docs/design/2026-05-21-v3.10-182-promote-citation-gate-spec.md §2 Delta 2.

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. yesterday Changed · +1 lines · +5 tokens per session 60c6dc0d42ea
  2. 5d ago First seen · 20 lines · 15 tokens per session scan A 443fe92795e5

Subscribe to this mod's changes

ars-cache-invalidate is a command published in the GitHub repository Lzy599775/agent-auto-sci-skills (2 stars, last pushed 2d ago), licensed MIT. It adds 20 tokens to every session and 419 once invoked, about $0.0001 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-09-03.