update

update is a command for coding agents from HetCreep/CoalMine. It costs 24 tokens per session (693 once invoked), scanned A, original, Apache-2.0.

A command for checking whether a newer CoalMine version is available and choosing how future updates should be handled.

In plain words
What is it for?
Use it to check the latest published version manually or configure update behavior for later sessions.
Why use it?
It removes the need to remember to check for updates and lets you choose whether to be asked, reminded, updated automatically, or left alone.

Command

Part of the coalmine plugin — 2 commands, 1 agent, 3 hooks, 1 plugin shipped together

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 commands/hetcreep/coalmine/update
Clone the repo
git clone --depth 1 https://github.com/HetCreep/CoalMine

Or install coalmine, the plugin that ships this one along with the rest of its 2 commands, 1 agent, 3 hooks, 1 plugin.

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 update

README.md
[![agentmods](https://agentmods.dev/badge/commands/hetcreep/coalmine/update.svg)](https://agentmods.dev/commands/hetcreep/coalmine/update)
Your own site
<a href="https://agentmods.dev/commands/hetcreep/coalmine/update"><img src="https://agentmods.dev/badge/commands/hetcreep/coalmine/update.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 693 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.00024 $0.00693
Opus 5 $0.00012 $0.00347
Sonnet 5 $0.00005 $0.00139
Haiku 4.5 $0.00002 $0.00069

Measured today against content hash f7426e9e0ff2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

update 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 today.

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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • update — 88% identical, 14 lines differ
commands/update.md · 30 lines

What it actually says

CoalMine keeps itself current through the conductor (session start), gated by .coalmine.json updateMode (ask | auto | remind | off, default ask) and throttled to once per updateCheckDays (default 14). This command is the agent procedure each mode triggers — and a manual entry point. Always answer in the user's language; offer choices via your question tool; never spend tokens or change config without a chosen option.

Config reads — every config key, always the CASCADE, never the bare project file: ~/.claude/.coalmine.json first, then the project config (own agent dir → other known agent dirs → legacy <gitroot>/.coalmine.json), project wins per key. A bare project read is ABSENT on a machine configured only globally, so it silently yields defaults.

ask — present the 3-way choice via your question tool:

  • auto — the agent web-checks on a ~updateCheckDays cadence and offers updates (~1-2K tokens/check).
  • remind — a free periodic reminder; the user runs the update themselves.
  • off — no reminders.

Save the pick (no forced check — the chosen mode drives future sessions): node scripts/configure.mjs --updateMode <auto|remind|off> (run from the CoalMine repo, or wherever .coalmine.json lives).

auto (the version CHECK — the only token spend, standing-consented):

  1. Get the latest published tag (graceful — never assume git/network is present): git ls-remote --tags --sort=-v:refname https://github.com/HetCreep/CoalMine.git | head -1 (parse the trailing vX.Y.Z; ignore ^{} deref lines).
  2. Compare to the installed version in .claude-plugin/plugin.json (the plugin cache copy, or the repo copy if working from source).
  3. If a newer tag exists → OFFER (don't auto-run): claude plugin update coalmine@coalmine then /reload-plugins. If current → "up to date."
  4. Graceful fallback (no-external-assumption): if git ls-remote fails, git is missing, or there is no network, say "Can't check for updates offline — update manually with claude plugin update coalmine@coalmine when you're back online" and stop. Never crash, never assume a version.

remind — nothing for the agent to do; the conductor already surfaced the free reminder line. (If invoked manually, run the auto check above on request.)

off — no update activity.

Rule freshness (a separate, free, local nudge the conductor also raises): if gold-standard coalmine: verified stamps in .claude/rules/, .agents/rules/, or AGENTS.md are past their revalidate Nd date, offer /gold-standard RE-VALIDATE — see /coalmine:stats for the per-rule table. This is local-only and never spends tokens.

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. today Changed · +2 lines f7426e9e0ff2
  2. 4d ago First seen · 28 lines · 24 tokens per session scan A 3173fb45ae63

Subscribe to this mod's changes

update is a command published in the GitHub repository HetCreep/CoalMine (12 stars, last pushed today), licensed Apache-2.0. It adds 24 tokens to every session and 693 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-08-30.