sql-dynamic-pattern-analyzer
БесплатноБез исполняемых скриптовНе проверенAnalyzes Dynamic SQL occurrences from SnowConvert issues, classifies patterns, scores complexity, and records migration considerations. Use for SQL Server…
от sfc-gh-dflippo★ 35 звёзд на GitHubОб этом скилле
Analyzing SQL Dynamic Patterns
Analyzes Dynamic SQL occurrences flagged by SnowConvert (issue code SSC-EWI-0030), classifies them against a dialect-specific pattern catalog, scores complexity, and records migration considerations. All operations go through the scai assessment sql-dynamic command — there are no Python helpers, no CSV/JSON scripts, no bash loops.
Sub-Agent Mode
When invoked from a parent skill (e.g., assessment/SKILL.md) as a sub-agent, the parent provides a context block with the fields below. The review_mode field controls whether the per-occurrence review loop runs.
| Field | Required | Notes |
|---|---|---|
project_dir |
yes | absolute path to the SCAI project root |
output_dir |
yes | typically <project_dir>/assessment/json |
review_mode |
yes | generate-only, auto-review-all, or skip |
On entry: call the configure MCP tool with project_dir from the context block. Snowflake credentials are not required — scai assessment sql-dynamic reads only local CSVs and source files.
Branching by review_mode:
generate-only— run onlyscai assessment sql-dynamic generate(Workflow Step 1) and return. The output JSON will containPENDINGoccurrences; that is expected.auto-review-all— generate, then loopshow-code-unit→ analyze →update --status REVIEWEDfor every PENDING occurrence (Workflow Steps 2–6). Runstatsat the end and confirm zero PENDING. The single-record / unique-analysis rule from Critical Rules (NO BATCH UPDATES) still applies — each occurrence gets its own analysis.skip— return immediately with"status": "skipped". The parent should not have dispatched in this case; this branch is defensive.
On completion, return JSON only:
{
"sub_skill": "analyzing-sql-dynamic-patterns",
"status": "ok",
"output_json": "<abs path to sql_dynamic_analysis.json>",
"summary": "<one-line: total occurrences, REVIEWED count, PENDING count>",
"error": null
}
On skip: "status": "skipped", "output_json": null. On failure: "status": "error", "error": "<message>".
Critical Rules
ONLY USE scai assessment sql-dynamic: All generate / show / update / stats operations are subcommands of scai assessment sql-dynamic. Do not write custom scripts, parsers, or batch wrappers.
NO BATCH UPDATES: Each update invocation processes ONE record with ONE unique analysis.
- Do not "walk IDs" sequentially as a batch just because they are adjacent.
- Do not use shell loops (e.g.
for id in ...; do scai assessment sql-dynamic update ...; done) to apply the same update across many records. - Do not copy/paste identical notes across multiple IDs; each occurrence must have its own specific rationale, even within the same code unit.
CODE-UNIT-BASED WORKFLOW: Use show-file (or show-code-unit) to view all occurrences within a procedure/function. Analyze each code unit separately by reading its source code.
- The generated analysis JSON stores the full procedure source text inside each code unit under the
procedurefield, alongsidefileName,procedureName,codeUnitStartLine, andlinesOfCode. Treat the JSON as the "source bundle" for analysis.
QUALITY OVER SPEED: This work is often fast, but do not "rush" by batching, reusing notes, or skipping code review. Aim for consistent, defensible analyses per occurrence.
Source Platform Detection
CRITICAL FIRST STEP: Before classifying patterns, determine the source platform.
Detection methods:
- Check
TopLevelCodeUnits.*.csv—SourceLanguagecolumn (e.g.Transactfor SQL Server,RedShiftfor Redshift,Oraclefor Oracle,Teradatafor Teradata). - Examine code syntax in the procedure source (visible in the analysis JSON):
- SQL Server indicators:
sp_executesql,EXEC(@sql),QUOTENAME(),sys.*catalog views. - Redshift indicators:
EXECUTE ... USING,QUOTE_IDENT(),QUOTE_LITERAL(),pg_catalog.*,plpgsqlfunctions. - Oracle indicators:
EXECUTE IMMEDIATE,DBMS_SQL.*,DBMS_ASSERT.*,ALL_*/USER_*/DBA_*catalog views,PRAGMA AUTONOMOUS_TRANSACTION,:varnamenamed bind variables,@dblinkreferences. - Teradata indicators:
REPLACE PROCEDURE ... BEGIN ... END,EXECUTE IMMEDIATE <sql> USING ...with positional?placeholders,DBC.TablesV/DBC.ColumnsV/DBC.DatabasesV/DBC.IndicesVcatalog views,REPLACE MACRO/EXEC macro_name(...),VOLATILE TABLE,MULTISET/SETtable semantics,SET QUERY_BAND, BTEQ&variablesubstitution andBT/ETtransaction control.
- SQL Server indicators:
- Review source file extensions and DDL:
.sql,.prc,.fnc.
Pattern catalog selection:
- SQL Server → Snowflake:
reference/PATTERNS_TRANSACT.md - Redshift → Snowflake:
reference/PATTERNS_REDSHIFT.md - Oracle → Snowflake:
reference/PATTERNS_ORACLE.md - Teradata → Snowflake: `reference/PATTERNS_
Установить sql-dynamic-pattern-analyzer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл sql-dynamic-pattern-analyzer?
Analyzes Dynamic SQL occurrences from SnowConvert issues, classifies patterns, scores complexity, and records migration considerations. Use for SQL Server, Redshift, Oracle, or Teradata to Snowflake migrations. Driven entirely by `scai assessment sql-dynamic`; no custom scripts.
Как установить скилл sql-dynamic-pattern-analyzer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл sql-dynamic-pattern-analyzer запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic