principle-build-the-lever

Builds rerunnable codemods, scripts, and generators instead of performing edits by hand.

6.6k|542|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/cursor/plugins --skill principle-build-the-lever
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: principle-build-the-lever
Source: https://github.com/cursor/plugins/tree/main/pstack/skills/principle-build-the-lever
Command: npx skills add https://github.com/cursor/plugins --skill principle-build-the-lever

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Hand-applied edits, migrations, and analyses cannot be re-verified without redoing the work, leaving reviewers with no artifact to check. This Skill enforces a working principle: for any non-trivial task, build the tool that does or proves the work so the result is deterministic and rerunnable.

Core Features & Use Cases

  • Lever-First Workflow: Do the first unit by hand to learn the recipe, then build a codemod, script, or generator and prove it by diffing against the hand-done version.
  • Deterministic Over Fan-Out: Prefer a single-pass script over delegating repetitive edits to subagents; when delegation is needed, write the recipe as a shared skill outside the delegates' write scope.
  • Use Case: When migrating hundreds of files to a new API, write a codemod, verify it against one hand-edited file, rerun it across the codebase, and commit it so reviewers and future runs can re-execute it.

Quick Start

Apply the build-the-lever principle to this migration by writing a rerunnable codemod instead of editing each file by hand.

Frequently Asked Questions about principle-build-the-lever

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate repetitive code edits across many files?

Do the first file by hand to learn the recipe, then write a codemod or script that applies the same transformation. Prove it by rerunning on that first file and diffing against your hand-done version before running it everywhere.

When should I write a script instead of editing files manually?

Build the tool for any non-trivial work, including one-off tasks where the script is what makes the work checkable. Skip it only for genuinely trivial edits, a couple of obvious changes you can verify at a glance.

Should I use subagents or a script for bulk code changes?

Prefer a deterministic script that processes every unit in one pass over fanning out delegates to hand-apply changes. If you do delegate, write the recipe, verification contract, and do-not-touch fences as a shared skill all subagents read.

How do I make automated code changes reviewable?

Commit the codemod or script alongside the changes so a reviewer can read and rerun it. A rerunnable artifact turns verification into running the tool again instead of trusting hand-applied edits.

What are the limits of the build-the-lever approach?

It does not apply to trivial edits visible at a glance, and it should stay minimal: build the smallest script that does or proves the job, never a framework. It is distinct from encoding recurring rules as durable guardrails.