/discipline:script-the-deterministic-work [lever-check <block summary>]from discipline
Re-anchors the discipline of scripting deterministic work (counting, diffing, transforms, arithmetic, tallying) instead of eyeballing or guessing. Fires on drift detection, not work orders.
Ships in discipline. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A drift corrector for the discipline of offloading deterministic sub-work to
a script instead of performing it in your head. The shared method (re-anchor,
audit the work in flight, correct forward, report) lives in
${CLAUDE_PLUGIN_ROOT}/context/re-anchor-audit-correct.md.
Read it; this file adds only what is specific to scripting deterministic work.
When a sub-task is purely deterministic (its answer follows mechanically from its input with no judgment in the middle), write a script (or invoke a tool) that produces the answer, run it, read the output, and reason only after, over that output. Counting, diffing, sorting, transforming, matching, sweeping across files, and arithmetic are the recurring shapes. A hand-tallied count or an eyeballed diff carries a silent error the script would not.
The boundary of what to script is not "anything tedious". It is set by which enforcement tier the sub-work belongs to.
The source of truth for the tier distinction is the consuming organization's enforceability-tiers convention, which classifies work by who can decide it. Resolve it per the method doc's ladder, the consumer's own instruction layer first, then that standards convention, then the portable baseline below, and re-anchor the distinction rather than restating the doc's criteria:
When the consuming project declares no such convention, re-anchor that same three-tier shape as the portable baseline.
The enforceability-tiers convention routes a recurring finding to the mechanism its tier permits; it does not speak to the in-task move this skill re-anchors: "this task needs a count or a diff now, so script it now." When the consuming project's standards source declares a convention for it, route through it; when it does not, treat that as a flagged gap (a candidate upstream standards addition), not license to invent a rubric here beyond the portable baseline above.
The discipline runs in both directions. Analysis feeds input to a script and reasons over its output; generation emits deterministic structure from a script or template and fills only the judgment slots by hand. A PR body, an issue body, a report, a skill skeleton, or config boilerplate is mostly fixed scaffold; reserve model output for the slots that need judgment. Prefer a native mechanism where one exists: a repo's pull-request or issue templates, for instance, already emit the scaffold with no generation cost.
Name concrete, located findings (per the method doc's step 2, self-audit; on load-bearing work a fresh-context subagent, or a review skill that runs in its own context, confirms a clean result, a declared delta: either one audits the work without this context's reasoning. Running the change's code or tests is this audit's own work and re-reading it inline is self-audit, so neither confirms):
build-the-lever principle).Correct each forward now: write and run the script or tool, read its real output, and re-derive the conclusion from that output. Do not keep the hand-computed figure alongside it. Where the sub-work is detect-then-judge, script the detection and keep the verdict; where it is reasoning-only, leave it un-scripted and say why. Where an existing script already over-reaches into judgment, correct in the other direction. de-script it: demote a detect-then-judge flag back to a candidate the model rules on, and return reasoning-only work to reasoning rather than letting the script's output stand as the answer.
Resolve the verification level once with
bash "${CLAUDE_PLUGIN_ROOT}/lib/read-verification.sh" --plugin discipline --skill script-the-deterministic-work --file docs/conventions/discipline.yaml
and report its line (levels):
The method doc's steps 2-4 say what light and off skip and the line the reply then carries. light and off also skip the review skill that would stand in for one.
A recurring deterministic finding goes to a standing mechanism (a
linter, analyzer, or commit hook that fires on every change). That is the
territory of an automation-gaps capability
(/harness-config:audit-automation-gaps (if enabled); prose
guidance otherwise).
This skill owns the one-off, session-time need: the current task needs a count, a diff, or a transform right now, so make a script now, often throwaway, feed it the input, and reason over its output. A short throwaway script that runs and returns real output satisfies the discipline.
lever-check <block summary>)$ARGUMENTS whose first word is lever-check selects this mode; any other
text runs the corrector above, with the text read as the request. The mode
answers one question for a block of work that applies one change at several
sites: build a lever (a script or tool that makes the change at every site),
or edit each site by hand. /implementation:implement (if enabled) calls it before a
block that applies one change at three or more sites, and
/implementation:implement-dispatch (if enabled) calls it before it fans one change out
to workers. The block summary names the change, the sites, and how many
there are.
lever_scope, once per call, lowest layer first: the default
deterministic; the user's option, ${user_config.lever_scope} (empty or
a literal, unexpanded placeholder means unset); and the lever_scope key
of the repository's docs/conventions/discipline.yaml, which wins when
set, read only under the root rule in
${CLAUDE_PLUGIN_ROOT}/reference/config.md.
A value other than deterministic or non-trivial is named with its file
or option, the key and the value, and that layer is dropped: a valid
repository value still wins over an invalid user value, and an invalid
repository value resolves deterministic, never the user's value. An
invalid value never stops the check. Report one line, for example
lever_scope: non-trivial (docs/conventions/discipline.yaml).build-a-lever or edit-by-hand, with the reason.
deterministic: build-a-lever for a mechanical change; a
throwaway script is enough. edit-by-hand for a change that needs
judgment, naming the kind of site that needs it.non-trivial: a mechanical change gets the same answer as under
deterministic. A change that needs judgment also gets
build-a-lever, unless it is a few one-line edits that cost less to
make than a tool would cost to set up. For it the lever is an
established codemod or refactoring tool for the language (a
language-server rename, a structural search-and-replace tool, the
ecosystem's codemod runner), never a refactoring script written from
scratch for this change. When no such tool covers the change, answer
edit-by-hand and say that no tool fit.build-a-lever for the change; it never
turns an edit-by-hand answer into build-a-lever, and it adds no
exception to the bullets' own rules. Where it applies, reach for tools
in this order: an established codemod or structural-rewrite tool for the
language (the ecosystem's codemod runner, a structural search-and-replace
tool, a language-server refactoring) first; a written script only when no
such tool covers the change and the bullet that answered
build-a-lever allows one (a mechanical change under either value). A
migration that needs judgment under non-trivial with no covering tool
is edit-by-hand, as above. A migration piloted this way still takes
the pilot step below, on one site. lever_scope keeps its default
deterministic; this row changes the order of tools, not the scope.build-a-lever, under either value, the
caller edits the first site by hand, runs the lever on a clean copy of
that site, and diffs the two results. A difference means the lever is
wrong: fix it and diff again before it touches any other site. Then run
the lever a second time, on its own output for that site, and diff
against that output: expect no diff. A lever that changes its own output
on a rerun cannot be rerun safely across the remaining sites, where a
retry after a partial run lands on sites it already changed; a diff here
means the lever is wrong too, so fix it and repeat both diffs (pstack's
build-the-lever principle).one-pass: yes or one-pass: no. yes means a
single run of the lever covers every unit, so the caller dispatches one
worker that builds, pilots and runs the lever over all of them instead of
one worker per unit editing by hand. no names the units the lever cannot
reach.Report the result as these lines, then return to the caller:
lever_scope: <value> (<layer>)
answer: build-a-lever | edit-by-hand
reason: <one sentence>
one-pass: yes | no (fan-out calls only)
The mode answers and stops. It writes no lever and edits no file; the caller does the work under its own cadence.
/discipline:reason-dont-recite, which interrogates inherited content.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
deterministic-work, scripting, automation, discipline, drift-correction
18 skills in this plugin
/be-ambitiousBe ambitiousRaise a request before work (altitude, depth, range, outside check) and wait, or deepen finished work and redo it with an outside check./do-your-researchDo your researchRe-anchor research discipline: audit/correct work and pending recommendation (research properly, grounded, cite, verify, evidence not vibes, stop assuming, guessing, training-data recall, re-check what you recommended), or deep research pass to audit all claims. Use when 'do your research', 'fact-check that', 'verify every claim', or at start./follow-operating-proceduresFollow operating proceduresReread the user's and project's instruction files in force (CLAUDE.md, rules, imports), remind/remember how we work and operate, check work in flight against them, and correct drift or report clean. Use when 'follow operating procedures', 'reread my instructions', 'reread CLAUDE.md', or operating outside my instructions./follow-our-standardsFollow our standardsRe-anchor to organization engineering standard, audit work in flight (or --repo) for drifting from our standard and convention, and correct violation with doc citation. Use when 'follow our standards', 'does this match our conventions', 'audit against standards', or at conversation start on a repo governed by shared standard and convention./hold-my-handHold my handStanding hand-hold posture to guide multi-step work one phase at a time: show only current phase (exact step, output, failure, actor, reply), later as 'Phase 1 of N'. Use when 'hold my hand', 'walk me through this', 'one step at a time'. Not for lists: /adhd:shape; message: /adhd:clarify; scripts: /wizard:generate; stage: /session-flow:workflow./mind-your-maximsMind your maximsRe-anchor cooperative communication quality (Grice maxim plus AI transparency): audit recent response and artifact for completeness (neither too little nor too much), relevance (stay on topic), clarity (clear, not vague, answer the question), and disclosed boundary. Use when 'mind your maxims', 'answer what I asked', 'you buried the answer'.npx claudepluginhub melodic-software/claude-code-plugins --plugin disciplineOther plugins' skills for the same job