principle-build-the-lever

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

4|1|Updated Dec 16, 2023
One-click install
npx skills add https://github.com/Shtian/AuthentiClash --skill principle-build-the-lever-shtian
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: principle-build-the-lever
Source: https://github.com/Shtian/AuthentiClash/tree/main/.claude/skills/principle-build-the-lever
Command: npx skills add https://github.com/Shtian/AuthentiClash --skill principle-build-the-lever-shtian

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Non-trivial work done by hand—bulk edits, migrations, analyses, and checks—cannot be re-verified without redoing it, leaving reviewers with nothing to rerun and no proof the work is correct. ## 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 deterministic tool over delegating hand-applied changes to subagents; when fan-out is needed, write the recipe as a skill outside the delegates' write scope. - Reviewable Artifacts: The tool itself is the artifact a reviewer can read and rerun, turning "trust me" into "run this"; commit the lever when the work outlives the session. - Use Case: When migrating hundreds of files to a new API, build a codemod, verify it against one hand-edited file, and rerun it across the codebase instead of editing each file manually. ## Quick Start Apply this principle to my next non-trivial task by building a rerunnable script or codemod that performs and proves the work.

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 applying it everywhere.

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

Build a tool for any non-trivial work, not just bulk work. Skip the tool only when the task is trivial—a couple of obvious edits you can verify at a glance. A one-off still earns a script when the script is what makes the work checkable.

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

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. When fan-out is necessary, write the recipe as a shared skill outside the delegates' write scope.

How do I make automated changes reviewable by teammates?▼

Commit the tool itself as the reviewable artifact. A reviewer can read and rerun a deterministic script to verify the work, whereas hand-done changes can only be re-verified by redoing them.

What are the limitations of the build-the-lever approach?▼

The approach is overkill for trivial tasks where edits are obvious at a glance. It also requires keeping the tool minimal—build the smallest script that does or proves the job, never a framework.