what-could-break
Skill này làm gì
Công cụ này giúp bạn biết điều gì có thể bị hỏng trong mã khi bạn thực hiện một thay đổi. Nó không chỉ kiểm tra những gì bạn đã sửa mà còn xem thay đổi có thể ảnh hưởng thế nào đến các phần khác của hệ thống không liên quan trực tiếp.
Khi nào nên dùng
- ✓Trước khi thực hiện các thay đổi lớn trên nhiều phần mã.
- ✓Khi chỉnh sửa các tệp được nhiều chương trình khác dùng.
- ✓Khi bạn muốn đảm bảo một thay đổi nhỏ sẽ không gây ra vấn đề bất ngờ.
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/what-could-break/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
“Thay đổi này có thể làm hỏng gì ở các phần khác của hệ thống?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ phân tích thay đổi của bạn và tìm các vấn đề tiềm ẩn ở những nơi khác. Nó cố gắng chứng minh thay đổi an toàn bằng cách chạy các kiểm thử thực tế với mã đã sửa.
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.
What Could Break
Overview
Listing callers is not the job. Grep does that in a second. This skill finds the breakage grep will not show you, and produces one proof that the change is safe.
Run it before design, not only before merge. Whenever a task asserts something about existing code ("X already handles Y", "just make X public"), that assertion is a hypothesis, and the census of real consumers decides the design.
When to Use
- Use before any multi-file edit, or an edit to a shared path: API payload, config, stored data, a client other apps read, a prompt or policy file
- Use when the user asks "what could this break" or "blast radius of X"
- Use for a small diff you do not trust
- Use when a brief asserts something about existing code, before you design against that assertion
How It Works
Step 1: Do not trust your own writeup
A risk analysis that sounds right is worthless: it reads as convincing whether or not it is true. Find the one or two facts the whole change depends on, and get each one as far down this ladder as is cheap. Say where it stopped.
- You said so. Worth nothing on its own.
- You pointed at it. A real
file:line, or the library's own source at the pinned version. - You walked it. You traced the bad case step by step and it does not reach.
- You ran it. A script or test calls the real code and fails loud if you are wrong.
- You saw it live. Reproduced in the running app, service or device.
Rung 4 is usually one small script that imports the same module production runs and calls the exact function you are worried about, with the input you are worried about.
Step 2: Read the change
The diff, the symbols it adds, changes and deletes, and what it now does differently,
including what the diff does not spell out. git log -S '<symbol>' and
git log -L :<function>:<file> show why the old shape exists; a guard that looks
pointless often has a commit explaining the incident it stopped.
Step 3: Find the one fact it is safe because of
Most risky-looking changes are safe because of one fact ("this only drops cache entries that are already expired", "no client reads this field"). If it holds, most risks clear at once. If you cannot find one, the change is not understood yet.
Step 4: Look where grep stops
Search for the literal value, the field name, the error text and the old behavior, not only the symbol you renamed. Then check each of these by hand:
- The same rule living twice. A second config file, a fallback path that hardcodes the old default, a copy synced into another repo, a constant duplicated in a migration or test fixture, a feature flag default.
- Prompts and agent files that restate the rule. System prompts, agent and skill files,
AGENTS.md,CLAUDE.md, runbooks. An agent obeys the stale sentence, not your code. - Every other client. Web, iOS, Android, desktop, CLI, extensions, partner integrations. Mobile clients in users' hands stay on the old version for weeks: what does an old client do with the new shape, and a new client with the old server?
- Wire formats. JSON field names and types, enum values, null versus missing, date formats, pagination shape, error codes, webhook payloads, queue schemas, GraphQL and protobuf contracts.
- Stored state. Columns and their defaults, rows written under the old shape, cache entries, files on disk, append-only logs, session and cookie contents, search indexes. Old data outlives the deploy.
- Environment and secrets. An env var renamed in code but not in the deploy config, CI, the image, or the second service that reads it.
- Processes that restart separately. Web server, workers, cron jobs, serverless functions, the mobile app, a sidecar. During a rollout one runs new code while another runs old code against the same data. Can both coexist for an hour?
- Timing and concurrency. Two writers on the same row or key, a retry that now fires twice, ordering that only held because one step was slow.
- Library source at its pinned version. Read the dependency's code at the lockfile version, not your memory of its docs.
- Generated and vendored code. Clients generated from a schema, vendored copies, committed build artifacts, bundles whose cache-busting key did not change.
- Tests and fixtures that encode the old behavior. A test that passes because its fixture still has the old shape proves nothing about the new one.
…
Câu hỏi thường gặp
Vì sao tôi không thể chỉ dùng ‘grep’?
‘Grep’ tìm kiếm văn bản cụ thể. Công cụ này đi xa hơn bằng cách kiểm tra cách mã thực sự hoạt động và giao tiếp với các phần khác, điều mà ‘grep’ không làm được.
‘Rung 4’ nghĩa là gì?
‘Rung 4’ là mức độ tin cậy trong đó một bài kiểm thử hoặc script chạy mã thực với đầu vào mong đợi và thất bại nếu có lỗi. Đây là cách chứng minh mã hoạt động đúng như thiết kế.
‘Wire formats’ là gì?
Đây là các cách trao đổi dữ liệu giữa các phần khác nhau của một hệ thống, như định dạng thông điệp (JSON, XML), tên trường, kiểu dữ liệu và cách báo lỗi.
Chi tiết
Mô tả gốc của tác giả
Find what a change breaks outside its own diff, then prove the one fact that makes it safe by running real code. Use before any multi-file edit or an edit to a shared path.
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #6171
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
00-andruia-consultant
48kGiúp agent của bạn bắt đầu hoặc cải thiện các dự án AI. Phân tích mã, gợi ý công cụ và lập kế hoạch hành động bằng tiếng Tây Ban Nha.
007
48kCho phép agent của bạn thực hiện kiểm toán bảo mật và mô hình hóa mối đe dọa. Hữu ích để bảo vệ dự án khỏi các cuộc tấn công và lỗ hổng.
10-andruia-skill-smith
48kGiúp agent của bạn tạo hoặc cải thiện các công cụ AI. Xác định cách công cụ hoạt động, viết tài liệu và kiểm tra cấu trúc.
20-andruia-niche-intelligence
48kGiúp agent của bạn tạo bản tóm tắt về một ngành cụ thể. Hữu ích để hiểu bối cảnh, quy tắc, cách người dùng tương tác và rủi ro của dự án.
Skill tương tự
test-driven-development
311kDạy agent của bạn viết kiểm thử thất bại trước, xem nó thất bại, rồi viết đoạn mã ngắn nhất để vượt qua trước khi làm bất kỳ tính năng hay bản sửa nào.
verification-before-completion
311kDạy agent của bạn chạy kiểm tra thực tế và đọc kết quả đầu ra trước khi khẳng định một việc, bản sửa hoặc bản build đã hoàn thành hay vượt qua.
migrate-to-shoehorn
310kThay các ép kiểu rủi ro trong tệp kiểm thử bằng thư viện shoehorn, để các bài kiểm thử dùng dữ liệu một phần vẫn qua được kiểm tra kiểu.