sql-object-impact-analysis
できること
このツールは、変更を加える前に、データベースの特定の部分(テーブルや列など)を使っているものをすべて見つけるのに役立ちます。すべてのプログラムコードとデータベースを検索し、何が壊れる可能性があるかを示します。
使う場面
- ✓テーブルや列を変更したいが、何に影響するかわからないとき。
- ✓依存関係を追跡するのが難しい古いシステムを扱うとき。
- ✓データベースの変更による影響のレポートが必要なとき。
スキルのリンク
https://github.com/github/awesome-copilot/blob/main/skills/sql-object-impact-analysis/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“「customers」テーブルの「customer_email」列を使っているものは何ですか?”
毎週5つの新しいスキル。1分で読めます。
仕組み
このツールはまず、SQLコード内の直接的な参照を探し、次にすべてのプログラムコード(C#やJavaScriptなど)を調べます。変更対象に依存しているものが何かを、結果として整理して示します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
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.
…
よくある質問
「爆発半径(ブラストラディウス)」とは何ですか?
変更がどの程度の範囲に影響しうるかを指す言葉です。「これを変えたら、どこまで、何が影響を受けるか」に答えるものです。
このツールは、そのオブジェクトを使っているものを「すべて」見つけられますか?
できる限り多く見つけるよう努めますが、非常に複雑なコードや動的な記述の場合は、手作業でしか見つけられない参照が残ることがあります。その場合は警告が表示されます。
これを使うのにプログラミングの知識は必要ですか?
いいえ、プログラマーでなくても使えるように設計されています。判断しやすいよう、情報をわかりやすく提示します。
詳細
作者による元の説明
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
人気
- GitHubのスター
- 40k
- ランキング
- #7433
- ライセンス
- MIT
- 更新日
- 2026/10/15
コメント
- …
このリポジトリの他のスキル
acquire-codebase-knowledge
40kエージェントが、既存のコードプロジェクトを理解してドキュメント化できるよう支援します。新しく参加するメンバーのオンボーディングや、アーキテクチャの全体像の把握に役立ちます。
acreadiness-assess
40kエージェントが、プロジェクトのAI対応状況を評価してレポートを生成できるよう支援します。プロジェクトがAIツールをどの程度活用できる状態にあるかを把握するのに役立ちます。
acreadiness-generate-instructions
40kエージェントが、評価結果をもとにAIツール向けの指示文を作成できるよう支援します。AIがコードとどのようにやり取りするかを改善し、特定された不足点を解消するのに役立ちます。
acreadiness-policy
40kエージェントが、AIプロジェクトの評価ポリシーの策定や適用を支援できるようにします。プロジェクトの評価方法を標準化し、コンプライアンスを確保するのに役立ちます。
似ているスキル
test-driven-development
311k機能や修正を作る前に、まず失敗するテストを書き、それが失敗するのを確認してから、合格させる最小のコードを書くようエージェントに教えます。
verification-before-completion
311kタスク、修正、ビルドが完了した、または合格したと主張する前に、実際のチェックを実行し、その出力を読むようエージェントに教えます。
migrate-to-shoehorn
310kテストファイル内の危険な型キャストを、shoehornライブラリに置き換え、テストが部分的なデータを使いつつ型チェックを通るようにします。