AGENT SKILL

ac-analytical-data-modeling

Designing data for questions rather than for transactions: fact and dimension tables, grain as the first decision, star and snowflake shapes, slowly changing dimensions and their types, aggregation and pre-summary trade-offs, columnar layout and sort order, metrics definition layers, and the written modeling record. It explains how analytical shape serves queries; it never recommends a warehouse product and never promises a query time. Use when asking "star schema", "fact table", "dimension table", "grain", "slowly changing dimension", "SCD type 2", "snowflake schema", "OLAP", "metrics layer", "semantic layer", "columnar storage", "aggregate table", "why is this dashboard query slow". Not for operational schema and migrations (ac-database-changes), not for reporting the numbers once defined (ac-dataviz), not for query and index tuning of the engine (ac-query-and-index-design).

License 许可
MIT
最近更新
2026-11-15
Stars
★ 81
Forks
17

01 前言 Front Matter

name
ac-analytical-data-modeling
status
seedling
license
MIT
metadata
{ "domain": "software-engineering" }
description
Designing data for questions rather than for transactions: fact and dimension tables, grain as the first decision, star and snowflake shapes, slowly changing dimensions and their types, aggregation and pre-summary trade-offs, columnar layout and sort order, metrics definition layers, and the written modeling record. It explains how analytical shape serves queries; it never recommends a warehouse product and never promises a query time. Use when asking "star schema", "fact table", "dimension table", "grain", "slowly changing dimension", "SCD type 2", "snowflake schema", "OLAP", "metrics layer", "semantic layer", "columnar storage", "aggregate table", "why is this dashboard query slow". Not for operational schema and migrations (ac-database-changes), not for reporting the numbers once defined (ac-dataviz), not for query and index tuning of the engine (ac-query-and-index-design).

02 资源文件 11

03 SKILL.md 正文

Analytical data modeling

Overview

Operational schema serves writes; analytical schema serves questions. The difference shows in every decision: a transactional model normalises to protect integrity under concurrent updates, while an analytical model denormalises around a grain — one row per event, per order line, per daily balance — and organises everything else to serve aggregation over that grain. Getting the grain wrong is the one mistake that cannot be fixed by indexing, because every number built on it inherits the ambiguity.

This skill covers the analytical craft: choosing grain, designing facts and dimensions, star versus snowflake, handling change over time in dimensions, pre-aggregation and its refresh cost, columnar layout and sort order, and the metrics definition layer that keeps a number meaning one thing. The engine's query tuning and the operational schema are other skills.

Primary sources: https://www.kimballgroup.com/ and https://martinfowler.com/.

When to use

  • When designing a schema whose job is analysis and reporting.
  • When a metric must mean the same thing in every report.
  • When dimension data changes over time and history must stay truthful.
  • When aggregate tables and pre-summaries are being considered.

When NOT to use

  • For operational schema design and migrations (use ac-database-changes).
  • For presenting the numbers once defined (use ac-dataviz).
  • For engine-level query and index tuning (use ac-query-and-index-design).

Subskill Index

Leaf Domain segment Scope (one line)
subskills/grain-and-facts.md software-engineering/grain-and-facts The one-row-per-what decision, and what belongs in a fact.
subskills/dimensions.md software-engineering/dimensions Descriptive context, keys, and the flat-vs-snowflaked choice.
subskills/slowly-changing-dimensions.md software-engineering/slowly-changing-dimensions Preserving history as descriptive data changes, types one to four.
subskills/star-versus-snowflake.md software-engineering/star-versus-snowflake Join depth versus update cost, and when normalising dimensions is worth it.
subskills/aggregates-and-summaries.md software-engineering/aggregates-and-summaries Pre-computed rolls, their refresh windows, and their drift risk.
subskills/columnar-and-sort-design.md software-engineering/columnar-and-sort-design How columnar layout, sort order, and partitioning serve analytical scans.
subskills/metrics-definition-layer.md software-engineering/metrics-definition-layer One definition per metric, and the drift that follows from many.
subskills/modeling-record.md software-engineering/modeling-record The written record: grain, dimensions, change policy, and metric ownership.

Status and honest limits

A model encodes the business definitions of its facts and dimensions, and those definitions are negotiated rather than discovered — one team's revenue is another's bookings. Nothing here recommends a warehouse product, and a model whose grain is unstated produces numbers that reconcile only by accident.

04 同仓库更多 Skills

jiayaoqijia
jiayaoqijia/cryptoskill

troves

Deposit and withdraw from Troves DeFi yield vault strategies on Starknet. View available strategies, check positions, and manage vault deposits. Use this skill when the user mentions Troves, vault, yield vault, DeFi vault, strategy, yield farming, vault deposit, vault withdraw, earning yield through vaults, passive yield strategies, or wants to deposit into or withdraw from a yield strategy — even if they don't say "Troves" explicitly.

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

trade

Swap tokens on Starknet via Fibrous DEX aggregator. Supports per-provider selection (avnu, ekubo, or auto to race all). Use this skill when the user wants to swap, exchange, trade, convert, buy, or sell one token for another on Starknet. Also use when the user asks about token prices, exchange rates, DEX routing, best swap route, or wants to check how much they would receive for a given amount — even if they don't explicitly say "swap".

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

staking

Stake, unstake, claim, and compound rewards for STRK, WBTC, tBTC, SolvBTC, and LBTC on Starknet. View validators, pools, and staking positions. Use this skill when the user mentions staking, delegating, validators, staking pools, rewards, compounding, unstaking, earning yield, passive income on crypto, or wants to earn on their STRK or BTC tokens — even if they don't say "stake" explicitly.

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

send

Send STRK, ETH, or any ERC-20 token to a Starknet address. Supports simulation (dry-run) before execution. Use this skill when the user wants to send, transfer, pay, tip, or move tokens to another wallet address on Starknet. Also trigger when the user mentions sending funds to someone, making a payment, transferring assets, or moving crypto to a specific address — even if they just say "pay 10 STRK to 0x...".

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

portfolio

View a comprehensive DeFi portfolio dashboard and optimize portfolio allocation via automated rebalancing. Use this skill when the user wants an overview, summary, dashboard, total value, net worth, portfolio rebalancing, target allocation, or wants to see all their DeFi positions across Starknet at once. Also trigger when the user asks "what do I have", "show me everything", "how much am I worth", "my positions", "my investments", "rebalance my portfolio", "I want 50% ETH", "optimize my holdings", or any request for a holistic view of their Starknet holdings — even if they don't explicitly say "portfolio".

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

multi-swap

Execute multiple token swaps in a single Starknet transaction via Fibrous (default). Supports per-provider selection (avnu, ekubo, or auto to race all). Supports 2-3 swap pairs bundled into one multicall. Use this skill when the user wants to swap multiple token pairs at once, do batch swaps, execute several trades simultaneously, perform parallel swaps, or do bulk trading in one transaction. Also trigger when the user mentions "two swaps", "three swaps", "swap X and Y at the same time", or wants to convert multiple tokens in a single call.

★ 81