sql-object-impact-analysis

软件研发 云服务与部署 1 文件 EN 原文

Before modifying a table, column, stored procedu

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/table/procedure', 'is it safe to change X', 'what depends on this', 'impact of renaming/dropping X', or before any schema/proc modification in an unfamiliar or legacy codebase. Not for privacy/PII exposure analysis (see data-breach-blast-radius) or query performance tuning (see sql-optimization).

说明语言:英文

来源githubawesome-copilot ↗ 查看原文件 ↗版权归原作者,请遵循原仓库许可
安装
npx skills add https://github.com/github/awesome-copilot --skill sql-object-impact-analysis

需要已安装 skills CLI。也可以直接从源仓库 clone。

在星云中查看 ↗
SKILL.md 原文

name: sql-object-impact-analysis description: "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/table/procedure', 'is it safe to change X', 'what depends on this', 'impact of renaming/dropping X', or before any schema/proc modification in an unfamiliar or legacy codebase. Not for privacy/PII exposure analysis (see data-breach-blast-radius) or query performance tuning (see sql-optimization)." ---

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:

Do not use this for:

Process

  1. 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.
  1. Search the SQL layer first:
  2. Search all .sql files, stored procedure definitions, views, functions, and triggers in the repo/database scripts folder for direct references to the object name
  3. For a column: check every proc/view/trigger that selects, inserts, updates, or filters on it
  4. For a table: check every proc/view/trigger that references it, plus foreign key relationships to/from other tables
  5. For a stored procedure: check every other proc that calls it, and every scheduled job/agent step that invokes it
  6. Note indirect references too — dynamic SQL (EXEC(@sql)), synonyms, and views built on views
  1. Search the application layer:
  2. Search all application code (C#, Java, JS/TS, Angular, whatever the repo contains) for:
  3. Direct SQL strings referencing the object name
  4. ORM/data-access-layer method or class names that map to it (e.g., a repository method calling the stored procedure)
  5. API endpoint handlers that ultimately call into the affected data path
  6. 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.
  1. Classify each finding by confidence:
  2. Direct — object name found verbatim in code/SQL
  3. Indirect — reached via a proc call chain, ORM mapping, or dynamic SQL that couldn't be fully resolved statically
  4. Uncertain — plausible but unverified (e.g., dynamic SQL construction that couldn't be traced to a literal object name)
  5. Never present an Uncertain finding as if it were Direct — flag it clearly so the reader knows to verify manually
  1. Produce the report (see Output Format below).

Output Format

Always structure the report as:

  1. Target Object — exact name, type (table/column/proc/view/trigger), and schema
  2. Direct SQL Dependents — list of procs/views/triggers/functions that reference it directly, grouped by object type
  3. Application Code Dependents — list of files/classes/methods that reference it, grouped by layer (data access, API/service, frontend), with file paths
  4. Indirect / Dynamic References — anything found via dynamic SQL, synonyms, or call chains that couldn't be fully resolved — labeled clearly as needing manual verification
  5. 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
  6. 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

同类技能
agents-sdkairunway-aks-setupappinsights-instrumentationaws-cdk-python-setupaws-cloudwatch-investigationaws-cost-optimizeaws-resource-health-diagnoseaws-resource-query
本页内容来自开源项目 github, 版权归原作者所有。
本站仅作技能索引与分享,所有 Skill 版权归其原作者所有。