check

A consistency checker for natural-language programming artifacts across a repository. It looks for broken references, unused files, and instructions that disagree with each other.

In plain words
What is it for?
Use it after discovering multiple artifacts to check commands, skills, agents, hooks, shared files, and scripts. It is intended for repository-wide checks rather than reviewing one file.
Why use it?
It catches problems that a single-file review misses, such as a command pointing to a missing file or shared instructions that nothing uses. This reduces confusion when the artifacts work together.

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/check
Clone the repo
git clone --depth 1 https://github.com/xiaolai/nlpm
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 534 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.00015 $0.00534
Opus 5 $0.00008 $0.00267
Sonnet 5 $0.00003 $0.00107
Haiku 4.5 $0.00002 $0.00053

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

Security

Grade A, and why

check 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/check.md · 77 lines

How it starts

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

User Input

$ARGUMENTS

Workflow

Step 1: Discover ALL Artifacts

Parse $ARGUMENTS for path (default: cwd). Use commands/shared/discover.md to discover all Category A+B artifacts. Read every file.

If no artifacts found → "No NL programming artifacts found."

If fewer than 2 artifacts → "Cross-artifact check requires multiple artifacts. Use /nlpm:score for individual files."

Step 2: Run the Cross-Artifact Check

Dispatch the nlpm:checker agent with ALL artifacts and the instruction to perform cross-artifact checks:

  1. Reference integrity

    • Commands reference shared partials by path (commands/shared/name.md) → check file exists
    • Agents reference skills in frontmatter (skills: [plugin:skill]) → check skill SKILL.md exists
    • Hooks reference scripts (${CLAUDE_PLUGIN_ROOT}/scripts/name.sh) → check script exists
    • Any Follow commands/shared/... or See commands/shared/... in body → check path
  2. Orphaned artifacts

    • Shared partials not referenced by any command → orphan
    • Skills not referenced by any agent → orphan
    • Scripts not referenced by any hook → orphan
  3. Behavioral contradictions

    • Command says "always do X" but referenced partial says "never do X"
    • Two agents claim the same responsibility domain
    • Rules contradict each other or contradict CLAUDE.md
  4. Terminology drift

    • Same concept called different names across artifacts
    • Inconsistent naming (kebab vs camelCase vs snake_case)

Step 3: Report

NLPM Cross-Artifact Check

Artifacts checked: {N}

Reference Integrity:
  {N} references checked, {N} broken
  {list broken references}

Orphaned Artifacts:
  {N} orphans found
  {list orphans}

Contradictions:
  {N} found
  {list contradictions with both sides}

Terminology:
  {N} inconsistencies
  {list}

Verdict: {CLEAN | {N} findings}

Error handling:

  • Unreadable files → skip with warning, note in report
  • Path doesn't exist → "Directory not found: {path}"

Read the full file on GitHub · 77 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 · 77 lines · 15 tokens per session scan A 096c2ef2ead1

Subscribe to this mod's changes

check is a command published in the GitHub repository xiaolai/nlpm (133 stars, last pushed 2d ago), licensed ISC. It adds 15 tokens to every session and 534 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.