Arguments. [--full-sweep|--tools T1,T2|--ledger|--measure-only|fix] [--unattended]. Full form: [--full-sweep] every live tool, engine flag --tools from-baseline | [--tools T1,T2] | [--ledger] history | [--measure-only] read-only startup figures, see below | [fix] guided trim (explicit override) | [--unattended] nobody is present, see the Boundary sections
Measure-only mode (`--measure-only`)
For a read-only caller, such as a sweep that must write nothing outside its own data folder. Run
this and stop; skip the Prerequisites install offer and every Workflow step below:
node "${CLAUDE_PLUGIN_ROOT}/skills/audit/scripts/measure.mjs" snapshot --measure-only \
--sdk-dir "${CLAUDE_PLUGIN_DATA}/sdk"
- Output. One measurement session; the snapshot record on stdout, stamped as every report is.
Report categories (tokens per category) with the stamp.
- Writes nothing of its own. No ledger row, snapshot, report or other file, under the plugin
data directory or anywhere else. The engine refuses --out, --deny and --label here
(exit 2). Any file the spawned headless session keeps for itself is not this skill's output and
is not covered by this claim.
- Installs nothing. It never runs or offers the SDK install.
- Exit codes.
0measured;2usage error;3measurement failed (no binary, or the SDK
session failed); 4 the Agent SDK is absent, with a context-budget.error/1 record
(error: "sdk-absent") on stdout. It does not fall back to cli-parse, so exit 4 is not
exit 3. The engine also prints a one-line message on stderr; relay it and stop; the caller reports the area as not checked.
- Each measurement still spawns a short-lived headless session, as the full audit does.
Purpose
Per-skill, per-agent, and per-MCP-tool attribution stays with /context, which the person runs
(the Boundary section below). This skill covers what our measurements see /context report only
as totals: the built-in tool pools, System tools and System tools (deferred). This skill measures
that attribution on the consumer's own machine by A/B differencing: a baseline session versus one
session per candidate tool with that tool denied by bare name. The two attributed buckets compose differently, so price a basket
per bucket rather than as one number: deferred-side deltas add, and a basket's deferred saving is
the sum of its members; prefix-side deltas double-count, and their sum is only an upper bound on
what the basket saves on the prefix side. Confirm both on this binary with
attribute --verify-additivity, which reports its verdict per bucket.
Bundled files. Every reference file this skill links is in
${CLAUDE_PLUGIN_ROOT}/skills/audit/reference/. Read each one with the Read tool, never through
Bash (cat, sed, grep), Glob or Grep.
Two rules govern everything this skill says, per the plugin's