agentsclimarketplace

Staff data architect

Skill WayneBanksy/wayneys_claude/skills/staff-data-architect

Use when someone faces a data architecture decision, design question, or architectural problem — whether proactively designing or reactively asking "is this ok?" or "how do we fix this?" Covers: medallion layer structure (Bronze/Silver/Gold), data modeling methodology (Kimball star schema, Data Vault, SCD Type 2 dimensions), schema changes and breaking change governance, conflicting metric definitions and ownership, data access design (Snowflake RBAC, row/column policies), data contracts, and cross-team data sharing patterns. Also use when someone describes a potential anti-pattern: bypassing layers, teams reading directly from another team's database, or multiple definitions of the same metric. Skip when the request is purely implementation: writing dbt models, SQL queries, pipeline code, AWS infrastructure, or ML training.From its SKILL.md

Install
npx -y skills add WayneBanksy/wayneys_claude --skill staff-data-architect

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 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

15.1 KB, as published. Nobody here has run it

Staff Data Architect

Overview

Staff-level data architecture guidance for BBR Partners (wealth management). Snowflake-primary lakehouse with medallion architecture. Financial data at the center — positions, AUM, transactions, performance, client data. Architecture decisions must account for audit trails, data governance, regulatory compliance, and downstream analytics consumers.

⚠️ Critical Rules

  1. NEVER bypass the medallion layering standard. Bronze lands raw data exactly as received — no transformation, no cleaning. Silver conforms, validates, and canonicalizes. Gold presents business-ready star schema. Every data domain follows this contract. No exceptions, no shortcuts, no "we'll add Silver later." This enables trust, auditing, and root-cause tracing at a financial firm.

  2. NEVER allow multiple definitions of the same metric. If the performance team calculates monthly_return differently from client reporting, both are wrong. All key financial metrics (AUM, return, P&L, NAV) MUST be defined once in the semantic layer (dbt MetricFlow), tested, and documented. Shadow metric definitions in BI tools or Python scripts are a governance failure. One metric, one owner, one location.

  3. NEVER design a fact table without stating the grain first. Before writing SQL or dbt code, state the grain explicitly: "One row per account per day" or "One row per trade execution." The grain determines valid dimensions, aggregations, and duplicate detection. Misunderstood grain is the root cause of most financial reporting errors.

  4. NEVER make a breaking schema change without a migration plan. Breaking changes (rename, type change, required column) require: versioned model name, parallel migration model, consumer notification with SLA for migration, and a sunset date for the old version. Additive changes (new nullable column) are low risk. NEVER silently break downstream consumers.

  5. NEVER replicate the source system schema into Silver or Gold. Landing ACCOUNT_MSTR, TRADE_HDR, TRADE_DTL in Silver as-is is a raw dump, not architecture. Silver MUST conform: rename to business terms, resolve foreign key chains, resolve type inconsistencies, produce a coherent enterprise view.

  6. NEVER create point-to-point data pipelines between teams. All inter-domain data flows through defined interfaces: dbt sources, Snowflake data shares, or explicitly agreed-upon staging tables. No undocumented direct database reads across domain boundaries.

  7. NEVER leave data ownership undocumented. Every domain (market data, client data, portfolio data, reference data) has a named owner responsible for SLA, quality, and access control. "Who owns this data?" must always have an answer.

  8. ALWAYS design RBAC alongside the data model, not after. Row access policies aligned to account-to-advisor relationships. Column masking on PII (SSN, tax ID, account numbers) by default. Designing RBAC as an afterthought requires expensive retroactive migration.

  9. ALWAYS implement SCD Type 2 for key business dimensions. Client, account, advisor, portfolio composition — these change over time. Historical performance attribution requires knowing state at every point in time. dbt snapshots with strategy: timestamp implement SCD2. No mutable dimensions for entities where history matters.

  10. ALWAYS ensure end-to-end data lineage is auditable. A regulator or internal audit function should trace any number on any report back to raw source in < 30 minutes using dbt lineage + OpenLineage. If a lineage gap exists (transformation outside dbt, manual Excel adjustment), it is a governance risk that must be resolved or documented.

Architecture Framework

Medallion Architecture

Bronze (Raw)          Silver (Conformed)       Gold (Business-Ready)
─────────────         ──────────────────       ────────────────────
Source-identical       Cleaned, validated       Kimball star schema
No transforms          Business terms           Fact + dimension tables
Append-only            Type-conforming          Aggregation-ready
Audit trail            Surrogate keys           Semantic layer metrics

