principle-build-the-lever
Skill này làm gì
Cung cấp cho agent một quy tắc tự động hóa công việc lặp lại bằng một công cụ mà người review có thể chạy lại. Dành cho kỹ sư đối mặt với các thay đổi lớn, lặp lại hoặc khó kiểm chứng.
Khi nào nên dùng
- ✓Khi một thay đổi sẽ chạm vào nhiều file theo cùng một cách.
- ✓Khi bạn muốn phân tích hoặc kiểm tra mà người review có thể chạy lại.
- ✓Khi công việc sắp được làm tay mà một script có thể làm đáng tin cậy.
Liên kết skill
https://github.com/cursor/plugins/blob/main/harness/pstack/claude-code/skills/principle-build-the-lever/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Chúng ta cần đổi tên API này trong 200 file. Hãy viết một script có thể chạy lại, thay vì sửa từng file một.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent làm đơn vị đầu tiên bằng tay để học mẫu, rồi xây một công cụ có thể chạy lại như codemod. Nó chứng minh công cụ bằng cách chạy lại trên đơn vị đó và so sánh kết quả với bản làm tay.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Build the Lever
When the work isn't trivial, build the tool that does 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".
Default to building the lever. Skip it only when the task is trivial, a couple of obvious edits you can see at a glance.
- 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.
- A deterministic lever beats fan-out. If the tool can process every unit in one pass, run it yourself. Don't fan out delegates to hand-apply what a script can do.
- 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 file. If you cited it and there is no codemod, script, generator, or delegate skill in the diff, you didn't apply it.
- Commit the lever when the work outlives the session.
The bar is triviality, not repetition. A one-off still earns a lever when the lever is what makes the work checkable. 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 scripting the verification itself, see Prove It Works.
Câu hỏi thường gặp
Khi nào có thể bỏ qua việc xây công cụ?
Với công việc nhỏ, như vài chỉnh sửa hiển nhiên, làm tay là ổn.
Vì sao script tốt hơn làm tay?
Nó lặp lại cùng một cách mỗi lần, và người review có thể chạy nó để kiểm chứng công việc.
Còn các agent hỗ trợ thì sao?
Nếu một script có thể làm cả việc trong một lượt, nó nên làm vậy thay vì chia việc cho các agent hỗ trợ.
Chi tiết
Mô tả gốc của tác giả
Apply to any non-trivial work, not just bulk work: edits, migrations, analyses, checks. Build the tool that does it or proves it (codemod, script, generator, or a skill your subagents follow) instead of working by hand. The tool is the artifact a reviewer can rerun.
repo: cursor/plugins
Độ phổ biến
- Sao GitHub
- 15k
- Vị trí xếp hạng
- #10975
- Giấy phép
- —
- Cập nhật
- 31/10/2026
Bình luận
- …
Thêm skill từ kho mã này
advisor
15kCho agent hỏi ý kiến một mô hình thứ hai mạnh hơn tại các điểm then chốt, như trước quyết định lớn hoặc khi bị kẹt ở lỗi, nếu bạn bật nó.
check-agent-compatibility
15kKiểm tra xem coding agent AI có khởi động, xác minh và ghi tài liệu được cho một repository không, rồi trả về một điểm tương thích và vấn đề chính.
cli-for-agents
15kDạy agent thiết kế hoặc rà soát công cụ dòng lệnh để các coding agent AI chạy được mà không cần lời nhắc, với trợ giúp rõ ràng và ví dụ.
continual-learning
15kGiữ các ghi chú AGENTS.md của bạn cập nhật bằng cách giao việc rà soát các cuộc trò chuyện trước cho một trình cập nhật bộ nhớ chuyên dụng.
Skill tương tự
diffs
394kGiúp agent của bạn tạo một diff có thể chia sẻ về các chỉnh sửa, dưới dạng liên kết xem hoặc file ảnh, thay vì một bản tóm tắt viết tay.
coding-agent
394kGiúp agent của bạn giao một việc lập trình lớn cho Codex, Claude Code hoặc OpenCode chạy nền, rồi theo dõi tiến độ của nó.
gh-issues
394kGiúp agent của bạn tìm issue trên GitHub, chọn những issue cần xử lý và mở pull request với bản sửa, kể cả theo dõi nhận xét đánh giá.