principle-build-the-lever

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

2|Updated Jun 27, 2026
One-click install
npx skills add https://github.com/imjasonh/playground --skill principle-build-the-lever-imjasonh
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: principle-build-the-lever
Source: https://github.com/imjasonh/playground/tree/main/.cursor/skills/principle-build-the-lever
Command: npx skills add https://github.com/imjasonh/playground --skill principle-build-the-lever-imjasonh

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Non-trivial work done by hand is slow, inconsistent, and impossible for a reviewer to re-verify without redoing it. This Skill enforces a working principle: for any non-trivial edits, migrations, analyses, or checks, build the tool that does or proves the work so the result is a rerunnable artifact. ## Core Features & Use Cases - Lever-First Pattern: 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 deterministic script that processes every unit in one pass instead of delegating hand-applied changes to subagents. - Delegate Skill Contracts: When fan-out is necessary, write the recipe, verification contract, and do-not-touch fences as a skill outside the delegates' write scope. - Use Case: When migrating hundreds of files to a new API, write a codemod, rerun it on the first migrated file, diff against the manual version, and commit the codemod alongside the changes. ## 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?▼

Write a codemod or script that performs the edit deterministically, then prove it by rerunning it on one file you edited by hand and diffing the results. Commit the script alongside the changes so reviewers can rerun it.

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

Build the tool whenever the work is non-trivial, meaning anything beyond a couple of obvious edits you can verify at a glance. The bar is triviality, not repetition, since even one-off work earns a lever when the lever makes it checkable.

Should I fan out bulk edits to subagents or use a script?▼

A deterministic lever beats fan-out. If a script can process every unit in one pass, run it yourself rather than delegating hand-applied changes. Reserve subagent fan-out for work a script cannot do, and give delegates a written skill contract.

What are the limitations of hand-done code changes in reviews?▼

Hand-done changes can only be re-verified by redoing them, so reviewers must trust the author. A deterministic script turns that into an artifact anyone can rerun, which is why this principle requires a codemod, script, or generator in the diff.

How big should the automation script be for a one-off task?▼

Build the smallest script that does or proves the job, never a framework. The goal is a rerunnable artifact a reviewer can execute, not reusable infrastructure.