← スキル一覧に戻る

dbc-schema
by legacy3
⭐ 1🍴 0📅 2026年1月3日
SKILL.md
name: dbc-schema description: Generate Effect Schema definitions for WoW DBC tables. Use when adding new game data tables or updating existing schemas.
DBC Schema Generator
Generate Effect Schema definitions for WoW database tables.
Schema Location
packages/wowlab-core/src/internal/schemas/dbc/
Schema Template
// {TableName}Schema.ts
import * as Schema from "effect/Schema";
export class {TableName} extends Schema.Class<{TableName}>("{TableName}")({
ID: Schema.Number,
// Other fields - preserve CSV column order!
Name: Schema.String,
Description: Schema.String,
Flags: Schema.Number,
// ...
}) {}
export const {TableName}Schema = Schema.Array({TableName});
Important Rules
- Preserve CSV column order - perfectionist sorting is disabled for DBC schemas
- Use Schema primitives -
Schema.Number,Schema.String,Schema.Boolean - Nullable fields - Use
Schema.NullOr(Schema.Number)for optional numeric fields - Arrays - Use
Schema.Array(Schema.Number)for array columns
Column Type Mapping
| CSV Type | Effect Schema |
|---|---|
| int | Schema.Number |
| float | Schema.Number |
| string | Schema.String |
| localized string | Schema.String |
| bool | Schema.Boolean |
| foreign key | Schema.Number (reference to another table ID) |
Registration
After creating schema, register in DbcTableRegistry.ts:
import { {TableName} } from "./internal/schemas/dbc/{TableName}Schema.js";
// Add to registry type
export type DbcTableName =
| "Spell"
| "{TableName}" // Add here
| ...;
// Add to row type mapping
export type DbcRow<T extends DbcTableName> =
T extends "{TableName}" ? {TableName} :
...;
Instructions
- Get CSV headers from DBC table
- Map columns to Schema types
- Generate schema class (preserve column order!)
- Register in DbcTableRegistry
- Re-export from Schemas.ts if public API
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です