sql-object-impact-analysis
Skill này làm gì
Công cụ này giúp bạn tìm mọi thứ đang dùng một phần cụ thể của cơ sở dữ liệu (như bảng hoặc cột) trước khi bạn thay đổi nó. Nó tìm kiếm trong toàn bộ mã chương trình và cơ sở dữ liệu để cho bạn biết điều gì có thể bị hỏng.
Khi nào nên dùng
- ✓Khi bạn muốn thay đổi một bảng hoặc cột và không biết điều gì sẽ bị ảnh hưởng.
- ✓Khi làm việc với một hệ thống cũ mà việc theo dõi các phụ thuộc rất khó.
- ✓Khi bạn cần một báo cáo về tác động của thay đổi cơ sở dữ liệu.
Liên kết skill
https://github.com/github/awesome-copilot/blob/main/skills/sql-object-impact-analysis/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
“Những gì đang dùng cột “customer_email” trong bảng “customers”?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ trước tiên tìm các tham chiếu trực tiếp trong mã SQL, rồi tìm trong toàn bộ mã chương trình (như C# hoặc JavaScript). Nó sắp xếp kết quả để cho thấy những gì phụ thuộc vào đối tượng bạn định thay đổ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.
SQL Object Impact Analysis
You are performing a pre-change dependency trace for a database object (table, column, stored procedure, view, function, or trigger) inside a legacy or unfamiliar codebase. The goal is a single, trustworthy answer to: "If I change this, what else is affected?"
When to use this
Trigger when the user:
- Names a specific table, column, stored procedure, view, or trigger and asks what uses it, what depends on it, or whether it's safe to change/rename/drop
- Is about to modify a schema element in a codebase with no ORM, or a mixed legacy stack (raw SQL + stored procs + hand-written data access code)
- Asks for a "blast radius," "impact analysis," or "dependency trace" of a specific DB object
Do not use this for:
- General SQL performance tuning (use
sql-optimization) - SQL code quality/security review (use
sql-code-review) - Privacy/PII exposure analysis (use
data-breach-blast-radius) - Architecture-level documentation of an entire codebase (use
doc-and-modernize)
Process
Confirm the target object and its exact name(s). Ask if ambiguous (e.g., multiple tables with similar names, or the user says "the customer table" without specifying schema). Get the precise identifier before searching.
Search the SQL layer first:
- Search all
.sqlfiles, stored procedure definitions, views, functions, and triggers in the repo/database scripts folder for direct references to the object name - For a column: check every proc/view/trigger that selects, inserts, updates, or filters on it
- For a table: check every proc/view/trigger that references it, plus foreign key relationships to/from other tables
- For a stored procedure: check every other proc that calls it, and every scheduled job/agent step that invokes it
- Note indirect references too — dynamic SQL (
EXEC(@sql)), synonyms, and views built on views
- Search all
Search the application layer:
- Search all application code (C#, Java, JS/TS, Angular, whatever the repo contains) for:
- Direct SQL strings referencing the object name
- ORM/data-access-layer method or class names that map to it (e.g., a repository method calling the stored procedure)
- API endpoint handlers that ultimately call into the affected data path
- Trace one layer further where reasonable: does a frontend component consume an endpoint that touches this object? Note it, but don't chase every UI consumer exhaustively — flag "further downstream consumers likely exist" if the trail runs cold rather than guessing.
- Search all application code (C#, Java, JS/TS, Angular, whatever the repo contains) for:
Classify each finding by confidence:
- Direct — object name found verbatim in code/SQL
- Indirect — reached via a proc call chain, ORM mapping, or dynamic SQL that couldn't be fully resolved statically
- Uncertain — plausible but unverified (e.g., dynamic SQL construction that couldn't be traced to a literal object name)
- Never present an Uncertain finding as if it were Direct — flag it clearly so the reader knows to verify manually
Produce the report (see Output Format below).
Output Format
Always structure the report as:
- Target Object — exact name, type (table/column/proc/view/trigger), and schema
- Direct SQL Dependents — list of procs/views/triggers/functions that reference it directly, grouped by object type
- Application Code Dependents — list of files/classes/methods that reference it, grouped by layer (data access, API/service, frontend), with file paths
- Indirect / Dynamic References — anything found via dynamic SQL, synonyms, or call chains that couldn't be fully resolved — labeled clearly as needing manual verification
- Risk Summary — one paragraph: is this object narrowly used (low risk) or widely fanned-out (high risk)? Call out anything that touches a scheduled job, external integration, or reporting layer specifically, since those often get missed
- Suggested Verification Steps — concrete next actions before making the change (e.g., "run these two procs against staging data first," "check if the ReportingService endpoint at X depends on this column")
Guidelines
- Never claim a dependency is complete or exhaustive — static text search cannot catch every dynamic SQL construction or reflection-based ORM mapping. State the search method used and its limits explicitly in the report.
…
Câu hỏi thường gặp
“Blast radius” (bán kính ảnh hưởng) là gì?
“Blast radius” chỉ mức độ ảnh hưởng mà một thay đổi có thể gây ra. Nó trả lời câu hỏi: nếu tôi thay đổi cái này, điều gì khác sẽ bị ảnh hưởng và đến mức nào?
Công cụ có tìm được TẤT CẢ những gì dùng đối tượng này không?
Công cụ cố gắng tìm được càng nhiều càng tốt, nhưng với mã rất phức tạp hoặc các cấu trúc động, có thể có tham chiếu chỉ tìm được bằng tay. Công cụ sẽ cảnh báo bạn về điều này.
Tôi có cần biết lập trình để dùng công cụ này không?
Không. Công cụ được thiết kế cho cả những người không biết lập trình. Nó trình bày thông tin rõ ràng để giúp bạn ra quyết định.
Chi tiết
Mô tả gốc của tác giả
Before modifying a table, column, stored procedure, view, or trigger in a legacy codebase, trace every place that references it — across other SQL objects (procs, views, triggers) AND application code (C#, Angular/TypeScript, JS, or any language in the repo) — and produce a structured blast-radius report so you know what breaks before you change it. Use when the user asks 'what uses this column/ta
repo: github/awesome-copilot
Độ phổ biến
- Sao GitHub
- 40k
- Vị trí xếp hạng
- #7433
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
acquire-codebase-knowledge
40kGiúp agent của bạn hiểu và ghi tài liệu cho một dự án mã nguồn có sẵn. Hữu ích khi đón thành viên mới hoặc nắm tổng quan về kiến trúc.
acreadiness-assess
40kGiúp agent của bạn đánh giá mức độ sẵn sàng cho AI của dự án và tạo báo cáo. Hữu ích để biết dự án đã sẵn sàng dùng công cụ AI đến đâu.
acreadiness-generate-instructions
40kGiúp agent của bạn tạo hướng dẫn cho công cụ AI dựa trên kết quả đánh giá. Hữu ích để cải thiện cách AI làm việc với mã và khắc phục các khoảng trống.
acreadiness-policy
40kGiúp agent của bạn xác định hoặc áp dụng chính sách đánh giá dự án bằng AI. Hữu ích để chuẩn hóa cách đánh giá dự án và đảm bảo tuân thủ.
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.