reproduce-bug
Skill này làm gì
Cố gắng tái hiện một lỗi đã biết trong dự án cục bộ bằng code gốc và đầu vào đã lên kế hoạch, rồi lưu kết quả thô. Dành cho lập trình viên và người review xác nhận một lỗi được báo cáo trước khi sửa.
Khi nào nên dùng
- ✓Khi lập trình viên cần tái hiện một lỗi đã đặt tên trong dự án cục bộ.
- ✓Khi người review muốn xem một lỗi trình biên dịch hoặc runtime được báo cáo có thật không.
- ✓Khi nhóm cần bằng chứng tái hiện trước khi viết bản sửa.
Liên kết skill
https://github.com/trailofbits/skills/blob/main/plugins/patching-bugs/skills/reproduce-bug/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
“Tái hiện lỗi crash được báo cáo này trong dự án cục bộ của tôi trên code gốc và lưu kết quả.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill build code hiện tại bằng lệnh riêng của dự án và chạy các đầu vào đã lên kế hoạch, gồm cả trường hợp đối chứng. Nó lưu stdout, stderr, mã thoát và thời gian, rồi báo lỗi được tái hiện, không tái hiện, hay bị chặn.
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.
Reproduce Bug
When to Use
Use for the reproduction step of patching-bugs with one finding.json and a local
baseline checkout. Read the record contract.
Before target commands, follow its project guidance.
When NOT to Use
Do not use for bug discovery, patching, or a claim that cannot be exercised locally. Report a blocker when the build or environment cannot exercise the claim.
Procedure
Select
failure_typefrom the record contract. Build the current baseline with the project's own command. Exercise the planned scoped inputs before any edit and retain their observations, including valid controls. Save raw stdout, stderr, exit status, and timing. If the behavior is absent with trustworthy evidence, reportnot_reproduced; if setup or observations are unreliable, reportblocked.Runtime: exercise the built
target_artifactwith a PoC that recordsPATCH_LOADEDas defined in the contract, then printsPATCH_REACHEDimmediately before the assertion. Exit nonzero for the bug, zero otherwise; a setup crash is inconclusive. Compile: record the targetexpected_diagnosticfrom the failed compiler invocation; use emptypoc_argvand nulltarget_artifact.Save any unchanged PoC source under
reproduce/poc/and raw receipts underreproduce/receipts/. Writereproduce.jsonwith the baseline commit, command argument arrays, artifact path, observed result, outcome, and your agent identity. Setfinding.statustoreproducedornot_reproducedfrom the result. If reproduction isblocked, leavefinding.statusashypothesis.
{
"schema_version": 1,
"failure_type": "runtime",
"outcome": "reproduced",
"baseline_commit": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"build_argv": ["python", "build.py"],
"poc_argv": ["python", "poc.py"],
"target_artifact": "dist/app.py",
"observed": "The PoC wrote outside uploads after PATCH_REACHED.",
"blocker": null,
"agent": "reproducer-1"
}
- Manifest the complete
reproduce/directory, including the PoC and record, using the record helper: runuv run --no-project <script> manifest <reproduce-step-dir>. Then check the record before handoff. Stateblockedwith the actual failure when build or setup prevents a valid run.
Rationalizations to Reject
| Shortcut | Required action |
|---|---|
| A unit test imitates the bug. | Exercise the target compiler or built runtime artifact. |
| A nonzero exit proves reproduction. | Require the target diagnostic, or runtime marker and assertion. |
Câu hỏi thường gặp
Nếu lỗi không xảy ra thì sao?
Skill báo không tái hiện khi có bằng chứng đáng tin cậy rằng hành vi đó không tồn tại.
Nếu build thất bại thì sao?
Skill báo bị chặn, vì thiết lập không đáng tin không thể cho thấy lỗi không tồn tại.
Nó có sửa lỗi không?
Không. Nó chỉ tái hiện lỗi. Vá là một bước riêng.
Chi tiết
Mô tả gốc của tác giả
Use when a named runtime or compiler bug in a local repository needs independent reproduction.
repo: trailofbits/skills
Độ phổ biến
- Sao GitHub
- 8.0k
- Vị trí xếp hạng
- #12691
- Giấy phép
- CC-BY-SA-4.0
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
audit-context-building
8.0kGiúp agent tìm hiểu một codebase lạ trước khi review bảo mật, lập bản đồ những gì mỗi hàm giả định, đảm bảo và phụ thuộc vào.
algorand-vulnerability-scanner
8.0kGiúp agent quét smart contract Algorand viết bằng TEAL hoặc PyTeal để tìm 11 vấn đề bảo mật phổ biến, như tấn công rekey và phí không được kiểm tra.
audit-prep-assistant
8.0kGiúp agent chuẩn bị codebase cho một đợt review bảo mật bên ngoài, với phân tích tĩnh, độ phủ test, dọn mã chết và tài liệu rõ ràng.
cairo-vulnerability-scanner
8.0kGiúp agent quét smart contract Cairo trên StarkNet để tìm 6 vấn đề nghiêm trọng, gồm tràn số học, thông điệp xuyên lớp rủi ro và replay chữ ký.
Skill tương tự
reverse-engineer-anything
422kGiúp agent của bạn xem bên trong các app và package đã phát hành để giải thích tính năng, so sánh phiên bản hoặc hướng dẫn dựng lại bằng công cụ REA.
1password
394kGiúp agent của bạn cài đặt CLI của 1Password, đăng nhập, và đọc hoặc đưa thông tin bí mật vào mà không in giá trị ra cuộc trò chuyện.
healthcheck
394kGiúp agent của bạn rà soát bảo mật máy tính hoặc máy chủ đang chạy OpenClaw, như SSH, tường lửa, cập nhật và sao lưu, rồi đề xuất cách sửa an toàn.