vocab-drift

vocab-drift is a command for Claude Code from xiaolai/nlpm. It costs 52 tokens per session (793 once invoked), scanned A, original, ISC.

A command that looks for likely synonym groups among nouns and verbs in a project’s written instructions, without requiring an existing vocabulary list. It gives advice only and does not lower scores.

In plain words
What is it for?
Use it as a periodic check on larger collections of plugin instructions and project configuration files.
Why use it?
It helps find inconsistent wording early, before a project has a formal vocabulary registry.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the nlpm plugin — 17 skills, 12 commands, 8 agents, 1 hook shipped together

Good fit Use it as a periodic check on larger collections of plugin instructions and project configuration files.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/xiaolai/nlpm/vocab-drift
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.

Clone the repo
git clone --depth 1 https://github.com/xiaolai/nlpm

Made for: Claude Code.

Or install nlpm, the plugin that ships this one along with the rest of its 17 skills, 12 commands, 8 agents, 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 vocab-drift

README.md
[![agentmods](https://agentmods.dev/badge/commands/xiaolai/nlpm/vocab-drift.svg)](https://agentmods.dev/commands/xiaolai/nlpm/vocab-drift)
Your own site
<a href="https://agentmods.dev/commands/xiaolai/nlpm/vocab-drift"><img src="https://agentmods.dev/badge/commands/xiaolai/nlpm/vocab-drift.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 793 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.00052 $0.00793
Opus 5 $0.00026 $0.00396
Sonnet 5 $0.00010 $0.00159
Haiku 4.5 $0.00005 $0.00079

Measured 8d ago against content hash c9a763f33751, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

vocab-drift 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 8d 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/vocab-drift.md · 78 lines

How it starts

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

User Input

$ARGUMENTS

Workflow

Step 1: Parse target

Input Behavior
(empty) Target = current working directory
absolute path Target = that path
relative path Target = <cwd>/<path>

If the target does not exist or is not a directory → "Target path not found: {path}". Stop.

Step 2: Discover artifacts

Use commands/shared/discover.md against the target path to collect all NL artifacts. Filter to Category A (plugin) and Category B (project config) — these are where vocabulary lives. Skip Category F (memory files) — they are user-specific and not part of the project's published surface.

If the discovery returns fewer than 5 artifacts → "Target has minimal NL surface ({N} artifacts). Vocabulary drift analysis is uninformative on small corpora; re-run when the corpus grows past 5 artifacts." Stop.

Step 3: Dispatch the scanner

Invoke the nlpm:vocab-drift-scanner agent via the Task tool.

Pass the agent:

  • The full list of artifact paths from Step 2
  • The contents of every artifact (read with Read before dispatching)
  • The path to skills/*/vocabulary/registry.yaml if one exists in the target (use Glob to find it). The scanner reads cross_scope_homonyms.verbs from this file to suppress false positives on already-declared homonyms.

If the artifact set is large (>30 files), batch into groups of ≤20 artifacts per scanner invocation. The agent's clustering algorithm scales linearly in the number of unique terms, not files, so batches can run in parallel via separate Task dispatches.

Step 4: Merge results (if batched)

If multiple batches ran, merge findings:

  • Two findings with overlapping term sets (≥1 shared term in the cluster) → merge into one finding. Sum occurrence counts; combine file lists; take the higher confidence.
  • Re-rank the merged set by the criteria in the scanner's Step 5.
  • Cap final output at 20 findings.

Step 5: Report

Print the scanner's output verbatim. Then append a single line:

Read the full file on GitHub · 78 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. 8d ago First seen · 78 lines · 52 tokens per session scan A c9a763f33751

Subscribe to this mod's changes

vocab-drift is a command published in the GitHub repository xiaolai/nlpm (135 stars, last pushed today), licensed ISC. It adds 52 tokens to every session and 793 once invoked, about $0.0003 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.