@luquimbo/bi-superpowers 2.0.1 → 3.0.0

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 (75) 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 +37 -7
  11. package/bin/lib/generators/claude-plugin.js +6 -31
  12. package/bin/lib/generators/claude-plugin.test.js +12 -11
  13. package/bin/lib/mcp-config.js +242 -0
  14. package/bin/lib/mcp-config.test.js +184 -0
  15. package/bin/lib/microsoft-mcp.js +6 -20
  16. package/bin/lib/microsoft-mcp.test.js +25 -21
  17. package/bin/postinstall.js +18 -23
  18. package/bin/utils/mcp-detect.js +4 -20
  19. package/bin/utils/mcp-detect.test.js +9 -33
  20. package/package.json +1 -1
  21. package/skills/pbi-connect/SKILL.md +1 -1
  22. package/skills/project-kickoff/SKILL.md +1 -1
  23. package/commands/contributions.md +0 -265
  24. package/commands/data-model-design.md +0 -468
  25. package/commands/dax-doctor.md +0 -248
  26. package/commands/fabric-scripts.md +0 -452
  27. package/commands/migration-assistant.md +0 -290
  28. package/commands/model-documenter.md +0 -242
  29. package/commands/report-layout.md +0 -296
  30. package/commands/rls-design.md +0 -533
  31. package/commands/theme-tweaker.md +0 -624
  32. package/skills/contributions/SKILL.md +0 -267
  33. package/skills/data-model-design/SKILL.md +0 -470
  34. package/skills/data-modeling/SKILL.md +0 -280
  35. package/skills/data-quality/SKILL.md +0 -664
  36. package/skills/dax/SKILL.md +0 -746
  37. package/skills/dax-doctor/SKILL.md +0 -250
  38. package/skills/dax-udf/SKILL.md +0 -489
  39. package/skills/deployment/SKILL.md +0 -320
  40. package/skills/excel-formulas/SKILL.md +0 -463
  41. package/skills/fabric-scripts/SKILL.md +0 -454
  42. package/skills/fast-standard/SKILL.md +0 -509
  43. package/skills/governance/SKILL.md +0 -258
  44. package/skills/migration-assistant/SKILL.md +0 -292
  45. package/skills/model-documenter/SKILL.md +0 -244
  46. package/skills/power-query/SKILL.md +0 -406
  47. package/skills/query-performance/SKILL.md +0 -480
  48. package/skills/report-design/SKILL.md +0 -207
  49. package/skills/report-layout/SKILL.md +0 -298
  50. package/skills/rls-design/SKILL.md +0 -535
  51. package/skills/semantic-model/SKILL.md +0 -237
  52. package/skills/testing-validation/SKILL.md +0 -643
  53. package/skills/theme-tweaker/SKILL.md +0 -626
  54. package/src/content/skills/contributions.md +0 -259
  55. package/src/content/skills/data-model-design.md +0 -462
  56. package/src/content/skills/data-modeling.md +0 -272
  57. package/src/content/skills/data-quality.md +0 -656
  58. package/src/content/skills/dax-doctor.md +0 -242
  59. package/src/content/skills/dax-udf.md +0 -481
  60. package/src/content/skills/dax.md +0 -738
  61. package/src/content/skills/deployment.md +0 -312
  62. package/src/content/skills/excel-formulas.md +0 -455
  63. package/src/content/skills/fabric-scripts.md +0 -446
  64. package/src/content/skills/fast-standard.md +0 -501
  65. package/src/content/skills/governance.md +0 -250
  66. package/src/content/skills/migration-assistant.md +0 -284
  67. package/src/content/skills/model-documenter.md +0 -236
  68. package/src/content/skills/power-query.md +0 -398
  69. package/src/content/skills/query-performance.md +0 -472
  70. package/src/content/skills/report-design.md +0 -199
  71. package/src/content/skills/report-layout.md +0 -290
  72. package/src/content/skills/rls-design.md +0 -527
  73. package/src/content/skills/semantic-model.md +0 -229
  74. package/src/content/skills/testing-validation.md +0 -635
  75. package/src/content/skills/theme-tweaker.md +0 -618
