/database-sqlserver:table-conventionsfrom database-sqlserver
Use when writing or reviewing SQL Server table (CREATE TABLE) scripts, or user says "資料表慣例", "table 命名規則", "怎麼建表", "table convention". Provides a convention framework for table file structure, column naming, audit columns, and alter scripts. 觸發:撰寫 `Table/**/*.sql` DDL 時。
Ships in database-sqlserver. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
此為一套可調整的慣例框架。專案若已有自訂標準,以專案標準為準;沒有時可直接沿用下列預設。
SET ANSI_NULLS ON 和 SET QUOTED_IDENTIFIER ON 開頭CREATE TABLE [Schema].[TableName] 語法CONSTRAINT [PK_TableName] PRIMARY KEY CLUSTERED範例:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[Workstation]
(
[WorkstationId] int IDENTITY(1,1) NOT NULL,
[WorkstationCode] nvarchar(20) NOT NULL,
[CreatedDate] datetime2(7) NOT NULL,
[ModifiedDate] datetime2(7) NULL,
[DeleteFlag] bit NOT NULL,
CONSTRAINT [PK_Workstation] PRIMARY KEY CLUSTERED ([WorkstationId] ASC)
)
GO
WorkstationCode、CreatedDate){TableName}Id,型別為 int IDENTITY(1,1)CreatedDate 和 ModifiedDate(datetime2(7))DeleteFlag 欄位(bit NOT NULL)Table/Alter/ 目錄,命名格式:{來源資料表}_{YYYYMMDD}.sql若專案的既有資料表沿用來源系統(例如 ERP、legacy 系統)的原始 schema,改動這類表時走 Alter 腳本;本專案自建的表則直接維護
CREATE TABLEdesired-state 檔。
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub kerryhuang/kerryhuang-plugins --plugin database-sqlserver6 skills in this plugin
/ef-migrationUse when 建立 / 套用 / 回復 EF Core migration、跑 `dotnet ef` 指令、切換目標資料庫連線、migration 失敗診斷。管理 SQL Server 上的 Entity Framework Core 資料庫 Migration。觸發:「建 migration」「套用 migration」「回滾 migration」「dotnet ef」「migration 失敗」。/generating-table-descriptionUse when generating table description documentation from SQL view files. Use when user says "產生資料表描述", "文件化檢視表", "更新 TableDescription", "由 view 產欄位對照". Use when user wants to document view-to-table field mappings for a SQL Server database./migration-troubleshootUse when diagnosing special EF Core migration situations — ModelSnapshot 衝突、歷史紀錄遺失、資料庫已套用但 migration 對不上、生產緊急回滾判斷。一般失敗修復循環走 ef-migration skill。觸發:「migration 對不上」「snapshot 衝突」「緊急回滾」「migration 診斷」。Other plugins' skills for the same job