enforce

enforce is a command for coding agents from JSungMin/vs-token-safer. It costs 42 tokens per session (587 once invoked), scanned A, original, MIT.

A command for controlling checks that intercept raw reads of large log files and steer them to a log-analysis tool. It supports block, warn, and off modes.

In plain words
What is it for?
Use it to view the current enforcement mode, enable blocking, allow commands with warnings, or disable the checks.
Why use it?
It helps prevent large, unprocessed log dumps from filling the agent's working context. Warnings allow the command while suggesting a safer alternative.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the gamedev-log-analyzer plugin — 1 skill, 3 commands, 1 agent, 1 hook 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/jsungmin/vs-token-safer/enforce
Clone the repo
git clone --depth 1 https://github.com/JSungMin/vs-token-safer

Or install gamedev-log-analyzer, the plugin that ships this one along with the rest of its 1 skill, 3 commands, 1 agent, 1 hook.

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 enforce

README.md
[![agentmods](https://agentmods.dev/badge/commands/jsungmin/vs-token-safer/enforce.svg)](https://agentmods.dev/commands/jsungmin/vs-token-safer/enforce)
Your own site
<a href="https://agentmods.dev/commands/jsungmin/vs-token-safer/enforce"><img src="https://agentmods.dev/badge/commands/jsungmin/vs-token-safer/enforce.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 587 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.00042 $0.00587
Opus 5 $0.00021 $0.00293
Sonnet 5 $0.00008 $0.00117
Haiku 4.5 $0.00004 $0.00059

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

Security

Grade A, and why

enforce 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 5d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • enforce — 100% identical, 0 lines differ
gamedev-log-analyzer/commands/enforce.md · 39 lines

What it actually says

gamedev-log-analyzer — enforcement control

A PreToolUse hook intercepts two raw-log vectors and steers them to gamedev-log (parse + dedup + token-cap) instead of dumping raw lines into context:

  • Bash raw reads (grep/rg/ack/ag/findstr/tail/head/cat) over a .log / .jsonl / rotated .log.N file or a Logs/ · Saved/Logs/ path.
  • Read tool — an unbounded read of a large (≥ 200 KB) log file. A sliced read (offset/limit) always passes (one-step escape + fallback for poorly-parsed formats); small logs pass.

Code grep (.cpp/.cs/src/…), non-log reads, and the Grep tool (already result-capped) pass through.

Run the CLI through Bash (no setup; pure Node):

node "${CLAUDE_PLUGIN_ROOT}/server/cli.js" enforce            # show current mode + source
node "${CLAUDE_PLUGIN_ROOT}/server/cli.js" enforce warn       # allow, but nudge (soft)
node "${CLAUDE_PLUGIN_ROOT}/server/cli.js" enforce off        # disable enforcement
node "${CLAUDE_PLUGIN_ROOT}/server/cli.js" enforce block      # re-enable (default)

Modes:

  • warn (default) — allow the command, but inject the gamedev-log equivalent into the model's context as a nudge. Steers without friction.
  • block — deny the raw read (exit 2) and show the nudge — the command does not run. Opt-in.
  • off — silent passthrough, no enforcement.

Mode precedence: env GDLOG_ENFORCE > ~/.gamedev-log-analyzer/config.json ("enforce") > default block. For a one-shot bypass in the current shell, prefix the command with GDLOG_ENFORCE=off. After changing the persisted mode, run /reload-plugins.

When a user hits the block but genuinely needs the raw bytes: for a Read, re-Read with offset/limit (a bounded slice always passes); for Bash tail -f live-watching, suggest enforce warn (or off) rather than working around the hook.

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. 5d ago First seen · 39 lines · 42 tokens per session scan A 256938c38860

Subscribe to this mod's changes

enforce is a command published in the GitHub repository JSungMin/vs-token-safer (11 stars, last pushed yesterday), licensed MIT. It adds 42 tokens to every session and 587 once invoked, about $0.0002 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.