@luquimbo/bi-superpowers 2.0.1 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/.claude-plugin/marketplace.json +2 -24
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.claude-plugin/skill-manifest.json +2 -178
  4. package/.mcp.json +0 -16
  5. package/.plugin/plugin.json +1 -1
  6. package/AGENTS.md +37 -55
  7. package/CHANGELOG.md +44 -0
  8. package/README.md +74 -191
  9. package/bin/cli.js +42 -43
  10. package/bin/commands/install.js +59 -8
  11. package/bin/commands/install.test.js +77 -0
  12. package/bin/lib/generators/claude-plugin.js +6 -31
  13. package/bin/lib/generators/claude-plugin.test.js +12 -11
  14. package/bin/lib/mcp-config.js +287 -0
  15. package/bin/lib/mcp-config.test.js +273 -0
  16. package/bin/lib/microsoft-mcp.js +6 -20
  17. package/bin/lib/microsoft-mcp.test.js +25 -21
  18. package/bin/postinstall.js +18 -23
  19. package/bin/utils/mcp-detect.js +4 -20
  20. package/bin/utils/mcp-detect.test.js +9 -33
  21. package/package.json +1 -1
  22. package/skills/pbi-connect/SKILL.md +1 -1
  23. package/skills/project-kickoff/SKILL.md +1 -1
  24. package/commands/contributions.md +0 -265
  25. package/commands/data-model-design.md +0 -468
  26. package/commands/dax-doctor.md +0 -248
  27. package/commands/fabric-scripts.md +0 -452
  28. package/commands/migration-assistant.md +0 -290
  29. package/commands/model-documenter.md +0 -242
  30. package/commands/report-layout.md +0 -296
  31. package/commands/rls-design.md +0 -533
  32. package/commands/theme-tweaker.md +0 -624
  33. package/skills/contributions/SKILL.md +0 -267
  34. package/skills/data-model-design/SKILL.md +0 -470
  35. package/skills/data-modeling/SKILL.md +0 -280
  36. package/skills/data-quality/SKILL.md +0 -664
  37. package/skills/dax/SKILL.md +0 -746
  38. package/skills/dax-doctor/SKILL.md +0 -250
  39. package/skills/dax-udf/SKILL.md +0 -489
  40. package/skills/deployment/SKILL.md +0 -320
  41. package/skills/excel-formulas/SKILL.md +0 -463
  42. package/skills/fabric-scripts/SKILL.md +0 -454
  43. package/skills/fast-standard/SKILL.md +0 -509
  44. package/skills/governance/SKILL.md +0 -258
  45. package/skills/migration-assistant/SKILL.md +0 -292
  46. package/skills/model-documenter/SKILL.md +0 -244
  47. package/skills/power-query/SKILL.md +0 -406
  48. package/skills/query-performance/SKILL.md +0 -480
  49. package/skills/report-design/SKILL.md +0 -207
  50. package/skills/report-layout/SKILL.md +0 -298
  51. package/skills/rls-design/SKILL.md +0 -535
  52. package/skills/semantic-model/SKILL.md +0 -237
  53. package/skills/testing-validation/SKILL.md +0 -643
  54. package/skills/theme-tweaker/SKILL.md +0 -626
  55. package/src/content/skills/contributions.md +0 -259
  56. package/src/content/skills/data-model-design.md +0 -462
  57. package/src/content/skills/data-modeling.md +0 -272
  58. package/src/content/skills/data-quality.md +0 -656
  59. package/src/content/skills/dax-doctor.md +0 -242
  60. package/src/content/skills/dax-udf.md +0 -481
  61. package/src/content/skills/dax.md +0 -738
  62. package/src/content/skills/deployment.md +0 -312
  63. package/src/content/skills/excel-formulas.md +0 -455
  64. package/src/content/skills/fabric-scripts.md +0 -446
  65. package/src/content/skills/fast-standard.md +0 -501
  66. package/src/content/skills/governance.md +0 -250
  67. package/src/content/skills/migration-assistant.md +0 -284
  68. package/src/content/skills/model-documenter.md +0 -236
  69. package/src/content/skills/power-query.md +0 -398
  70. package/src/content/skills/query-performance.md +0 -472
  71. package/src/content/skills/report-design.md +0 -199
  72. package/src/content/skills/report-layout.md +0 -290
  73. package/src/content/skills/rls-design.md +0 -527
  74. package/src/content/skills/semantic-model.md +0 -229
  75. package/src/content/skills/testing-validation.md +0 -635
  76. package/src/content/skills/theme-tweaker.md +0 -618
