agentleFS
santoshkanthetysantoshkanthety/powerbi-agent/skills/powerbi-medallion-architecture/SKILL.md

powerbi-medallion-architecture

Skill3 starsChanged 7 months agoMITView on GitHub

Bronze/Silver/Gold lakehouse design. Use when the user mentions: medallion, bronze, silver, gold, lakehouse, data lake, data architecture, layer design, raw layer, curated layer, semantic layer, OneLake.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Add metadata columns: _ingested_at, _source_system, _file_name

    line 39
  2. Distinctive:

    Add surrogate keys — never expose natural keys to Gold

    line 47
  3. Distinctive:

    Avoid over-partitioning — it kills DirectLake scan performance

    line 64

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Skill: Medallion Architecture Design & Setup

Trigger

Activate when the user mentions: medallion, bronze, silver, gold, lakehouse, data lake, data architecture, layer design, raw layer, curated layer, semantic layer, OneLake

What You Know

You embody the experience of a 20+ year data architect who has designed and delivered enterprise medallion architectures on Microsoft Fabric and Azure Data Lake. You know every trade-off, every failure mode, and every shortcut worth taking.

The Three-Layer Medallion Pattern

OneLake
├── Bronze/  (Raw Ingestion)
│   ├── crm/
│   ├── erp/
│   └── files/
├── Silver/  (Cleaned & Conformed)
│   ├── dim_customer/
│   ├── dim_product/
│   └── fact_sales/
└── Gold/    (Business-Ready)
    ├── semantic_model/
    ├── finance_reporting/
    └── marketing_analytics/

Bronze Layer — Raw Zone

  • Never transform, never filter — store exactly as received
  • Partition by ingestion date: year=YYYY/month=MM/day=DD/
  • Store as Parquet or Delta — never CSV (no schema enforcement)
  • Preserve source system identifiers and timestamps
  • Add metadata columns: _ingested_at, _source_system, _file_name
  • Retain for minimum 7 years (audit trail, replays)

Silver Layer — Conformed Zone

  • Apply data quality rules: nulls, duplicates, referential integrity
  • Standardize data types (e.g., all dates as UTC timestamps)
  • Resolve naming conflicts across source systems
  • Implement slowly changing dimensions (SCD Type 1, 2, 6)
  • Add surrogate keys — never expose natural keys to Gold
  • Validate with Great Expectations or Fabric Data Quality

Gold Layer — Business Zone

  • Optimized for analytical consumption
  • Star Schema preferred for Power BI (see star-schema skill)
  • Pre-aggregated rollup tables for large fact tables (>100M rows)
  • Semantic layer aligned to business vocabulary
  • RLS policies applied at this layer
  • Delta tables with V-Order optimization for Power BI DirectLake

Fabric-Specific Guidance

DirectLake Performance — Gold Layer Rules

  • Enable V-Order on all Delta tables: OPTIMIZE table VORDER
  • Target file size: 128MB–1GB per Parquet file
  • Partition only when cardinality > 10M rows and filter patterns are clear
  • Avoid over-partitioning — it kills DirectLake scan performance

Lakehouse vs Warehouse vs Eventhouse

ScenarioUse
Delta tables, notebooks, MLLakehouse
SQL-only analytics, stored procsData Warehouse
Real-time streaming, KQLEventhouse
Mixed: Power BI + notebooksLakehouse (primary)

Naming Conventions (enforce consistently)

Bronze:  raw_<source>_<entity>
Silver:  stg_<entity> (staging), int_<entity> (intermediate)
Gold:    dim_<entity>, fact_<entity>, agg_<entity>_<grain>

CLI Commands

# Scaffold medallion folder structure in a Fabric workspace
pbi-agent fabric medallion-init --workspace "My Workspace" --layers bronze,silver,gold

# Validate Delta table readiness for DirectLake
pbi-agent fabric validate-delta --table gold.fact_sales

# Check V-Order optimization status
pbi-agent fabric check-vorder --lakehouse "Analytics"

Anti-Patterns to Avoid

  • ❌ Transforming data in Bronze (replay becomes impossible)
  • ❌ Natural keys as join keys in Gold (breaks SCDs)
  • ❌ CSV in any layer (schema drift nightmare)
  • ❌ Partitioning on high-cardinality columns (e.g., CustomerID)
  • ❌ Storing aggregations in Silver (that's Gold's job)
  • ❌ Using Gold for raw ML feature stores (keep a separate feature layer)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.