principle-build-the-lever

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

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/squidllee/skills --skill principle-build-the-lever-squidllee
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: principle-build-the-lever
Source: https://github.com/squidllee/skills/tree/main/principle-build-the-lever
Command: npx skills add https://github.com/squidllee/skills --skill principle-build-the-lever-squidllee

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 replaces manual edits, migrations, analyses, and checks with a deterministic tool that produces the same result every time and can be rerun on demand. ## 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 its output against the hand-done version. - Deterministic Over Fan-Out: Prefer one script that processes every unit in a single pass over delegating repetitive hand-application to subagents. - Delegate Skill Contracts: When fan-out is necessary, write the recipe, verification contract, and do-not-touch fences as a shared skill outside the delegates' write scope. - Use Case: Migrating 200 files to a new API? Build 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 this principle to my current refactoring task by building a rerunnable script that performs the edits and proves the result.

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 across the rest.

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

Build a tool whenever the work is non-trivial: edits, migrations, analyses, or checks a reviewer needs to re-verify. Skip the tool only for genuinely trivial tasks, meaning a couple of obvious edits you can see 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. Use subagents only when the work cannot be scripted, and give them a shared skill containing the recipe and verification contract.

How do I make automated changes reviewable by teammates?▼

Commit the codemod, script, or generator alongside the changes it produced. A reviewer can then read the tool and rerun it to check the work, instead of trusting hand-done edits that can only be re-verified by redoing them.

What are the limits of building a tool for one-off tasks?▼

A one-off still earns a tool when the tool is what makes the work checkable, but keep it minimal. Build the smallest script that does or proves the job rather than a framework, and skip tooling entirely for trivial edits.