vs-token-safer: Instructions file for Claude Code

CLAUDE.md

vs-token-safer CLAUDE.md is an instructions file for Claude Code from JSungMin/vs-token-safer. It costs 1,879 tokens per session, scanned A, original, MIT.

Repository instructions for vs-token-safer, a local tool that searches C++ or C# code through official language-server indexes and returns a compact list of file locations and lines.

In plain words
What is it for?
Use it to orient work on the vs-token-safer project, run its required evaluation, and find source locations through clangd for C++ or Roslyn for C#.
Why use it?
It limits how much source code reaches the model and requires an evaluation check before changes, reducing broad raw-text searches and skipped project rules.

Instructions file for Claude Code

Written for Claude Code: PreToolUse hook event. Also seen: mentions subagents; mentions Claude Code.

This is JSungMin/vs-token-safer's own configuration. It tells Claude Code how to work on vs-token-safer itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything vs-token-safer configures →

Reuse

Borrowing it

Nothing to install: this file belongs to JSungMin/vs-token-safer. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/JSungMin/vs-token-safer/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/JSungMin/vs-token-safer

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 vs-token-safer CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/jsungmin/vs-token-safer/claude-md/github.svg)](https://agentmods.dev/instructions/jsungmin/vs-token-safer/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/jsungmin/vs-token-safer/claude-md"><img src="https://agentmods.dev/badge/instructions/jsungmin/vs-token-safer/claude-md/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 vs-token-safer CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/jsungmin/vs-token-safer/claude-md"><img src="https://agentmods.dev/badge/instructions/jsungmin/vs-token-safer/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,879 This file is loaded in full into every session.
When invoked 1,879 The same file — it is already loaded in full.
Security scan A 1 finding. 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.01879 $0.01879
Opus 5.5 $0.00752 $0.00752
Sonnet 5.5 $0.00376 $0.00376
Haiku 4.5 $0.00188 $0.00188

Measured 29d ago against content hash 4faa9b03f476, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

vs-token-safer CLAUDE.md scanned grade A with 1 finding 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 29d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- **No console windows on Windows:** every `spawn`/`execFile*`/`execSync` in `server/` passes
CLAUDE.md · 85 lines

How it starts

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

vs-token-safer — Claude rules

Routes an agent's code search through an official language server's index (clangd, a Roslyn LSP, tsserver, pyright), falls back to tree-sitter / a mined concept dictionary / document sections, and token-caps every answer to a compact file:line list. Local-only. Ships as an MCP server (vs-search), a CLI (vts, on the plugin PATH via bin/), and PreToolUse hooks. Config ~/.vs-token-safer, env VTS_*.

This file is loaded into EVERY session and subagent turn here, so it stays short. The per-module design, the measurements behind each rule, and the rejected alternatives live in docs/ARCHITECTURE.md — read the section for the code you are changing (Layout / Conventions / Backends / Identity) before editing it.

First, orient (every session)

  1. node eval/run.mjs must print EVAL PASSED before you change anything.
  2. Context: this file · docs/ARCHITECTURE.md · the wiki (wiki_query "vs-token-safer", .omc/wiki/; the Status and TODO page is the live checklist) · memory anchor project-vs-token-safer.

Identity and the roadmap rule

The layer an agent talks to instead of reading the repository: it answers at the highest precision it can reach and labels the rung (completenessCert): exact (language server) → syntactic (tree-sitter) → fuzzy (concept dictionary, no embeddings) → section (docs/config by heading/selector), plus PARTIAL/INCONCLUSIVE coverage. A feature earns its place only by adding a rung or covering more of the repo, and must keep the three disciplines: capped output, honest precision label, nothing leaves the machine.

Map (details: docs/ARCHITECTURE.md → Layout)

  • server/core.js — runTool() dispatch for every tool, token-cap formatters, savings ledger, discover.
  • server/lsp.js — LSP client. server/backends/index.js — backend spawn configs, pickBackend, CDB dirs.
  • server/treesitter.js + symindex.js — syntactic tier + committable .vts-index. server/concept.js — fuzzy tier. server/textstruct.js — section tier. server/scope.js — indexing scope / preindex.
  • server/policy.js — routing digest + suppression. server/squeeze.js — passthrough compaction.
  • server/compact.js — git/p4 output compaction. server/psearch.js — PowerShell search classifier.
  • server/viz.js / serve.js / dashboard.html — local dashboard (vts serve, 127.0.0.1).
  • hooks/block-code-grep.js — the enforcement hook (Bash/Grep/Glob/Read/Edit/PowerShell). hooks/orchestrator-redirect.js — qvts delegation. hooks/edit-report.js — SessionStart digest.
  • agents/code-locator.md — locate-only subagent (tools restricted). eval/run.mjs — the eval.
  • gamedev-log-analyzer/ — static mirror; the source is ../rider-mcp-enforcer.

Read the full file on GitHub · 85 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. 29d ago Changed · -592 lines · -17,669 tokens per session 4faa9b03f476
  2. 1mo ago Changed · +15 lines · +450 tokens per session 29202604c85e
  3. 1mo ago Changed · +52 lines · +1,466 tokens per session bb5f5f400135
  4. 1mo ago First seen · 610 lines · 17,632 tokens per session scan A 43c13f80a10a

Subscribe to this mod's changes

vs-token-safer CLAUDE.md is an instructions file published in the GitHub repository JSungMin/vs-token-safer (13 stars, last pushed 20d ago), licensed MIT. It adds 1,879 tokens to every session, about $0.0075 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

repobrain copilot-instructions.md

Copilot instructions for study8677/repobrain, covering github copilot bootstrap instructions and hard rule — query the repobrain hub first.

study8677/repobrain · 229 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,461 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens