principle-build-the-lever

Guides building codemods, scripts, and generators instead of performing non-trivial work by hand.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Non-trivial work done by hand—bulk edits, migrations, analyses, checks—cannot be re-verified without redoing it, and reviewers must trust the author instead of rerunning an artifact. This principle replaces hand work with a deterministic tool that does or proves the job. ## 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-pass tool over delegating repetitive edits to subagents; when delegation is needed, write the recipe as a shared skill outside the delegates' write scope. - Reviewable Artifacts: The tool itself is the deliverable a reviewer can rerun, turning "trust me" into "run this". - Use Case: Migrating 200 call sites to a new API—write a codemod, verify it on one file against a manual edit, then run it across the codebase and commit the script for future reruns. ## Quick Start Apply the build-the-lever principle to this migration task and produce a rerunnable codemod instead of editing files 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 a codebase?▼

Do the first edit by hand to learn the recipe, then write a codemod or script that applies it. Prove the tool by rerunning it on that first unit and diffing against your manual version before running it everywhere.

When should I write a script instead of doing edits by hand?▼

Build the tool for any non-trivial work, not just bulk work. Skip it only when the task is genuinely trivial—a couple of obvious edits you can verify at a glance. The bar is triviality, not repetition.

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

A deterministic lever beats fan-out. If a tool can process every unit in one pass, run it yourself rather than delegating hand-applied edits. When delegation is unavoidable, write the recipe as a shared skill all subagents read.

How does a codemod help with code review?▼

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, while a deterministic script turns trust into an executable check.

When is building an automation tool not worth it?▼

Skip the lever only for genuinely trivial tasks. Per the Laziness Protocol, build the smallest script that does or proves the job—never a framework—and commit it only when the work outlives the session.