Skip to content
Skill Authoring
Command

/score

Score NL programming artifacts — 100-point quality score per file

BOOST
From plugin
nlpm
15315 skills8 agents15 commands1 hook
Install
> /plugin marketplace add xiaolai/nlpm
> /plugin install nlpm@xiaolai

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/score

Context preview

What this command does when you run it.

Score NL programming artifacts — 100-point quality score per file

Command definition

score.md
name: score
description: "Score NL programming artifacts — 100-point quality score per file"
argument-hint: "[path]"
allowed-tools: Read, Write, Glob, Grep, Bash, Task

User Input

$ARGUMENTS

Workflow

Step 1: Load Config

Read `.claude/nlpm.local.md` if it exists. Extract `score_threshold` (default: 70).

Step 2: Parse Arguments

| Input | Behavior | |-------|----------| | (empty) | Score all Category A+B artifacts in cwd | | directory path | Score all artifacts under that directory | | file path | Score that single file | | --changed | Score only files changed since last commit (uses `git diff --name-only HEAD`) |

If `--changed` is present: run `git diff --name-only HEAD` to get changed files, then filter through `${CLAUDE_PLUGIN_ROOT}/commands/shared/classify.md` to keep only NL artifacts. Skip the full discovery step.

Step 3: Discover Artifacts

If path is a directory: use `${CLAUDE_PLUGIN_ROOT}/commands/shared/discover.md` to discover all NL artifacts. If path is a file: use `${CLAUDE_PLUGIN_ROOT}/commands/shared/classify.md` to determine its type.

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

Step 4: Score Artifacts

Dispatch two agents in parallel for each batch of up to 5 artifacts:

1. **`nlpm:scorer`** -- scores each artifact on the 100-point rubric (penalties, structure, heuristics) 2. **`nlpm:vague-scanner`** -- counts vague quantifier words mechanically (fast, haiku)

The scorer incorporates the vague-scanner's word counts into its penalty calculation. If the vague-scanner reports counts that differ from the scorer's own detection, use the vague-scanner's counts (deterministic grep is more reliable than heuristic detection for word counting).

Pass to both agents:

  • The artifact contents (read each file)
  • The artifact types (from classify.md)
  • Any rule overrides from the config (if `rule_overrides` is present in `.claude/nlpm.local.md`)

Collect results: per-artifact score + finding list.

Step 5: Report

NLPM Score Report

File                              Type      Score   Findings
───────────────────────────────────────────────────────────
{for each file}

Overall: {avg_score}/100 — {EXCELLENT|GOOD|ADEQUATE|WEAK|REWRITE}    [threshold: {score_threshold}]
  High: {N} | Medium: {N} | Low: {N}
  Below threshold: {N} files

Top findings:
  1. [{SEVERITY}] {file}:{line} — {finding} ({penalty})
  2. ...

Score guide: 90+ Excellent | 80-89 Good | 70-79 Adequate | 60-69 Weak | <60 Rewrite

**Error handling:**

  • File unreadable → skip with warning: "Skipped {path}: unreadable"
  • Malformed YAML frontmatter → score penalty -25, continue scoring on body
  • Empty file → score 0, finding: "Empty file"

Step 6: Append Snapshot to History

Persist this scoring run so `/nlpm:trend` has data to compare against. Follow `${CLAUDE_PLUGIN_ROOT}/commands/shared/append-history.md` with:

  • `files`: the per-file scores from Step 4 (one entry per scored artifact, with score + type)
  • `files_scored`: the count
  • `scope`: derived from Step 2's parsed arguments —
  • empty arguments → `"full"`
  • directory path → `"path:<directory>/"` (trailing slash)
  • single file path → `"path:<file>"`
  • `--changed` → `"changed"`

The partial handles file creation, deduplication of trivial repeats, and atomic write. Silent failure on write (e.g., read-only project) is acceptable — the score report the user just saw is the primary output; persistence is best-effort telemetry.

If Step 4 scored zero artifacts (no NL artifacts found), skip this step.

Read more
Ships withnlpm

Natural-Language Programming Manager — score, check, fix, and test NL artifacts across Claude Code, Codex CLI, and Antigravity. Tier-aware scoring with per-tool overlays. Part of the xiaolai plugin marketplace.

Get the whole plugin

Other commands on nlpm.

report
Command

report

Render a self-contained HTML report — per-file scores, score trend, cross-artifact graph, vocabulary noun-verb map, drift…

@xiaolai@xiaolaiInstall Command