Skip to main content
skill CX Codex

principle-build-the-lever — Claude Code skill: build the tool, not

A skill that pushes the agent to write a codemod, script or generator for non-trivial work instead of editing by hand, so the result can be rerun.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add backnotprop/pstack --skill principle-build-the-lever -a claude-code
Open on GitHub

What principle-build-the-lever does

The rule is simple: when the work isn't trivial, build the tool that does it. That covers bulk edits, migrations, analyses and checks. Hand-done changes can only be re-verified by redoing them, while a script reruns for free and leaves a reviewer one artifact to read and run again.

Start by doing the first unit by hand to learn the recipe, then build the lever and prove it — rerun it on that unit and diff against your manual version. Edits get a codemod or script, repetitive files get a generator, analysis gets a dump-to-sqlite query, verification gets a rerunnable check. The tool has to be safe to rerun. If it can process every unit in one pass, run it yourself rather than fanning out delegates to hand-apply what a script already does.

When work does go 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, or the contract gets quietly edited. The skill ships with disable-model-invocation: true, so it acts as a rule rather than something the model calls on its own. The bar is triviality, not repetition — a one-off still earns a lever when the lever is what makes the work checkable. It advises the smallest script that does or proves the job, never a framework.

What it helps with

  • rewrite identical API calls across a repo
  • run a schema migration without missing files
  • generate repetitive files instead of copy-pasting them
  • leave reviewers an artifact they can rerun
  • verify a bulk edit without redoing it by hand

Example prompts for the agent

  • Build a codemod for this migration instead of editing files one by one
  • Write a script that checks every changed file and show me how to rerun it
  • Turn the recipe and verification contract into a skill for the subagents

How to install principle-build-the-lever

1Skills CLI (Vercel)

npx skills add backnotprop/pstack --skill principle-build-the-lever -a claude-code

2Manually: put the files in place

~/.claude/skills/principle-build-the-lever/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/principle-build-the-lever/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about principle-build-the-lever

How do I install principle-build-the-lever in Claude?

Run npx skills add backnotprop/pstack --skill principle-build-the-lever -a claude-code. The skill file lands at ~/.claude/skills/principle-build-the-lever/SKILL.md.

What does principle-build-the-lever do?

It makes the agent build a tool for the task: a codemod, script, generator or a skill for subagents. Instead of hand work you get an artifact a reviewer can read and rerun.

When does the skill allow skipping the tool?

Only when the task is trivial — a couple of obvious edits you can see at a glance. Repetition isn't the test: a one-off still earns a lever when the lever is what makes the work checkable.

Source text

SKILL.md · MIT
---
name: principle-build-the-lever
description: "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."
disable-model-invocation: true
---
# Build the Lever

When the work isn't trivial, build the tool that does it instead of doing it by hand.

A 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".

Default to building the lever. Skip it only when the task is trivial, a couple of obvious edits you can see at a glance.

- 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.
- Codemod or script for edits, generator for repetitive files, a dump-to-sqlite query for analysis, a rerunnable check for verification.
- 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.
- 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.
- 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.
- Commit the lever when the work outlives the session.

The bar is triviality, not repetition. A one-off still earns a lever when the lever is what makes the work checkable. Per the [Laziness Protocol](../principle-laziness-protocol/SKILL.md), build the smallest script that does or proves the job, never a framework.

Distinct from [Encode Lessons in Structure](../principle-encode-lessons-in-structure/SKILL.md), which makes a recurring instruction a durable guardrail. This is throughput and reviewability on the work in front of you. For scripting the verification itself, see [Prove It Works](../principle-prove-it-works/SKILL.md).

© backnotprop · MIT · backnotprop/pstack

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set44

principle-migrate-callers-then-delete-legacy-apis Instructs the assistant to migrate internal callers and delete legacy APIs in a single wave, skipping temporary compatibility layers. CX Codex +1 5,200installs principle-model-the-domain Guides an agent to model domain rules in data structures instead of growing conditionals. Use it when stateful code or repeated shape assumptions start spreading. CX Codex +1 5,200installs principle-redesign-from-first-principles A skill that makes the agent rebuild an existing design as if the new requirement had been there from day one. Use it when a change ripples through types, docs, and examples. CX Codex +1 5,200installs principle-never-block-on-the-human Instructs coding agents to execute reversible changes immediately instead of asking for approval. Useful for autonomous sessions under asynchronous supervision. CX Codex +1 5,200installs principle-make-operations-idempotent A skill for writing commands and processing loops that converge to the same state regardless of restarts, crashes, or retries. Use it when operations need to survive partial runs and still reach the correct outcome. CX Codex +1 5,200installs principle-subtract-before-you-add A development skill that enforces removing dead code, stubs, and unused validators before writing new features or refactoring. CX Codex +1 5,200installs maintain-verification-skill Keep a project's verification guide and feature map aligned with its code. The skill checks each mapped feature against the live app and flags confirmed fixes. CX Codex +1 5,200installs no-comments The skill spawns a comment-sicko subagent, deletes comments that explain nothing, and asks you before encoding real constraints as checks. CX Codex +1 5,200installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor