enforce

enforce is a command for Claude Code 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 for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the gamedev-log-analyzer plugin — 1 skill, 3 commands, 1 agent, 1 hook shipped together

Good fit Use it to view the current enforcement mode, enable blocking, allow commands with warnings, or disable the checks.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add JSungMin/vs-token-safer
Claude Code
/plugin install gamedev-log-analyzer

Made for: Claude Code.

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/github.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/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 enforce

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. 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.00042 $0.00587
Opus 5.5 $0.00017 $0.00235
Sonnet 5.5 $0.00008 $0.00117
Haiku 4.5 $0.00004 $0.00059

Measured 3mo ago against content hash 256938c38860, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 3mo 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. 3mo 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 (16 stars, last pushed 6d ago), licensed MIT. It adds 42 tokens to every session and 587 once invoked, about $0.0002 per session on Opus 5.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.

Related

enforce compared with commands from other repositories

enforce next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
enforceJSungMin/vs-token-saferCommand166d agoMITA42Claude Code
scriptsAlex-Rachel/TEngineCommand2.4k13d agoMITA0Claude Code
batchAlex-Rachel/TEngineCommand2.4k13d agoMITA0Claude Code
build-and-compilationAlex-Rachel/TEngineCommand2.4k13d agoMITA0Claude Code
project-settingsAlex-Rachel/TEngineCommand2.4k13d agoMITA0Claude Code
runtimeAlex-Rachel/TEngineCommand2.4k13d agoMITA0Claude Code
gameobjects-and-componentsAlex-Rachel/TEngineCommand2.4k13d agoMITA0Claude Code