principle-build-the-lever

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

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

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 a deterministic tool (codemod, script, generator, or delegate skill) that does or proves the work, so the artifact itself can be rerun and reviewed. ## Core Features & Use Cases - Lever-First Workflow: Do the first unit by hand to learn the recipe, then build the tool and prove it by diffing its output against the hand-done version. - Tool Selection Guidance: Use codemods or scripts for edits, generators for repetitive files, dump-to-sqlite queries for analysis, and rerunnable checks for verification. - Subagent Contract Pattern: When fanning work out to subagents, write the recipe, verification contract, and do-not-touch fences as a shared skill outside the delegates' write scope. - Use Case: Migrating hundreds of files to a new API? Instead of editing each one, write a codemod, verify it against one hand-edited file, rerun it across the codebase, and commit the script so reviewers can rerun it. ## Quick Start Ask the agent to apply the build-the-lever principle by writing a rerunnable script or codemod for the current migration instead of editing files manually.

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?▼

Build a codemod or script that performs the edit deterministically instead of editing files by hand. First do one unit manually to learn the recipe, then write the tool and verify it by diffing its output against your hand-done version before running it everywhere.

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

Write a script 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: even a one-off task earns a tool when the tool is what makes the work checkable by a reviewer.

How do I keep subagents consistent when delegating bulk work?▼

Write the recipe, verification contract, and do-not-touch fences as a single skill file that every subagent reads. Keep that file outside the delegates' write scope so they cannot quietly edit the contract, ensuring all delegates inherit the same hardened instructions.

What are the limitations of fanning out manual edits to subagents?▼

Fan-out for hand-applied edits causes drift, since each delegate re-interprets the prompt and applies changes inconsistently. A deterministic lever that processes every unit in one pass beats delegation; only fan out when the work cannot be scripted.

How does a reviewer verify automated code changes?▼

The tool itself is the verification artifact: a reviewer reads and reruns the committed codemod or script to confirm the changes. Hand-done edits can only be re-verified by redoing them, while a deterministic script turns trust into a rerunnable check.