principle-build-the-lever
cursor/plugins
Build tools (codemods, scripts, generators) to automate non-trivial work instead of doing it by hand.
What is principle-build-the-lever?
This principle guides you to create reusable, verifiable tools for any substantial task—edits, migrations, analyses, or checks. Rather than manual work, build a codemod, script, generator, or skill that does the job deterministically, making the work reviewable and rerunnable.
- Create codemods or scripts to automate repetitive edits and transformations
- Build generators for producing multiple similar files or structures
- Write deterministic verification scripts and analysis queries
- Encode work recipes as reusable skills for subagents to follow
- Produce artifacts that reviewers can read, understand, and rerun to verify correctness
How to install principle-build-the-lever
npx skills add https://github.com/cursor/plugins --skill principle-build-the-leverHow to use principle-build-the-lever
- 1.Do the first unit of work by hand to learn the pattern
- 2.Build the tool (codemod, script, or generator) that implements that pattern
- 3.Rerun the tool on the first unit and verify the output matches your hand-done version
- 4.Apply the tool to all remaining units in one pass or distribute as a skill to subagents
- 5.Commit the tool artifact so the work is reviewable and rerunnable
Use cases
- Automating a codebase migration across hundreds of files
- Building a script to verify a compliance check across your project
- Creating a generator for boilerplate code instead of copying templates manually
- Writing a codemod to apply a consistent refactoring pattern
- Encoding a complex editing recipe as a skill so subagents apply it identically
- Engineers automating large-scale code changes
- Teams performing migrations or bulk refactors
- Developers building verification and analysis tools
- Anyone coordinating work across multiple agents or reviewers
principle-build-the-lever FAQ
Only when the task is trivial—a couple of obvious edits you can see at a glance. For anything non-trivial, the tool is worth building.
A codemod, script, generator, reusable skill, or deterministic verification query. If you cited this principle but produced no tool in the diff, you didn't apply it.
Build the smallest script that does or proves the job. Per the Laziness Protocol, avoid over-engineering; focus on solving the immediate problem.
Yes. A one-off still earns a lever when the lever is what makes the work checkable and reviewable by others.
Write the lever as a skill they all read, keeping it outside their write scope so they can't edit the contract. The skill becomes the shared recipe and verification contract.
Full instructions (SKILL.md)
Source of truth, from cursor/plugins.
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.
Why: Two payoffs. Throughput: a codemod, generator, or script does the work the same way every time and reruns for free. Confidence: 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".
Pattern: 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.
Balance: 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, build the smallest script that does or proves the job, never a framework.
Distinct from Encode Lessons in Structure, 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.
Related skills
More from cursor/plugins and the wider catalog.

principle-encode-lessons-in-structure
Encode recurring corrections as lint rules, metadata flags, and runtime checks instead of repeating instructions.

principle-exhaust-the-design-space
Explore 2-3 competing prototypes before committing to novel UI or architectural decisions.

principle-experience-first
Prioritize user delight over implementation convenience—ship fewer polished features instead of many rough ones.

principle-fix-root-causes
Trace bugs to root causes instead of patching symptoms during debugging.

principle-foundational-thinking
Design data structures and core types before writing logic to make downstream code obvious.

principle-guard-the-context-window
Manage finite context by routing bulk data to subagents and keeping summaries in the main thread.