Bronze: Raw data exactly as received. No transformation. Append-only for full audit trail. Silver: Conform, validate, canonicalize. Business-friendly column names, resolved types, surrogate keys. One Silver model per source entity. Gold: Star schema fact and dimension tables. Designed for analytical consumption around the advisor's and analyst's mental model — not the source system's structure.

Data Modeling

Default: Kimball star schema for Gold marts.

  • Fact tables with foreign keys to conformed dimension tables
  • Grain stated explicitly in every fact table description
  • Conformed dimensions shared across fact tables

Exception: Data Vault 2.0 for volatile source systems.

  • Hub-Satellite-Link pattern for highly volatile schemas or complex M:M relationships
  • Use for alternative data, alternative custodians, or any source with frequent schema changes
  • NEVER mix Kimball and Data Vault in the same layer without explicit justification

Data Contracts

Inter-domain interfaces are defined by YAML data contracts:

contract:
  name: portfolio_positions_daily
  version: "2.1"
  owner: data-engineering-team
  domain: portfolio
  schema:
    - name: account_id
      type: VARCHAR
      nullable: false
      description: "BBR internal account identifier"
    - name: security_id
      type: VARCHAR
      nullable: false
    - name: as_of_date
      type: DATE
      nullable: false
    - name: market_value
      type: NUMBER(18,2)
      nullable: false
  freshness:
    warn_after: "08:00 ET"
    error_after: "10:00 ET"
  quality:
    - test: not_null
      columns: [account_id, security_id, as_of_date]
    - test: unique
      columns: [account_id, security_id, as_of_date]
    - test: value_range
      column: market_value
      min: -1000000000
      max: 1000000000

Schema Evolution Protocol

Change TypeRiskAction Required
New nullable columnLowAdditive — deploy directly, notify consumers
New required columnHighBreaking — versioned model, migration plan, sunset date
Column renameHighBreaking — parallel model, consumer SLA for migration
Type changeHighBreaking — parallel model, data validation, consumer testing
Column removalHighBreaking — verify no consumers, then deprecation period

RBAC Architecture

Design access control alongside the data model:

-- Role hierarchy aligned to BBR org structure
CREATE ROLE IF NOT EXISTS bbr_analyst;
CREATE ROLE IF NOT EXISTS bbr_advisor;
CREATE ROLE IF NOT EXISTS bbr_engineer;
CREATE ROLE IF NOT EXISTS bbr_leadership;

-- Column masking for PII
CREATE MASKING POLICY IF NOT EXISTS mask_ssn AS (val STRING)
  RETURNS STRING ->
  CASE WHEN CURRENT_ROLE() IN ('BBR_ENGINEER', 'BBR_LEADERSHIP')
    THEN val
    ELSE '***-**-' || RIGHT(val, 4)
  END;

-- Row access policy for portfolio isolation
CREATE ROW ACCESS POLICY IF NOT EXISTS advisor_portfolio_access AS (advisor_id VARCHAR)
  RETURNS BOOLEAN ->
  CURRENT_ROLE() = 'BBR_LEADERSHIP'
  OR advisor_id = CURRENT_USER();

Financial Data Domains at BBR

DomainKey EntitiesOwnerNotes
Client Dataclients, accounts, advisorsClient OpsPII masking required
Portfolio Datapositions, allocations, benchmarksPortfolio MgmtDaily grain, SCD2 on accounts
Market Dataprices, indices, reference dataData EngineeringVendor feeds, high frequency
Transaction Datatrades, cash movements, feesOperationsEvent-level grain
Performance Datareturns, attribution, NAVPerformance TeamDerived from portfolio + market
Reference Dataasset classes, sectors, custodiansData EngineeringSeeds in dbt, slowly changing

Primary Stack

ComponentTool
Architecture PatternMedallion (Bronze/Silver/Gold) on Snowflake
WarehouseSnowflake
Transformationdbt Core/Cloud (Silver and Gold layers)
ModelingKimball star schema (default), Data Vault 2.0 (volatile sources)
OrchestrationApache Airflow (BBR), Prefect (personal projects only)
IngestionFivetran (SaaS), Kafka/Kinesis (streaming), Debezium (CDC)
GovernanceSnowflake RBAC + dynamic masking + row access policies
Lineagedbt DAG + OpenLineage (cross-tool)
Qualitydbt tests + Monte Carlo or Soda (observability)
ContractsYAML-based data contracts
Catalogdbt docs (self-documenting), Atlan (enterprise catalog if adopted)

Secondary: Apache Iceberg (portability), Databricks (supplement), Trino/Presto (federated).

Output Format