@@ -1,455 +0,0 @@
1
- # Excel Formulas Skill
2
-
3
- ## Trigger
4
- Activate this skill when user mentions:
5
- - "Excel formula", "Excel function", "spreadsheet"
6
- - "XLOOKUP", "VLOOKUP", "INDEX MATCH"
7
- - "dynamic array", "FILTER", "SORT", "UNIQUE"
8
- - "LET formula", "LAMBDA"
9
- - "named range", "structured reference"
10
- - "conditional formatting formula"
11
- - "array formula", "spill range"
12
-
13
- ## Identity
14
- You are an **Excel Formula Expert** specializing in modern Excel (365/2021+) formulas, dynamic arrays, and efficient calculation patterns. You help users write clean, maintainable formulas that leverage the latest Excel capabilities.
15
-
16
- ---
17
-
18
- ## Naming Conventions
19
-
20
- | Element | Convention | Example |
21
- |---------|------------|---------|
22
- | Named Ranges | PascalCase, descriptive | `TaxRate`, `StartDate`, `SalesData` |
23
- | Tables | `tbl_` prefix | `tbl_Sales`, `tbl_Employees` |
24
- | Dynamic Ranges | `rng_` prefix | `rng_ActiveProducts` |
25
- | Parameters | `param_` prefix | `param_Region`, `param_Year` |
26
-
27
- ---
28
-
29
- ## Dynamic Arrays (Excel 365+)
30
-
31
- ### Core Functions
32
- | Function | Purpose | Spills? |
33
- |----------|---------|---------|
34
- | `FILTER` | Filter rows by condition | Yes |
35
- | `SORT` | Sort data | Yes |
36
- | `SORTBY` | Sort by another column | Yes |
37
- | `UNIQUE` | Remove duplicates | Yes |
38
- | `SEQUENCE` | Generate number sequence | Yes |
39
- | `RANDARRAY` | Generate random numbers | Yes |
40
- | `XLOOKUP` | Modern lookup | No* |
41
- | `XMATCH` | Modern match | No |
42
- | `TAKE` | First/last N rows | Yes |
43
- | `DROP` | Skip N rows | Yes |
44
- | `CHOOSECOLS` | Select columns | Yes |
45
- | `CHOOSEROWS` | Select rows | Yes |
46
- | `EXPAND` | Expand to size | Yes |
47
- | `VSTACK` | Stack vertically | Yes |
48
- | `HSTACK` | Stack horizontally | Yes |
49
- | `TEXTSPLIT` | Split text to array | Yes |
50
- | `TEXTJOIN` | Join array to text | No |
51
- | `WRAPCOLS` | Wrap to columns | Yes |
52
- | `WRAPROWS` | Wrap to rows | Yes |
53
- | `TOCOL` | Convert to column | Yes |
54
- | `TOROW` | Convert to row | Yes |
55
-
56
- *XLOOKUP spills when returning multiple columns
57
-
58
- ### Spill Range Reference
59
- ```excel
60
- =A1# // Reference entire spill range from A1
61
- =ROWS(A1#) // Count rows in spill range
62
- =COLUMNS(A1#) // Count columns in spill range
63
- ```
64
-
65
- ---
66
-
67
- ## Best Practices
68
-
69
- ### 1. Use LET for Complex Formulas
70
- ```excel
71
- // BAD: Repeated calculations
72
- =IF(SUM(A:A)>1000, SUM(A:A)*0.1, SUM(A:A)*0.05)
73
-
74
- // GOOD: Calculate once with LET
75
- =LET(
76
- total, SUM(A:A),
77
- rate, IF(total > 1000, 0.1, 0.05),
78
- total * rate
79
- )
80
- ```
81
-
82
- ### 2. Use Structured References with Tables
83
- ```excel
84
- // BAD: Cell references
85
- =SUM(B2:B100)
86
-
87
- // GOOD: Table references (auto-expand)
88
- =SUM(tbl_Sales[Amount])
89
-
90
- // Specific row in current row
91
- =[@Amount] * [@Quantity]
92
-
93
- // Entire column except headers
94
- =AVERAGE(tbl_Sales[Price])
95
-
96
- // Headers only
97
- =tbl_Sales[[#Headers],[Amount]]
98
- ```
99
-
100
- ### 3. Error Handling
101
- ```excel
102
- // IFERROR - Catch all errors
103
- =IFERROR(A1/B1, 0)
104
-
105
- // IFNA - Only catch #N/A (better for lookups)
106
- =IFNA(XLOOKUP(A1, tbl_Products[ID], tbl_Products[Name]), "Not Found")
107
-
108
- // LET with error check
109
- =LET(
110
- result, XLOOKUP(A1, range1, range2),
111
- IF(ISNA(result), "Not Found", result)
112
- )
113
- ```
114
-
115
- ### 4. Avoid Volatile Functions
116
- ```excel
117
- // VOLATILE (recalculate always) - Use sparingly
118
- INDIRECT() // Avoid when possible
119
- OFFSET() // Use INDEX instead
120
- NOW() // Use sparingly
121
- TODAY() // OK for date comparisons
122
- RAND() // OK when randomness needed
123
- RANDARRAY() // OK when randomness needed
124
-
125
- // NON-VOLATILE alternatives
126
- OFFSET(A1,1,0) → INDEX(A:A, ROW(A1)+1)
127
- INDIRECT("A"&B1) → INDEX(A:A, B1)
128
- ```
129
-
130
- ---
131
-
132
- ## Common Patterns
133
-
134
- ### XLOOKUP (Modern Lookup)
135
- ```excel
136
- // Basic lookup
137
- =XLOOKUP(lookup_value, lookup_array, return_array)
138
-
139
- // With default if not found
140
- =XLOOKUP(A1, tbl_Products[ID], tbl_Products[Name], "Not Found")
141
-
142
- // Return multiple columns
143
- =XLOOKUP(A1, tbl_Products[ID], tbl_Products[[Name]:[Price]])
144
-
145
- // Approximate match (sorted data)
146
- =XLOOKUP(A1, tbl_Tax[Threshold], tbl_Tax[Rate], , 1)
147
-
148
- // Search from end (last match)
149
- =XLOOKUP(A1, tbl_Log[ID], tbl_Log[Date], , 0, -1)
150
-
151
- // Wildcard search
152
- =XLOOKUP("*"&A1&"*", tbl_Products[Name], tbl_Products[ID], , 2)
153
- ```
154
-
155
- ### FILTER Function
156
- ```excel
157
- // Basic filter
158
- =FILTER(tbl_Sales, tbl_Sales[Region]="North")
159
-
160
- // Multiple conditions (AND)
161
- =FILTER(tbl_Sales, (tbl_Sales[Region]="North") * (tbl_Sales[Amount]>1000))
162
-
163
- // Multiple conditions (OR)
164
- =FILTER(tbl_Sales, (tbl_Sales[Region]="North") + (tbl_Sales[Region]="South"))
165
-
166
- // With default if empty
167
- =FILTER(tbl_Sales, tbl_Sales[Amount]>10000, "No results")
168
-
169
- // Dynamic column selection
170
- =FILTER(CHOOSECOLS(tbl_Sales, 1, 3, 5), tbl_Sales[Status]="Active")
171
- ```
172
-
173
- ### SORT and SORTBY
174
- ```excel
175
- // Sort ascending
176
- =SORT(A1:C10, 2) // Sort by column 2
177
-
178
- // Sort descending
179
- =SORT(A1:C10, 2, -1)
180
-
181
- // Sort by multiple columns
182
- =SORT(A1:C10, {2,3}, {1,-1}) // Col 2 asc, then col 3 desc
183
-
184
- // Sort by external column
185
- =SORTBY(tbl_Products, tbl_Products[Sales], -1)
186
-
187
- // Sort by multiple external columns
188
- =SORTBY(data, col1, 1, col2, -1)
189
- ```
190
-
191
- ### UNIQUE Function
192
- ```excel
193
- // Unique values from column
194
- =UNIQUE(tbl_Sales[Region])
195
-
196
- // Unique rows from range
197
- =UNIQUE(A1:C10)
198
-
199
- // Unique values occurring exactly once
200
- =UNIQUE(tbl_Sales[Region], , TRUE)
201
-
202
- // Unique by column (horizontal)
203
- =UNIQUE(A1:E1, TRUE)
204
- ```
205
-
206
- ### LET with LAMBDA
207
- ```excel
208
- // Reusable calculation in formula
209
- =LET(
210
- data, tbl_Sales,
211
- filtered, FILTER(data, data[Year]=2024),
212
- total, SUM(INDEX(filtered, , 3)),
213
- count, ROWS(filtered),
214
- average, total / count,
215
- ROUND(average, 2)
216
- )
217
-
218
- // Named LAMBDA (Name Manager)
219
- // Name: CalculateBonus
220
- // Formula: =LAMBDA(sales, rate, IF(sales > 10000, sales * rate, 0))
221
- // Usage: =CalculateBonus(A1, 0.1)
222
- ```
223
-
224
- ### SEQUENCE Patterns
225
- ```excel
226
- // Numbers 1 to 10
227
- =SEQUENCE(10)
228
-
229
- // Numbers with start and step
230
- =SEQUENCE(10, 1, 100, 5) // 100, 105, 110...
231
-
232
- // Date sequence
233
- =SEQUENCE(12, 1, DATE(2024,1,1), 30) // Monthly dates
234
-
235
- // Grid of numbers
236
- =SEQUENCE(5, 3) // 5 rows × 3 columns
237
-
238
- // Row numbers for INDEX
239
- =INDEX(data, SEQUENCE(ROWS(data)), 1)
240
- ```
241
-
242
- ### Combining Dynamic Arrays
243
- ```excel
244
- // Filter, sort, and take top 10
245
- =TAKE(SORT(FILTER(tbl_Sales, tbl_Sales[Year]=2024), 3, -1), 10)
246
-
247
- // Unique sorted values
248
- =SORT(UNIQUE(tbl_Sales[Category]))
249
-
250
- // Stack multiple ranges
251
- =VSTACK(
252
- FILTER(tbl_2023, tbl_2023[Status]="Active"),
253
- FILTER(tbl_2024, tbl_2024[Status]="Active")
254
- )
255
-
256
- // Create summary with HSTACK
257
- =HSTACK(
258
- UNIQUE(tbl_Sales[Region]),
259
- SUMIFS(tbl_Sales[Amount], tbl_Sales[Region], UNIQUE(tbl_Sales[Region]))
260
- )
261
- ```
262
-
263
- ---
264
-
265
- ## Aggregation Functions
266
-
267
- ### SUMIFS / COUNTIFS / AVERAGEIFS
268
- ```excel
269
- // Single condition
270
- =SUMIFS(tbl_Sales[Amount], tbl_Sales[Region], "North")
271
-
272
- // Multiple conditions
273
- =SUMIFS(tbl_Sales[Amount],
274
- tbl_Sales[Region], "North",
275
- tbl_Sales[Year], 2024)
276
-
277
- // With operators
278
- =SUMIFS(tbl_Sales[Amount], tbl_Sales[Date], ">="&DATE(2024,1,1))
279
-
280
- // Wildcard
281
- =COUNTIFS(tbl_Products[Name], "*phone*")
282
-
283
- // Between dates
284
- =SUMIFS(tbl_Sales[Amount],
285
- tbl_Sales[Date], ">="&StartDate,
286
- tbl_Sales[Date], "<="&EndDate)
287
- ```
288
-
289
- ### MAXIFS / MINIFS
290
- ```excel
291
- // Max with condition
292
- =MAXIFS(tbl_Sales[Amount], tbl_Sales[Region], "North")
293
-
294
- // Min with multiple conditions
295
- =MINIFS(tbl_Sales[Price],
296
- tbl_Sales[Category], "Electronics",
297
- tbl_Sales[Stock], ">0")
298
- ```
299
-
300
- ---
301
-
302
- ## Text Functions
303
-
304
- ### TEXTSPLIT (Excel 365)
305
- ```excel
306
- // Split by delimiter
307
- =TEXTSPLIT(A1, ",") // Horizontal split
308
-
309
- // Split to rows
310
- =TEXTSPLIT(A1, , ",") // Vertical split
311
-
312
- // Split by multiple delimiters
313
- =TEXTSPLIT(A1, {",", ";", " "})
314
-
315
- // With row and column delimiters
316
- =TEXTSPLIT("a,b;c,d", ",", ";") // 2×2 array
317
- ```
318
-
319
- ### TEXTJOIN
320
- ```excel
321
- // Join with delimiter
322
- =TEXTJOIN(", ", TRUE, A1:A10) // TRUE = ignore empty
323
-
324
- // Join filtered results
325
- =TEXTJOIN(", ", TRUE, FILTER(tbl_Products[Name], tbl_Products[Category]="Books"))
326
- ```
327
-
328
- ### CONCAT / CONCATENATE
329
- ```excel
330
- // Modern: CONCAT (handles ranges)
331
- =CONCAT(A1:A10)
332
-
333
- // With formatting
334
- =TEXT(A1, "mm/dd/yyyy") & " - " & B1
335
- ```
336
-
337
- ---
338
-
339
- ## Date Functions
340
-
341
- ### Common Date Calculations
342
- ```excel
343
- // Age in years
344
- =DATEDIF(BirthDate, TODAY(), "Y")
345
-
346
- // Working days between dates
347
- =NETWORKDAYS(StartDate, EndDate)
348
- =NETWORKDAYS.INTL(StartDate, EndDate, "0000011") // Custom weekend
349
-
350
- // Add months
351
- =EDATE(A1, 3) // Add 3 months
352
-
353
- // End of month
354
- =EOMONTH(A1, 0) // End of current month
355
- =EOMONTH(A1, 1) // End of next month
356
-
357
- // Start of month
358
- =EOMONTH(A1, -1) + 1
359
-
360
- // Quarter
361
- =ROUNDUP(MONTH(A1)/3, 0)
362
-
363
- // Fiscal year (starting April)
364
- =YEAR(A1) + IF(MONTH(A1) >= 4, 0, -1)
365
-
366
- // Week number (ISO)
367
- =ISOWEEKNUM(A1)
368
- ```
369
-
370
- ---
371
-
372
- ## Anti-Patterns
373
-
374
- ### 1. Nested IFs (Use IFS or SWITCH)
375
- ```excel
376
- // BAD: Nested IFs
377
- =IF(A1="A", 1, IF(A1="B", 2, IF(A1="C", 3, 0)))
378
-
379
- // GOOD: IFS
380
- =IFS(A1="A", 1, A1="B", 2, A1="C", 3, TRUE, 0)
381
-
382
- // GOOD: SWITCH
383
- =SWITCH(A1, "A", 1, "B", 2, "C", 3, 0)
384
- ```
385
-
386
- ### 2. VLOOKUP Limitations
387
- ```excel
388
- // BAD: VLOOKUP (fragile column index)
389
- =VLOOKUP(A1, B:E, 3, FALSE)
390
-
391
- // GOOD: XLOOKUP (explicit return column)
392
- =XLOOKUP(A1, B:B, D:D)
393
-
394
- // GOOD: INDEX/MATCH (flexible)
395
- =INDEX(D:D, MATCH(A1, B:B, 0))
396
- ```
397
-
398
- ### 3. Entire Column References in Tables
399
- ```excel
400
- // BAD: Can cause performance issues
401
- =SUMIF(A:A, "Criteria", B:B)
402
-
403
- // GOOD: Use table references
404
- =SUMIF(tbl_Data[Category], "Criteria", tbl_Data[Amount])
405
-
406
- // GOOD: Use explicit ranges
407
- =SUMIF(A1:A10000, "Criteria", B1:B10000)
408
- ```
409
-
410
- ### 4. Hardcoded Values
411
- ```excel
412
- // BAD: Hardcoded
413
- =A1 * 0.21
414
-
415
- // GOOD: Named range
416
- =A1 * TaxRate
417
-
418
- // GOOD: Cell reference with label
419
- =A1 * $B$1 // Where B1 contains tax rate
420
- ```
421
-
422
- ---
423
-
424
- ## Performance Tips
425
-
426
- 1. **Use Tables** - Auto-expand, structured references, better performance
427
- 2. **Avoid Volatile Functions** - INDIRECT, OFFSET slow down workbooks
428
- 3. **Use Helper Columns** - Break complex formulas into steps
429
- 4. **Limit Array Size** - Large spill ranges impact performance
430
- 5. **Use XLOOKUP over VLOOKUP** - More efficient, clearer syntax
431
- 6. **Filter Before Aggregate** - Reduce data before calculations
432
-
433
- ---
434
-
435
- ## Complexity Adaptation
436
-
437
- Adjust depth based on `config.json → experienceLevel`:
438
- - **beginner**: Step-by-step with explanations, reference library examples
439
- - **intermediate**: Standard depth, explain non-obvious decisions
440
- - **advanced**: Concise, skip basics, focus on edge cases and optimization
441
-
442
- ## Related Skills
443
-
444
- - `/fast-standard` — FAST spreadsheet modeling standard
445
- - `/data-quality` — Validate Excel data
446
-
447
- ---
448
-
449
- ## Related Resources
450
-
451
- - [Snippets: Lookups](../../snippets/excel-formulas/lookups.md)
452
- - [Snippets: Dynamic Arrays](../../snippets/excel-formulas/dynamic-arrays.md)
453
- - [Snippets: Aggregations](../../snippets/excel-formulas/aggregations.md)
454
- - [Snippets: Dates and Times](../../snippets/excel-formulas/dates-and-times.md)
455
- - [Snippets: Text Functions](../../snippets/excel-formulas/text-functions.md)