@@ -1,280 +0,0 @@
1
- ---
2
- name: "data-modeling"
3
- description: "Use when the user asks about Data Modeling Skill, especially phrases like \"data model\", \"star schema\", \"fact table\", \"relationship\", \"surrogate key\", \"SCD\"."
4
- version: "2.0.1"
5
- ---
6
-
7
- <!-- Generated by BI Agent Superpowers. Edit src/content/skills/data-modeling.md instead. -->
8
-
9
- # Data Modeling Skill
10
-
11
- ## Trigger
12
- Activate this skill when user mentions:
13
- - "data model", "semantic model", "data modeling"
14
- - "star schema", "snowflake schema"
15
- - "fact table", "dimension table", "bridge table"
16
- - "relationship", "cardinality", "filter direction"
17
- - "surrogate key", "business key"
18
- - "SCD", "slowly changing dimension"
19
- - "role-playing dimension"
20
-
21
- ## Identity
22
- You are a **Data Modeling Expert** specializing in dimensional modeling for Power BI and Analysis Services. You help users design efficient, scalable star schemas that follow Kimball methodology and Power BI best practices.
23
-
24
- ---
25
-
26
- ## Overview
27
- Best practices for designing semantic models in Power BI.
28
-
29
- ## Star Schema Design
30
-
31
- ### Fact Tables
32
- - Contain measurable events/transactions
33
- - **Plural names** (multiple events): `Sales`, `Orders`, `Transactions`
34
- - **No `Fact_` prefix** — that's developer jargon, users see this in the model
35
- - Granularity: one row per event/transaction
36
- - Include foreign keys to dimension tables (hidden from report view)
37
- - Hide raw numeric columns; expose them through explicit measures
38
-
39
- ```
40
- Sales ← plural, business name, no prefix
41
- ├── SalesKey (PK, hidden)
42
- ├── DateKey (FK, hidden)
43
- ├── ProductKey (FK, hidden)
44
- ├── CustomerKey (FK, hidden)
45
- ├── StoreKey (FK, hidden)
46
- ├── Quantity (hidden, exposed via [Quantity Sold] measure)
47
- ├── Unit Price (hidden, used in measures)
48
- └── Sales Amount (hidden, used in [Sales] measure)
49
- ```
50
-
51
- ### Dimension Tables
52
- - Contain descriptive attributes
53
- - **Singular names** (describes one entity): `Customer`, `Product`, `Date`
54
- - **No `Dim_` prefix** — users see this name
55
- - Include surrogate key (integer PK, hidden)
56
- - Denormalized for simplicity
57
- - Include business key for lookups
58
-
59
- ```
60
- Product ← singular, business name, no prefix
61
- ├── ProductKey (PK, surrogate, hidden)
62
- ├── Product ID (business key, visible)
63
- ├── Product Name
64
- ├── Category
65
- ├── Subcategory
66
- ├── Brand
67
- └── Unit Cost
68
- ```
69
-
70
- ### Date Dimension
71
- Essential for time intelligence. Mark as Date Table in Power BI. Singular: `Date`, never `Dates` or `Dim_Date`.
72
-
73
- ```
74
- Date ← singular, no prefix
75
- ├── DateKey (PK, YYYYMMDD integer, hidden)
76
- ├── Date (actual date)
77
- ├── Year
78
- ├── Quarter
79
- ├── Month
80
- ├── Month Name
81
- ├── Week
82
- ├── Day of Week
83
- ├── Day Name
84
- ├── Is Weekend
85
- ├── Is Holiday
86
- └── Fiscal Year (if different from calendar)
87
- ```
88
-
89
- ## Relationship Best Practices
90
-
91
- ### Cardinality
92
- | Type | Use Case |
93
- |------|----------|
94
- | One-to-Many (*:1) | Dimension to Fact (most common) |
95
- | One-to-One (1:1) | Rare; consider merging tables |
96
- | Many-to-Many (*:*) | Bridge tables, avoid if possible |
97
-
98
- ### Filter Direction
99
- ```
100
- Dimension ──(filters)──> Fact ✓ Single direction (default)
101
- Dimension <──(filters)──> Fact ⚠ Bi-directional (use sparingly)
102
- ```
103
-
104
- ### Active vs Inactive Relationships
105
- ```dax
106
- -- Only one active relationship between tables
107
- -- Use USERELATIONSHIP for inactive relationships
108
-
109
- Sales_ByShipDate =
110
- CALCULATE(
111
- [TotalSales],
112
- USERELATIONSHIP(Sales[ShipDate], 'Date'[Date])
113
- )
114
- ```
115
-
116
- ### Role-Playing Dimensions
117
- Same dimension used multiple times (e.g., Date for Order, Ship, Delivery):
118
-
119
- ```
120
- Option 1: Multiple relationships (one active, rest inactive)
121
- Date ──── Sales[OrderDate] (active)
122
- Date ─ ─ ─ Sales[ShipDate] (inactive)
123
- Date ─ ─ ─ Sales[DeliveryDate] (inactive)
124
-
125
- Option 2: Duplicate dimension tables (clearer but redundant)
126
- OrderDate ──── Sales[OrderDate]
127
- ShipDate ──── Sales[ShipDate]
128
- ```
129
-
130
- ## Naming Conventions
131
-
132
- **Core principle:** user-visible names speak business language, technical elements stay hidden. No `dim`, `fact`, `tbl` prefixes — those leak SQL jargon into the user experience.
133
-
134
- | Element | Convention | Example | Anti-Pattern |
135
- |---------|------------|---------|--------------|
136
- | Fact tables | Plural, business name | `Sales`, `Orders`, `Transactions` | `Fact_Sales`, `fct_sales` |
137
- | Dimension tables | Singular, business name | `Customer`, `Product`, `Date` | `Dim_Customer`, `dim_customers` |
138
- | Bridge tables | `Bridge` prefix | `Bridge Customer Region` | `BridgeCustomerRegion` |
139
- | Foreign keys | `[Entity]Key`, hidden | `ProductKey`, `CustomerKey` | `prod_id`, `FK_Product` |
140
- | Surrogate PK | `[Entity]Key`, hidden | `CustomerKey` | `ID`, `pk_customer` |
141
- | Business key | `[Entity] ID` or `Code` | `Customer ID`, `Product Code` | `BusinessKey` |
142
- | Attribute columns | Natural language | `First Name`, `Order Date` | `FrstNm`, `OrdDt` |
143
- | Measures | Auto-explicative, no prefix | `Sales`, `Margin %`, `Sales YTD` | `Total Sales`, `Sum of Sales` |
144
-
145
- See `/governance` for the complete naming guide.
146
-
147
- ## Common Patterns
148
-
149
- ### Many-to-Many with Bridge Table
150
- ```
151
- Customer ──(1:*)── Bridge Customer Product ──(*:1)── Product
152
- ```
153
-
154
- ### Slowly Changing Dimensions (SCD)
155
- ```
156
- Type 1: Overwrite (no history)
157
- Type 2: Add new row with version tracking
158
- - Start Date, End Date, Is Current flag
159
-
160
- Customer (SCD2)
161
- ├── CustomerKey (surrogate, unique per version, hidden)
162
- ├── Customer ID (business key)
163
- ├── Customer Name
164
- ├── Address
165
- ├── Start Date
166
- ├── End Date
167
- └── Is Current
168
- ```
169
-
170
- ### Junk Dimension (Low-Cardinality Flags)
171
- Combine multiple low-cardinality attributes:
172
- ```
173
- Order Flags
174
- ├── OrderFlagKey (hidden)
175
- ├── Is Rush
176
- ├── Is Gift
177
- ├── Is Online
178
- └── Payment Type
179
- ```
180
-
181
- ### Degenerate Dimension
182
- Attributes stored in fact table (no separate dimension):
183
- ```
184
- Sales
185
- ├── ...
186
- ├── Invoice Number (degenerate dimension)
187
- ├── Order Number (degenerate dimension)
188
- └── ...
189
- ```
190
-
191
- ## Performance Optimization
192
-
193
- ### Column Organization
194
- 1. Hide foreign keys from report view
195
- 2. Hide technical columns (keys, IDs)
196
- 3. Organize visible columns in display folders
197
- 4. Set appropriate data types
198
-
199
- ### Data Reduction
200
- 1. Remove unused columns
201
- 2. Aggregate historical data (archive detail)
202
- 3. Use incremental refresh for large fact tables
203
- 4. Consider aggregation tables for summaries
204
-
205
- ### Relationship Optimization
206
- 1. Use integer keys (not text) for relationships
207
- 2. Ensure proper indexing at source
208
- 3. Minimize bi-directional relationships
209
- 4. Avoid circular relationship paths
210
-
211
- ## Model Validation Checklist
212
-
213
- - [ ] No technical prefixes (`Dim_`, `Fact_`, `tbl_`)
214
- - [ ] Dimensions are singular (`Customer`), facts are plural (`Sales`)
215
- - [ ] Foreign keys hidden from report view
216
- - [ ] Sumable source columns hidden (only explicit measures visible)
217
- - [ ] All relationships are single-direction (except where required)
218
- - [ ] Date table marked as Date Table
219
- - [ ] No circular dependencies
220
- - [ ] Measures in dedicated folder or table
221
- - [ ] Appropriate data types assigned
222
- - [ ] Display folders organized
223
- - [ ] Key columns properly indexed
224
-
225
- ## Anti-patterns to Avoid
226
-
227
- ### Wide Tables (Flat Files)
228
- ```
229
- ❌ One big table with everything
230
- ✓ Separate into facts and dimensions
231
- ```
232
-
233
- ### Snowflake Complexity
234
- ```
235
- ❌ Product → Category → Department
236
- ✓ Denormalize: Product (includes Category, Department columns)
237
- ```
238
-
239
- ### Calculated Columns for Measures
240
- ```
241
- ❌ Calculated column: [Profit] = [Revenue] - [Cost]
242
- ✓ Measure: Profit = SUM(Sales[Revenue]) - SUM(Sales[Cost])
243
- ```
244
-
245
- ### Technical Prefixes on User-Visible Tables
246
- ```
247
- ❌ Fact_Sales, Dim_Customer (developer jargon leaks to users)
248
- ✓ Sales, Customer (business names)
249
- ```
250
-
251
- ### Visible Sumable Columns
252
- ```
253
- ❌ Quantity column visible — users drag it into visuals as Sum/Average
254
- ✓ Hide Quantity, expose explicit measure: Quantity Sold = SUM(Sales[Quantity])
255
- ```
256
-
257
- ### Missing Date Dimension
258
- ```
259
- ❌ Using date column directly from fact table
260
- ✓ Proper Date dimension with all time intelligence attributes
261
- ```
262
-
263
- ## Complexity Adaptation
264
-
265
- Adjust depth based on `config.json → experienceLevel`:
266
- - **beginner**: Step-by-step with explanations, reference library examples
267
- - **intermediate**: Standard depth, explain non-obvious decisions
268
- - **advanced**: Concise, skip basics, focus on edge cases and optimization
269
-
270
- ## Related Skills
271
-
272
- - `/data-model-design` — Interactive model builder
273
- - `/dax` — Write measures for the model
274
- - `/semantic-model` — Advanced semantic model patterns
275
- - `/governance` — Naming conventions for model objects
276
-
277
- ## Related Resources
278
-
279
- - [Snippets: Time Intelligence](../../snippets/dax/time-intelligence.md)
280
- - [Templates: Data Models](../../templates/data-models/)