principle-build-the-lever
Apply when work will be reused in later sessions, rerun by a reviewer, or carried out by delegates: edits, migrations, analyses, checks.
- License 许可
- MIT
- 最近更新
- 2026-11-03
- Stars
- ★ 10
- Forks
- 2
01 前言 Front Matter
- name
- principle-build-the-lever
- description
- Apply when work will be reused in later sessions, rerun by a reviewer, or carried out by delegates: edits, migrations, analyses, checks.
- user-invokable
- false
- disable-model-invocation
- false
03 SKILL.md 正文
Build the Lever
When work must be repeated in a later session, rerun by a reviewer, or carried out by delegates, build the tool that does or proves it instead of doing it by hand.
A codemod, generator, or script does the work the same way every time and reruns for free. 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. A deterministic script turns "trust me" into "run this".
A lever outlives the session. Combining tool calls inside the current session is codemode's job (<codemode> in the system prompt), and that script is discarded when the session ends. Promote it to a lever once it must exist afterwards: another session will reuse it, a reviewer will rerun it, or delegates will follow it.
- Do the first unit by hand to learn the recipe, then build the tool. Prove it by rerunning it on that unit and diffing against your hand-done version. Make the lever safe to rerun.
- Codemod or script for edits, generator for repetitive files, a dump-to-sqlite query for analysis, a rerunnable check for verification.
- When you fan work out to subagents, write the lever as a skill they all read: the recipe, the verification contract, and the do-not-touch fences in one artifact. Keep it outside the delegates' write scope so they can't quietly edit the contract.
- Applying this principle produces a committed file. If you cited it and there is no codemod, script, generator, check, or delegate skill in the diff, you didn't apply it.
Per the Laziness Protocol, build the smallest script that does or proves the job, never a framework.
Distinct from Encode Lessons in Structure, which makes a recurring instruction a durable guardrail. This is throughput and reviewability on the work in front of you. For what a check must observe, see Prove It Works.
04 同仓库更多 Skills
changelog
Write the changelog entry for a pull request. Use when a PR changes behavior that users, operators, or integrators can notice.
writing-good-tickets
Write, file, or update an issue or ticket that an agent or a developer can take to one PR. Use when filing a bug or feature, updating an issue, or breaking a plan into tickets.
writing-good-prs
Write or update a pull request title and body that a reviewer can trust and own. Use when opening a PR or editing its description.
writing-good-commits
Write or reword a git commit message and size the commit it describes. Use when committing, or when reshaping commits during a rebase.
writing-for-agents
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.
wizard
Generate an interactive bash wizard that walks a human through steps only they can perform. Use when provisioning infrastructure, setting up credentials or CI secrets, walking an unfamiliar third-party dashboard, or running a one-off migration or cutover. Don't invoke this for steps the agent can perform itself.