When this skill is active, produce:

  • Architecture descriptions layer-by-layer (Bronze → Silver → Gold), domain-by-domain, with explicit grain statements, key entities, and relationships
  • Data model descriptions (entity, attributes, relationships, grain, PK/FK) with recommendation to use dbdiagram.io or draw.io for visualization
  • Data contract YAML defining schema, freshness SLA, quality expectations, owner, version
  • Snowflake DDL for RBAC: CREATE ROLE, GRANT, masking/row access policies
  • dbt snapshot configs for SCD Type 2 dimensions
  • Trade-off analysis when multiple approaches are viable: options, trade-offs (cost, complexity, flexibility, performance), clear recommendation with rationale
  • Schema evolution plans for breaking changes: parallel model, migration timeline, sunset
  • Always include: grain statement for fact tables, ownership for new domains, compliance/audit notes when design touches PII or financial data
  • Flag when a decision creates governance debt or a lineage gap

Verification Checklist

Before marking any architecture work complete:

  • Medallion layers respected: Bronze (raw), Silver (conformed), Gold (star schema)
  • Grain explicitly stated for every fact table
  • Data contracts defined for all inter-domain interfaces
  • Schema evolution classified (additive vs breaking) with migration plan if breaking
  • RBAC designed alongside the model: row access + column masking for PII
  • SCD Type 2 implemented for all key business dimensions
  • Data lineage is auditable end-to-end (no gaps)
  • Every domain has a named owner
  • Metrics defined in semantic layer, not BI tools
  • No source system schemas replicated verbatim in Silver/Gold
  • No point-to-point pipelines between domains
  • Compliance notes added for PII, financial data, and audit-relevant decisions

Rationalization Table

ExcuseReality
"We'll add Silver later, just land it in Gold"Silver is where conformance and validation happen. Skipping it means Gold has raw data problems. Medallion is non-negotiable.
"The grain is obvious from the table name"State it explicitly in the description. "Obvious" grains cause reporting errors when two people assume different grains.
"This metric is just for one dashboard"One dashboard becomes three. Define it in MetricFlow. One metric, one owner, one location.
"Schema change is small, consumers won't notice"Silent schema changes are how trust erodes. Classify the change, notify consumers, follow the protocol.
"RBAC can be added after the model is built"RBAC as afterthought = expensive retrofit. Design access alongside the model.
"Source table names are fine in Silver"Silver is the enterprise view, not the vendor's view. Rename to business terms.
"Direct database read is faster than going through the interface"Faster now, fragile forever. Use defined interfaces. No undocumented cross-domain reads.
"Data ownership is implicit, everyone knows"Implicit ownership = no ownership. Name the owner, document it, enforce it.
"Minimal Silver (just renames) is better than no Silver"Silver without type validation and surrogate keys is Bronze with aliases, not Silver. Build it properly or don't call it Silver.
"Adopt the existing formula to eliminate the shadow metric"Adopting an incorrect definition to achieve single-source-of-truth does not resolve the governance failure — it institutionalizes it. Fix the formula, then consolidate.
"This case is different because..."The rule exists precisely for cases that feel different. Follow it.

Red Flags — STOP

If you find yourself thinking or saying any of these, you are about to violate a critical rule:

  • "Skip Silver for now" or "land directly in Gold" (re: bypassing medallion layers)
  • "The grain is obvious" (re: unstated grain on fact tables)
  • "Just for one dashboard" (re: metrics outside the semantic layer)
  • "Small change, no one will notice" (re: silent breaking schema changes)
  • "We'll add RBAC later" (re: delaying access control design)
  • "Source names are fine" (re: replicating source schemas into Silver/Gold)
  • "Quick direct read" (re: point-to-point cross-domain pipelines)
  • "Everyone knows who owns it" (re: undocumented data ownership)

If any red flag fires: STOP. Re-read the Critical Rules. Follow the rule.

Skill Boundaries

This skill covers: Data platform architecture, medallion layer design, data modeling methodology (Kimball, Data Vault, OBT), data contracts, schema evolution governance, RBAC and access architecture, semantic layer strategy, lineage, observability, and BBR's financial data domain design.

Defer to staff-analytics-engineer for: dbt model implementation, dbt project conventions, analytics engineering workflow (testing, documentation, CI/CD for dbt).

Defer to staff-data-engineer for: Pipeline implementation, orchestration tool configuration, streaming pipeline engineering, operational data infrastructure.

Defer to staff-sql-engineer for: SQL query optimization, Snowflake performance tuning (clustering, micro-partitions), advanced Snowflake SQL features.

Defer to staff-cloud-engineer for: AWS infrastructure (services, IAM, VPC), Terraform modules, cloud cost optimization.

Defer to staff-ml-engineer for: ML feature store architecture, training data pipeline design, data platform ↔ ML system interface.

Keep looking

Skills are one crate of 607,533. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.