principle-build-the-lever

Builds codemods, scripts, and generators to automate non-trivial code changes.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Hand-applied edits, migrations, and checks are slow, inconsistent, and impossible for a reviewer to re-verify without redoing the work. This Skill replaces manual effort with a rerunnable tool that performs or proves the change. ## Core Features & Use Cases - Tool-First Workflow: Do the first unit by hand to learn the recipe, then build a codemod, script, or generator and validate it by diffing against the hand-done version. - Deterministic Verification: Produces a single artifact a reviewer can rerun to confirm the work, turning "trust me" into "run this". - Subagent Coordination: Writes the recipe, verification contract, and do-not-touch fences as a shared skill so delegated subagents follow one hardened version instead of drifting. - Use Case: When migrating hundreds of call sites to a new API, write a codemod that applies the change in one pass and commit it so the next run reruns the tool instead of redoing the edits. ## Quick Start Ask the agent to apply the build-the-lever principle by writing a rerunnable codemod or script for the migration 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 with a codemod?▼

Do the first edit by hand to learn the recipe, then write a codemod or script that applies the same transformation. Prove it works by rerunning it on that first unit and diffing the output against your manual version.

When should I build a script instead of editing files by hand?▼

Build a tool for any non-trivial work: bulk edits, migrations, analyses, or checks. Skip it only when the task is genuinely trivial, meaning a couple of obvious edits you can verify at a glance.

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

Write the recipe, verification contract, and do-not-touch fences as a shared skill file that every subagent reads. Keep it outside the delegates' write scope so they cannot quietly edit the contract.

What are the limitations of hand-applying changes across a codebase?▼

Hand-done changes can only be re-verified by redoing them, and each application may drift. A deterministic script produces one artifact a reviewer can rerun, giving consistent results and checkable verification.

Should I commit the codemod or script after running it?▼

Commit the tool when the work outlives the session, so future runs rerun it instead of redoing the work. Keep the script minimal, the smallest thing that does or proves the job, never a framework.