trend

A command that compares current quality scores for natural-language artifacts with scores saved from earlier runs.

In plain words
What is it for?
Use it to track quality changes for the whole project or a selected path and identify improved, degraded, unchanged, or new artifacts.
Why use it?
It helps show whether instructions are improving, staying the same, or becoming worse 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/trend
Clone the repo
git clone --depth 1 https://github.com/xiaolai/nlpm
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 641 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.00014 $0.00641
Opus 5 $0.00007 $0.00320
Sonnet 5 $0.00003 $0.00128
Haiku 4.5 $0.00001 $0.00064

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

Security

Grade A, and why

trend 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/trend.md · 71 lines

How it starts

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

User Input

$ARGUMENTS

Workflow

Step 1: Load History

Read .claude/nlpm-history.json from the project root.

  • If it doesn't exist: this is the first run. Score everything in Step 2 and the snapshot saved in Step 4 becomes the baseline; Step 3's comparison is skipped (no prior data).
  • If it exists but parses as malformed JSON: warn one line, treat as empty, continue.

Step 2: Score Current State

Dispatch the nlpm:scorer and nlpm:vague-scanner agents in parallel to score all artifacts (or artifacts at the given path).

Step 3: Compare Against History

Filter the loaded snapshots to only those whose scope matches the current scope — otherwise a path-bound trend would be compared against full-repo baselines and produce nonsense deltas. The scope is derived from the current invocation's arguments using the same mapping as commands/shared/append-history.md.

For each artifact in the current score:

  • Find its most recent entry in the filtered history
  • Compute delta: current_score − historical_score
  • Flag: improved (delta > 0), degraded (delta < 0), unchanged (delta == 0), new (no history)

If the filtered history is empty (first run for this scope), skip the delta computation and label every artifact new.

Step 4: Save Snapshot

Persist this run by following commands/shared/append-history.md with the scope determined in Step 3, the per-file scores from Step 2, and the file count. The partial handles file creation, deduplication, and atomic write.

Step 5: Report

NLPM Trend Report

Snapshot: 2026-03-28 (3rd snapshot, 2 previous)

File                              Score   Previous  Delta
--------------------------------------------------------------
agents/scorer.md                  95      92        +3 improved
agents/scanner.md                 90      90         0 unchanged
commands/score.md                 95      88        +7 improved
skills/nlpm/scoring/SKILL.md      85      85         0 unchanged
.claude/rules/testing.md          78      82        -4 degraded
commands/fix.md (NEW)             88      --        new

Overall: 88/100 (was 87, +1)

Degraded (needs attention):
  .claude/rules/testing.md  82 → 78 (-4)

Trend: 3 snapshots — 82 → 87 → 88 (improving)

Read the full file on GitHub · 71 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 · 71 lines · 14 tokens per session scan A 59df9900ba76

Subscribe to this mod's changes

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