Skip to content
Back to skills

Dbc Schema

ASecurity

Generate Effect Schema definitions for WoW DBC tables. Use when adding new game data tables or updating existing schemas.

  • 666 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added February 8, 2026
databasesapidatabase

Works with

  • api

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill dbc-schema --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dbc Schema?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Dbc Schema
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-dbc-schema/badge)](https://www.skillsdirectory.com/skills/majiayu000-dbc-schema)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
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

```ts
// {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

1. **Preserve CSV column order** - perfectionist sorting is disabled for DBC schemas
2. **Use Schema primitives** - `Schema.Number`, `Schema.String`, `Schema.Boolean`
3. **Nullable fields** - Use `Schema.NullOr(Schema.Number)` for optional numeric fields
4. **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`:

```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

1. Get CSV headers from DBC table
2. Map columns to Schema types
3. Generate schema class (preserve column order!)
4. Register in DbcTableRegistry
5. Re-export from Schemas.ts if public API

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.