principle-build-the-lever
Agent skill frombacknotprop/pstack
Apply to any non-trivial work, not just bulk work: edits, migrations, analyses, checks. Build the tool that does it or proves it (codemod, script, generator, or a skill your subagents follow) instead of working by hand. The tool is the artifact a reviewer can rerun.
How to install principle-build-the-lever
install principle-build-the-lever
# install the pstack pack with the skills CLI
npx skills add backnotprop/pstack# or add only this skill to Claude Code: copy the folder
skills/principle-build-the-lever/
# into
~/.claude/skills/principle-build-the-lever/ (all projects)
.claude/skills/principle-build-the-lever/ (one project)
1# Build the Lever23When the work isn't trivial, build the tool that does it instead of doing it by hand.45A codemod, generator, or script does the work the same way every time and reruns for free. The tool is one artifact a reviewer can read and rerun to check the work. Hand-done changes can only be re-verified by redoing them. A deterministic script turns "trust me" into "run this".67Default to building the lever. Skip it only when the task is trivial, a couple of obvious edits you can see at a glance.89- Do the first unit by hand to learn the recipe, then build the tool. Prove it by rerunning it on that unit and diffing against your hand-done version. Make the lever safe to rerun.10- Codemod or script for edits, generator for repetitive files, a dump-to-sqlite query for analysis, a rerunnable check for verification.11- A deterministic lever beats fan-out. If the tool can process every unit in one pass, run it yourself. Don't fan out delegates to hand-apply what a script can do.12- When you fan work out to subagents, write the lever as a skill they all read: the recipe, the verification contract, and the do-not-touch fences in one artifact. Keep it outside the delegates' write scope so they can't quietly edit the contract.13- Applying this principle produces a file. If you cited it and there is no codemod, script, generator, or delegate skill in the diff, you didn't apply it.14- Commit the lever when the work outlives the session.15…
Excerpt shown under the repository's MIT license.
