fix-at-the-boundary
Skill này làm gì
Skill này hướng dẫn tìm kiếm mọi chỗ một mẫu lỗi xuất hiện trước khi sửa bất cứ thứ gì. Nó áp dụng khi nguyên nhân là một mẫu lặp lại chứ không phải một file đơn lẻ. Skill dành cho lập trình viên muốn một bản sửa có hiệu lực trên toàn codebase.
Khi nào nên dùng
- ✓Khi một lỗi do một mẫu lặp lại gây ra, chẳng hạn một hàm trợ giúp bị sao chép hoặc một dạng gọi chung.
- ✓Khi bạn đã sửa vài trường hợp và không chắc không còn trường hợp nào khác.
- ✓Khi cùng một lỗi có thể tồn tại trong các ứng dụng hoặc template khác.
Liên kết skill
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/fix-at-the-boundary/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
“Bạn có thể kiểm tra xem điều kiện tranh chấp (race condition) trong hàm lưu này có xuất hiện ở chỗ khác không, trước khi sửa không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent tìm mọi kết quả khớp của mẫu và liệt kê tất cả trước khi chỉnh sửa bất cứ gì. Nó sửa những chỗ nằm trong phạm vi và báo cáo các chỗ còn lại.
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.
Fix at the Boundary
Activation guard
Use this skill when a reported bug's root cause is a pattern — a function shape, a write sequence, a device/permission check, a duplicated literal, a copy-pasted helper — rather than a fact unique to the one file named in the report.
If the bug is genuinely local (a typo, a value that only makes sense for that
one app, a one-time data fix), say so explicitly — "this is local to
<file>, no sweep needed" — and skip the rest of this skill. Don't sweep as
theater.
Do NOT skip the sweep in these situations
- "The report only names one file, I'll patch that and move on." A stale-diff write race, a mic-device resolution order, a missing scoped-access check — these are usually copy-pasted everywhere the same operation is implemented.
- "I found 3 callers and fixed those, that's probably all." Enumerate every hit from the search before editing anything — stopping at the first few you notice is how instances 4–9 survive.
- "Grepping the whole repo will take too long." A few
rgcalls take seconds; rediscovering the same fix across four more user reports doesn't. - "This looks like the same bug in an area I don't own, but that's not what I was asked to fix." Still enumerate it — just don't edit it (see below).
- "I fixed the shared helper, callers will pick it up automatically." Only true if every sibling actually calls it — confirm with the same search.
Workflow
- Derive the fingerprint from the symptom, not the file: the exact function/hook name, the anti-pattern shape (read stale state → write without re-checking), a literal string, or an import path.
- Search before editing:
Widen the pattern (drop args, add# exact call/hook, whole repo rg -n "computeDiffBase\(|stashLocalDiffBase\(" --type ts -g '!**/node_modules/**' # duplicated literal (device id, action name, config key) rg -n "'design-native-asset'" -g '*.ts' -g '*.tsx' # same shape copy-pasted across template apps rg -n "getUserMedia" templates/*/app templates/*/src 2>/dev/null-C 3, try a sibling term likediffBasevsdiff_base) until confident no caller phrases it slightly differently. - Enumerate every hit before touching any file — write the list in your response so step 5 is checkable.
- Decide where the fix lives. A shared helper some callers bypass → fix the helper and point bypassers at it. No shared helper and N ≥ 3 duplicate sites → consider extracting one instead of pasting a 4th time.
- Apply the fix to every in-scope hit.
Ownership boundaries
Enumerating isn't editing. A hit inside a path this task's DO NOT TOUCH
list assigns to another agent gets listed as found-but-out-of-scope and
flagged via spawn_task or a direct note — never silently edited or
silently dropped. See concurrent-agents.
Reporting the sweep
Report the full blast radius, not just what you changed:
Fixed the stale-diff-base race in:
- insert-design-native-asset.ts (as reported)
- insert-asset.ts, apply-a11y-fix.ts, generate-design.ts (same pattern)
Found but out of scope (owned by another agent this task): apply-visual-edit.ts
in templates/design/** — flagged via spawn_task.
No other callers of computeDiffBase().
Why this exists
- "apply-visual-edit.ts has the same stale-diff-base write-race bug that was just fixed in insert-design-native-asset.ts, insert-asset.ts, apply-a11y-fix.ts ... and generate-design.ts" — one defect, 9 files, fixed one report at a time instead of once.
- Mic-device resolution was independently fixed in four different Clips
surfaces (
useMediaDevices.ts,media-capture-constraints.ts,offscreen.ts,recorder-engine.ts). - "i want to make sure universally cmd+click works ... can we do a quick sweep of other apps" — the user had to ask for a sweep across 4 templates that should have happened proactively.
- "remember - if any other apps like in our core repo templates/ does this wrong, fix that too" — exists only because the first fix didn't already answer it.
Related Skills
- concurrent-agents — why an out-of-scope sibling gets flagged, not edited.
- adding-a-feature — the four-area checklist a proper fix should satisfy.
Câu hỏi thường gặp
Có luôn cần rà soát toàn bộ không?
Không. Skill nói một lỗi thật sự cục bộ, như một lỗi gõ sai, không cần rà soát và agent nên nói rõ điều đó.
Nó có sửa mọi kết quả khớp không?
Không phải lúc nào. Skill nói nên liệt kê các kết quả khớp ở khu vực khác thuộc quyền sở hữu, và tránh sửa code ngoài phạm vi tác vụ.
Vì sao không dừng sau vài kết quả?
Skill cảnh báo rằng dừng sớm chính là cách các bản sao sau của cùng một lỗi còn sót lại.
Chi tiết
Mô tả gốc của tác giả
How to find every sibling instance of a reported bug before fixing it. Use whenever a bug report names one file but the defect is a call pattern, hook, duplicated literal, or copy-pasted helper that plausibly exists in other files, apps, or templates.
repo: BuilderIO/agent-native
Độ phổ biến
- Sao GitHub
- 7.6k
- Vị trí xếp hạng
- #13160
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
design-exploration
7.6kGiúp agent của bạn khám phá nhiều hướng thiết kế giao diện song song, để bạn chọn một hướng rồi tinh chỉnh thiết kế đã chọn.
visual-edit
7.6kGiúp agent của bạn mở một ứng dụng cục bộ đang chạy trong trình chỉnh sửa trực quan, để bạn xem và sửa các màn hình thật cùng nhau.
turn-into-app
7.6kBiến quy trình, bảng tính hoặc dự án thành ứng dụng trực quan có màn hình đầy đủ dữ liệu, với agent làm việc phía sau các điều khiển.
visual-plan
7.6kBiến một kế hoạch viết bằng văn bản thuần thành kế hoạch trực quan tương tác, có sơ đồ, bản đồ file, đoạn code và các câu hỏi còn mở.
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á.