init

A project setup command for NLPM, a tool that checks the quality and consistency of natural-language programming files. It finds existing artifacts, lets you choose how strict the checks should be, and records a starting snapshot.

In plain words
What is it for?
Use it when starting NLPM in a repository. It configures the project, updates the ignore file for generated history, and captures the initial quality state.
Why use it?
It avoids setting up configuration and baseline tracking by hand. The baseline gives you a reference point for seeing whether artifact quality changes over time.

Command

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/init
Clone the repo
git clone --depth 1 https://github.com/xiaolai/nlpm
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 709 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.00020 $0.00709
Opus 5 $0.00010 $0.00354
Sonnet 5 $0.00004 $0.00142
Haiku 4.5 $0.00002 $0.00071

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

Security

Grade A, and why

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 2d 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/init.md · 86 lines

How it starts

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

Workflow

Step 1: Check Existing Config

Read .claude/nlpm.local.md. If exists, show current settings and ask: "Reconfigure? (yes/no)". If no → stop.

Step 2: Scan

Run artifact discovery (same as /nlpm:ls) to show what's in the project.

Step 3: Ask Strictness

AskUserQuestion:
  question: "What strictness level?"
  header: "Strictness"
  options:
    - label: "Relaxed"
      description: "Threshold 60 — only flag seriously broken artifacts"
    - label: "Standard (Recommended)"
      description: "Threshold 70 — flag artifacts that need improvement"
    - label: "Strict"
      description: "Threshold 80 — flag anything below good quality"

Step 4: Write Config

Create .claude/ directory if needed. Write .claude/nlpm.local.md:

---
# NLPM Configuration
strictness: {chosen}
score_threshold: {60|70|80}
---

# NLPM Settings

When scoring NL artifacts in this project, use **{strictness}** strictness.
Flag artifacts scoring below **{threshold}/100** for improvement.

Step 5: Update .gitignore

Append the following to .gitignore (skip lines already present):

# nlpm generated artifacts
.claude/nlpm-history.json

Step 6: Capture Baseline Snapshot

Score every NL artifact discovered in Step 2 so /nlpm:trend has a starting point.

  1. Dispatch nlpm:scorer and nlpm:vague-scanner in parallel over the discovered artifacts (same dispatch pattern as /nlpm:score). The vague-scanner's counts override the scorer's heuristic detection.
  2. Persist the result by following commands/shared/append-history.md with scope: "full" and files_scored equal to the artifact count.

If Step 2 found zero artifacts, skip this step — there is nothing to score and the partial declines to write empty snapshots.

Step 7: Confirm

NLPM is ready for this project.
  Strictness: {standard}
  Threshold: {70}/100
  Artifacts found: {N}
  Baseline score: {overall}/100   (snapshot saved to .claude/nlpm-history.json)
  Config: .claude/nlpm.local.md

Run /nlpm:score to re-score later, or /nlpm:trend to compare against this baseline.

Read the full file on GitHub · 86 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. 2d ago First seen · 86 lines · 20 tokens per session scan A c1bf848dc807

Subscribe to this mod's changes

init is a command published in the GitHub repository xiaolai/nlpm (133 stars, last pushed 2d ago), licensed ISC. It adds 20 tokens to every session and 709 once invoked, about $0.0001 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.