principle-build-the-lever

Guides building rerunnable codemods, scripts, and generators instead of manual edits.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Non-trivial engineering work done by hand is slow, inconsistent, and impossible for a reviewer to re-verify without redoing it. This Skill enforces a working principle: build a deterministic tool (codemod, script, generator, or delegate skill) that performs 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 a tool that reproduces it and diff the tool's output against the hand-done version. - Tool Selection Guidance: Choose 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, encode 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? Build a codemod, prove it on one file against your manual edit, then rerun it across the codebase and commit it for future reruns. ## Quick Start Ask the AI to apply the build-the-lever principle to your next migration or bulk edit so it produces a rerunnable script instead of hand-editing files.

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 edit by hand to learn the recipe, then write a codemod or script that reproduces it. Verify the tool by diffing its output against your hand-done version, then rerun it across all remaining files.

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

Build a tool 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, because the tool is what makes the work reviewable and rerunnable.

How do I keep subagents consistent when delegating bulk work?

Write the recipe, verification contract, and do-not-touch fences as a shared skill that every delegate reads. Keep that artifact outside the delegates' write scope so no subagent can quietly modify the contract.

What are the limitations of hand-done bulk changes?

Hand-done changes can only be re-verified by redoing them, giving reviewers no artifact to check. A deterministic script turns verification into rerunning one file, which is why the principle treats a missing tool as proof the approach was not applied.

Should I commit the automation script after the task is done?

Commit the tool whenever 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, rather than a framework.