update

A command for updating Forge, a coding-agent add-on, from its upstream source. It detects whether Forge came from a Git checkout, a marketplace cache, or another installation.

In plain words
What is it for?
Use it to pull a clean fast-forward update, check what would change, or receive instructions for marketplace and unknown installations.
Why use it?
It handles the different update paths and reports the version change instead of requiring you to work out how Forge was installed.

Command

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/lucasduys/forge/update
Clone the repo
git clone --depth 1 https://github.com/LucasDuys/forge
Per session 6 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,041 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.00006 $0.01041
Opus 5 $0.00003 $0.00521
Sonnet 5 $0.00001 $0.00208
Haiku 4.5 $0.00001 $0.00104

Measured 2d ago against content hash 82d2d938ec80, 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 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.

commands/update.md · 95 lines

How it starts

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

Forge Update

Pull the latest Forge from upstream. Detects how the plugin is installed (git checkout vs marketplace cache vs custom --plugin-dir), runs the appropriate update mechanism, and reports the version delta. Safe to run repeatedly.

What it does

The command shells out to scripts/forge-update.cjs which:

  1. Locates the plugin install — uses $CLAUDE_PLUGIN_ROOT if set, otherwise walks up from the script directory looking for .claude-plugin/plugin.json. Override with --plugin-root PATH.
  2. Reads the current version from .claude-plugin/plugin.json.
  3. Detects the install method:
    • git checkout (.git/ present) — fetches origin, fast-forwards the current branch, refuses if the working tree is dirty unless --force is given
    • marketplace cache (path contains plugins/cache/) — prints the manual claude plugin marketplace update instructions and exits with code 2 (those steps must be run from the user's terminal, not from inside Claude Code)
    • unknown — prints diagnostics and exits with code 2
  4. Runs the update (or just shows what would change if --check is passed).
  5. Reports the version delta and prompts the user to run /reload-plugins.

Pre-flight Check

Run the script with --check first to see what would change before applying:

node "${CLAUDE_PLUGIN_ROOT}/scripts/forge-update.cjs" --check

If updates are available, ask the user whether to proceed. If they say yes, run without --check.

If the user passed --check themselves, stop after the check report and tell them to re-run without --check when ready.

Parse Arguments

Parse flags from $ARGUMENTS:

Flag Default Description
--check off Report only — show incoming commits, do not modify the working tree
--force off Stash uncommitted local changes before pulling (and pop them after)
--plugin-root PATH auto Override automatic plugin install discovery

Read the full file on GitHub · 95 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 · 95 lines · 6 tokens per session scan A 82d2d938ec80

Subscribe to this mod's changes

update is a command published in the GitHub repository LucasDuys/forge (55 stars, last pushed 1mo ago), licensed MIT. It adds 6 tokens to every session and 1,041 once invoked, about $0.0000 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.