Model star schema
This skill should be used when the user asks to "design a star schema", "build a dimensional model", "split this into fact and dimension tables", "model this data warehouse", pastes a flat table or CREATE TABLE statement needing dimensional modelling, or invokes /AtelierBID:model-star-schema. Turns a flat source table into a Kimball star schema through classify, design, validate and DAX steps, emitting SQL DDL, a Mermaid ER diagram, DAX measure stubs and a validation report in output/<run-id>/.From its SKILL.md
npx -y skills add DATA-AI-XYZ/Atelier --skill model-star-schemaAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
3.7 KB, as published. Nobody here has run it
Dimensional modeller (4-agent Kimball pipeline)
Turns a flat source table into a production-shaped star schema using four subagents, with a design→validate retry loop, then renders deterministic SQL DDL and a Mermaid ER diagram. Resumes from checkpoints in the run folder.
Plain-English: paste your raw table (columns or CREATE TABLE) and what it tracks; the plugin sorts columns into facts vs. dimensions, designs the warehouse tables, grades them against Kimball's rules, and writes the SQL + diagram + starter DAX.
Step 0 — Gather inputs
flatTable(required) — SQL DDL, CSV headers, column names, or sample rows. (Multiple tables allowed; pass each with aname.)businessProcess(required) — what the data records (e.g. "retail sales orders").grainHint(optional) — "one row per ___".industry,scdPreference(ai/1/2),knownKpis,painPoints(optional).
Create the run folder: echo '<inputs-json>' | node scripts/new-run.js schema - → <run>.
Step 1 — Classify (Agent 1)
For each source table, dispatch star-schema-classifier (businessProcess, grainHint, flatTable content, tableName) → <run>/01-classify-<table>.json. Use the proposed grain (or the user's grainHint) as the grainStatement for Step 2.
Step 2–3 — Design ⇄ Validate loop (Agents 2 & 3, up to 3 attempts)
Repeat for attempt = 1..3:
- Dispatch star-schema-designer (businessProcess, grainStatement, classified columns, industry/scd/kpis/painPoints, and
validatorFeedback= the previous attempt's issues or "None — first attempt") →<run>/02-schema-attempt<n>.json. - Dispatch star-schema-validator with that schema path →
<run>/03-validate-attempt<n>.json. - Track the best schema (highest score). If
approvedis true (score ≥ 80 and no Critical violations), stop. Otherwise feed itsissuesback asvalidatorFeedbackand retry.
After the loop, copy the best schema to <run>/schema.json and its report to <run>/validation.json. Note the final score and whether it was approved (surface remaining issues honestly if it never reached 80).
Step 4 — Render DDL + Mermaid (deterministic, no AI)
node -e "const fs=require('fs');const s=require('<run>/schema.json');fs.writeFileSync('<run>/schema.sql',require('./scripts/lib/schemaToDDL').schemaToDDL(s));fs.writeFileSync('<run>/schema.mmd',require('./scripts/lib/schemaToMermaid').schemaToMermaid(s));console.error('wrote schema.sql + schema.mmd')"
Step 5 — DAX stubs (Agent 4)
Dispatch dax-stub-generator with <run>/schema.json and knownKpis → <run>/dax-stubs.json.
Step 6 — Report back
Give the user the artifacts: schema.json, schema.sql (T-SQL DDL), schema.mmd (Mermaid ER — paste into any Mermaid viewer), dax-stubs.json, and validation.json. Quote the validation score, whether it was approved, the fact/dimension counts, and any flagged DAX stubs that need business confirmation.
Notes
- Model tiers per agent frontmatter: classifier + designer = sonnet (the reasoning-heavy steps); validator + dax = haiku.
- The loop mirrors the original server's "retry design until score ≥ 80, keep the best attempt" behaviour.