vocab-init

vocab-init is a command for coding agents from xiaolai/nlpm. It costs 56 tokens per session (2,566 once invoked), scanned A, original, ISC.

A command that starts a project vocabulary system by examining a Claude Code plugin or natural-language-heavy repository. It detects the layout, extracts examples from the project’s text, creates initial noun and verb lists, and adds an opt-in configuration stub.

In plain words
What is it for?
Use it when beginning to apply R51 vocabulary rules to a plugin or other repository with substantial written instructions.
Why use it?
It helps projects use consistent terms before different words for the same idea spread through their instructions and documentation.

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 nlpm plugin — 17 skills, 12 commands, 8 agents, 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/xiaolai/nlpm/vocab-init
Clone the repo
git clone --depth 1 https://github.com/xiaolai/nlpm

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-init

README.md
[![agentmods](https://agentmods.dev/badge/commands/xiaolai/nlpm/vocab-init.svg)](https://agentmods.dev/commands/xiaolai/nlpm/vocab-init)
Your own site
<a href="https://agentmods.dev/commands/xiaolai/nlpm/vocab-init"><img src="https://agentmods.dev/badge/commands/xiaolai/nlpm/vocab-init.svg" alt="Measured on agentmods" height="20"></a>
Per session 56 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,566 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.00056 $0.02566
Opus 5 $0.00028 $0.01283
Sonnet 5 $0.00011 $0.00513
Haiku 4.5 $0.00006 $0.00257

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

Security

Grade A, and why

vocab-init 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.

commands/vocab-init.md · 262 lines

How it starts

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

User Input

$ARGUMENTS

Workflow

Step 1: Resolve target path

Parse $ARGUMENTS:

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: Detect plugin name

Read <target>/.claude-plugin/plugin.json if it exists. Use the name field.

If no manifest exists, use the basename of the target directory (e.g., /home/dev/my-project/my-project). Lowercase, replace spaces/underscores with hyphens.

Store as plugin_name for the rest of the workflow.

Step 3: Detect layout

Use Glob against the target path to check which of these patterns exist; build the scope config from what is present:

Pattern Scope Role Notes
commands/*.md internal verb-filename Claude Code plugin commands
agents/*.md internal noun-filename Claude Code plugin agents
skills/*/*/SKILL.md internal skill-dirname Plugin-namespaced skills
skills/*/SKILL.md internal skill-dirname Flat skill layout (no plugin namespace)
.github/workflows/*.yml auditor verb-filename Auditor-style workflows; only emit this scope if at least 3 workflow files match auditor-* or similar pipeline naming
hooks/hooks.json internal (no extraction; presence-only) Skip in scope config; just note in the skeleton
docs/*.md internal headings Author/user docs
analysis/*.md internal headings Design notes

Only include scopes where at least one matching file exists. If only docs/ matches and nothing else, the project has too little NL surface for vocabulary discipline — stop with: "Target has minimal NL surface (only {N} files matched). Vocabulary discipline is premature here. Re-run /nlpm:vocab-init after the artifact set grows."

Step 4: Write the scope config

Read the full file on GitHub · 262 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. 5d ago First seen · 262 lines · 56 tokens per session scan A ff72a4a6463f

Subscribe to this mod's changes

vocab-init is a command published in the GitHub repository xiaolai/nlpm (134 stars, last pushed yesterday), licensed ISC. It adds 56 tokens to every session and 2,566 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.