Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

Schema Analyzer

БесплатноБез исполняемых скриптовНе проверен

Analyze source and target system schemas to map structural differences and identify migration complexity at the start of a data migration engagement.

TheLobbiот TheLobbi★ 22 звезды на GitHub

Об этом скилле

Schema Analyzer

Produce a complete schema analysis and comparison document for a data migration. This is the first deliverable in a migration engagement. The output drives field mapping, transformation design, and complexity estimation for the rest of the project.

Source Schema Extraction

Extract the schema from the source system using the method appropriate for the system type:

SQL Server Source

-- Extract full table schema
SELECT 
    t.name AS TableName,
    c.name AS ColumnName,
    tp.name AS DataType,
    c.max_length AS MaxLength,
    c.precision AS Precision,
    c.scale AS Scale,
    c.is_nullable AS IsNullable,
    c.is_identity AS IsIdentity,
    dc.definition AS DefaultValue,
    ep.value AS ColumnDescription
FROM sys.tables t
JOIN sys.columns c ON t.object_id = c.object_id
JOIN sys.types tp ON c.user_type_id = tp.user_type_id
LEFT JOIN sys.default_constraints dc ON c.default_object_id = dc.object_id
LEFT JOIN sys.extended_properties ep ON ep.major_id = t.object_id 
    AND ep.minor_id = c.column_id AND ep.name = 'MS_Description'
WHERE t.type = 'U'
ORDER BY t.name, c.column_id;

-- Extract foreign key relationships
SELECT 
    fk.name AS ForeignKeyName,
    OBJECT_NAME(fk.parent_object_id) AS ParentTable,
    COL_NAME(fkc.parent_object_id, fkc.parent_column_id) AS ParentColumn,
    OBJECT_NAME(fk.referenced_object_id) AS ReferencedTable,
    COL_NAME(fkc.referenced_object_id, fkc.referenced_column_id) AS ReferencedColumn
FROM sys.foreign_keys fk
JOIN sys.foreign_key_columns fkc ON fk.object_id = fkc.constraint_object_id
ORDER BY ParentTable, ParentColumn;

Dataverse Source

Use the Dataverse Web API to extract entity metadata:

GET [org-url]/api/data/v9.2/EntityDefinitions?$select=LogicalName,DisplayName,Description
GET [org-url]/api/data/v9.2/EntityDefinitions(LogicalName='account')/Attributes?$select=LogicalName,AttributeType,RequiredLevel,DisplayName

SharePoint List Source

Export list schema via PowerShell:

Connect-PnPOnline -Url $siteUrl -Interactive
$list = Get-PnPList -Identity "ListName"
$fields = Get-PnPField -List "ListName"
$fields | Select-Object InternalName, TypeAsString, Required, MaxLength, DefaultValue |
  Export-Csv ".\sharepoint-schema.csv" -NoTypeInformation

CSV / Excel Source

Document the schema by inspection:

  • Column headers (as-is from the file)
  • Inferred data type (text, number, date, boolean)
  • Presence of null/empty values (sample 100 rows)
  • Distinct value count (for potential code/lookup fields)
  • File encoding and delimiter

Source Schema Documentation

For each entity/table being migrated, produce:

Entity: [Table/List name] Record count: [Approximate count] Primary key: [Column name and type] System of record: [System name]

Column Name Data Type Length / Precision Nullable Default Foreign Key Sample Values Notes
ClientID int — No Identity — 10042, 10043 Auto-increment
LastName varchar 100 No — — "Martinez"
FirstName varchar 100 No — — "Elena"
SSN char 11 Yes — — "--***" MUST be masked in migration
DateOfBirth date — Yes — — 1975-03-14
State char 2 No — — "CA", "TX" 2-letter USPS code
AgentCode varchar 20 Yes — → Agents.AgentCode "AG-001"
StatusCode char 1 No 'A' — "A", "I", "D" A=Active, I=Inactive, D=Deceased
CreateDate datetime — No GetDate() — Server default — not user-controlled
Notes nvarchar 4000 Yes — — Free text

Target Schema Documentation

Document the destination system's schema for the same entities:

Entity: [Destination entity name] System: [Destination system name] Write method: REST API / SQL INSERT / Dataverse upsert / SharePoint list item

Field Name Data Type Required Max Length Validation Default Notes
Id GUID No (auto) — System-assigned — Do not populate
LastName string Yes 150 Not blank —
FirstName string Yes 150 Not blank —
TaxId string No 20 Encrypted at rest — Destination for SSN — encrypted
BirthDate date No — Must be in past —
StateCode string Yes 2 Must be valid US state — Same format as source
AgentId GUID No — Must exist in Agent entity — Resolved from AgentCode
Status string Yes 20 Enum: Active, Inactive, Deceased Active
Remarks string No 5000 Larger than source — no truncation needed
CreatedOn datetime No (auto) — System-assigned —
ExternalId string No 100 — Populate with source ClientID for traceability

Schema Comparison

Produce a side-by-side comparison

Полный SKILL.md на GitHub

Установить Schema Analyzer в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Grep
Bash
Write

FAQ

Что делает скилл Schema Analyzer?

Analyze source and target system schemas to map structural differences and identify migration complexity at the start of a data migration engagement.

Как установить скилл Schema Analyzer?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Schema Analyzer запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить Schema Analyzer с