@luquimbo/bi-superpowers 3.2.0 → 4.1.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 (91) hide show
  1. package/.claude-plugin/marketplace.json +5 -3
  2. package/.claude-plugin/plugin.json +28 -2
  3. package/.claude-plugin/skill-manifest.json +22 -6
  4. package/.plugin/plugin.json +1 -1
  5. package/AGENTS.md +53 -36
  6. package/CHANGELOG.md +310 -0
  7. package/README.md +77 -26
  8. package/bin/build-plugin.js +11 -4
  9. package/bin/cli.js +113 -16
  10. package/bin/commands/build-desktop.js +35 -16
  11. package/bin/commands/diff.js +31 -13
  12. package/bin/commands/install.js +7 -3
  13. package/bin/commands/lint.js +40 -26
  14. package/bin/commands/mcp-setup.js +3 -10
  15. package/bin/commands/update-check.js +403 -0
  16. package/bin/lib/generators/claude-plugin.js +162 -6
  17. package/bin/lib/generators/shared.js +29 -33
  18. package/bin/lib/mcp-config.js +168 -12
  19. package/bin/lib/skills.js +115 -27
  20. package/bin/postinstall.js +4 -2
  21. package/bin/utils/mcp-detect.js +2 -2
  22. package/commands/bi-start.md +197 -0
  23. package/commands/pbi-connect.md +43 -65
  24. package/commands/project-kickoff.md +393 -673
  25. package/commands/report-design.md +403 -0
  26. package/desktop-extension/manifest.json +3 -3
  27. package/package.json +7 -5
  28. package/skills/bi-start/SKILL.md +199 -0
  29. package/skills/bi-start/scripts/update-check.js +403 -0
  30. package/skills/pbi-connect/SKILL.md +45 -67
  31. package/skills/pbi-connect/scripts/update-check.js +403 -0
  32. package/skills/project-kickoff/SKILL.md +395 -675
  33. package/skills/project-kickoff/scripts/update-check.js +403 -0
  34. package/skills/report-design/SKILL.md +405 -0
  35. package/skills/report-design/references/cli-commands.md +184 -0
  36. package/skills/report-design/references/cli-setup.md +101 -0
  37. package/skills/report-design/references/close-write-open-pattern.md +80 -0
  38. package/skills/report-design/references/layouts/finance.md +65 -0
  39. package/skills/report-design/references/layouts/generic.md +46 -0
  40. package/skills/report-design/references/layouts/hr.md +48 -0
  41. package/skills/report-design/references/layouts/marketing.md +45 -0
  42. package/skills/report-design/references/layouts/operations.md +44 -0
  43. package/skills/report-design/references/layouts/sales.md +50 -0
  44. package/skills/report-design/references/native-visuals.md +341 -0
  45. package/skills/report-design/references/pbi-desktop-installation.md +87 -0
  46. package/skills/report-design/references/pbir-preview-activation.md +40 -0
  47. package/skills/report-design/references/slicer.md +89 -0
  48. package/skills/report-design/references/textbox.md +101 -0
  49. package/skills/report-design/references/themes/BISuperpowers.json +915 -0
  50. package/skills/report-design/references/troubleshooting.md +135 -0
  51. package/skills/report-design/references/visual-types.md +78 -0
  52. package/skills/report-design/scripts/apply-theme.js +243 -0
  53. package/skills/report-design/scripts/create-visual.js +878 -0
  54. package/skills/report-design/scripts/ensure-pbi-cli.sh +41 -0
  55. package/skills/report-design/scripts/update-check.js +403 -0
  56. package/skills/report-design/scripts/validate-pbir.js +322 -0
  57. package/src/content/base.md +12 -68
  58. package/src/content/mcp-requirements.json +0 -25
  59. package/src/content/routing.md +19 -74
  60. package/src/content/skills/bi-start.md +191 -0
  61. package/src/content/skills/pbi-connect.md +22 -65
  62. package/src/content/skills/project-kickoff.md +372 -673
  63. package/src/content/skills/report-design/SKILL.md +376 -0
  64. package/src/content/skills/report-design/references/cli-commands.md +184 -0
  65. package/src/content/skills/report-design/references/cli-setup.md +101 -0
  66. package/src/content/skills/report-design/references/close-write-open-pattern.md +80 -0
  67. package/src/content/skills/report-design/references/layouts/finance.md +65 -0
  68. package/src/content/skills/report-design/references/layouts/generic.md +46 -0
  69. package/src/content/skills/report-design/references/layouts/hr.md +48 -0
  70. package/src/content/skills/report-design/references/layouts/marketing.md +45 -0
  71. package/src/content/skills/report-design/references/layouts/operations.md +44 -0
  72. package/src/content/skills/report-design/references/layouts/sales.md +50 -0
  73. package/src/content/skills/report-design/references/native-visuals.md +341 -0
  74. package/src/content/skills/report-design/references/pbi-desktop-installation.md +87 -0
  75. package/src/content/skills/report-design/references/pbir-preview-activation.md +40 -0
  76. package/src/content/skills/report-design/references/slicer.md +89 -0
  77. package/src/content/skills/report-design/references/textbox.md +101 -0
  78. package/src/content/skills/report-design/references/themes/BISuperpowers.json +915 -0
  79. package/src/content/skills/report-design/references/troubleshooting.md +135 -0
  80. package/src/content/skills/report-design/references/visual-types.md +78 -0
  81. package/src/content/skills/report-design/scripts/apply-theme.js +243 -0
  82. package/src/content/skills/report-design/scripts/create-visual.js +878 -0
  83. package/src/content/skills/report-design/scripts/ensure-pbi-cli.sh +41 -0
  84. package/src/content/skills/report-design/scripts/validate-pbir.js +322 -0
  85. package/bin/commands/install.test.js +0 -289
  86. package/bin/commands/lint.test.js +0 -103
  87. package/bin/lib/generators/claude-plugin.test.js +0 -111
  88. package/bin/lib/mcp-config.test.js +0 -310
  89. package/bin/lib/microsoft-mcp.test.js +0 -115
  90. package/bin/utils/mcp-detect.test.js +0 -81
  91. package/bin/utils/tui.test.js +0 -127
package/bin/lib/skills.js CHANGED
@@ -5,6 +5,19 @@
5
5
  * Centralizes how BI Agent Superpowers loads skill source files from
6
6
  * the installed npm package. Everything ships with the package.
7
7
  *
8
+ * Two skill layouts are supported:
9
+ *
10
+ * 1. Flat markdown: src/content/skills/{name}.md
11
+ * Simple skills that fit in a single file. No references/scripts.
12
+ *
13
+ * 2. Folder-based: src/content/skills/{name}/SKILL.md
14
+ * src/content/skills/{name}/references/*.md
15
+ * src/content/skills/{name}/scripts/*
16
+ * Follows Anthropic's skills convention — SKILL.md is the thin
17
+ * entrypoint, `references/` holds on-demand detail that the agent
18
+ * can load when it needs more schema/examples, and `scripts/` holds
19
+ * deterministic helpers the agent can shell out to.
20
+ *
8
21
  * @module lib/skills
9
22
  */
10
23
 
@@ -12,46 +25,98 @@ const fs = require('fs');
12
25
  const path = require('path');
13
26
 
14
27
  /**
15
- * Read all markdown skills from a directory.
28
+ * Load a single flat markdown skill file.
29
+ * @param {string} filePath - Absolute path to the .md file
30
+ * @returns {{name: string, path: string, content: string, bundleDir: null}|null}
31
+ */
32
+ function loadFlatSkill(filePath) {
33
+ try {
34
+ return {
35
+ name: path.basename(filePath).replace(/\.md$/, ''),
36
+ path: filePath,
37
+ content: fs.readFileSync(filePath, 'utf8'),
38
+ bundleDir: null,
39
+ };
40
+ } catch (err) {
41
+ console.warn(`⚠ No pude leer el skill ${filePath}: ${err.message}`);
42
+ return null;
43
+ }
44
+ }
45
+
46
+ /**
47
+ * Load a folder-based skill. Expects `{folder}/SKILL.md` to exist.
48
+ * Returns null if the folder does not contain a SKILL.md.
16
49
  *
17
- * Robusto a fallos de filesystem:
18
- * - Si el directorio no existe retorna []
19
- * - Si no se puede leer (permisos) → imprime warning y retorna []
20
- * - Si un archivo individual no se puede leer → warning y se omite
50
+ * @param {string} folderPath - Absolute path to the skill folder
51
+ * @returns {{name: string, path: string, content: string, bundleDir: string}|null}
52
+ */
53
+ function loadFolderSkill(folderPath) {
54
+ const skillMd = path.join(folderPath, 'SKILL.md');
55
+ if (!fs.existsSync(skillMd)) {
56
+ return null;
57
+ }
58
+ try {
59
+ return {
60
+ name: path.basename(folderPath),
61
+ path: skillMd,
62
+ content: fs.readFileSync(skillMd, 'utf8'),
63
+ bundleDir: folderPath,
64
+ };
65
+ } catch (err) {
66
+ console.warn(`⚠ No pude leer el skill ${skillMd}: ${err.message}`);
67
+ return null;
68
+ }
69
+ }
70
+
71
+ /**
72
+ * Read all skills from a directory. Each entry can be either a flat
73
+ * .md file OR a subfolder containing a SKILL.md.
74
+ *
75
+ * Robust against filesystem failures:
76
+ * - Non-existent directory → []
77
+ * - Unreadable directory → warning + []
78
+ * - Individual unreadable entry → warning + skip
21
79
  *
22
- * @param {string} directory - Directory containing skill markdown files
23
- * @returns {Array<{name: string, path: string, content: string}>}
80
+ * @param {string} directory - Directory containing skill sources
81
+ * @returns {Array<{name: string, path: string, content: string, bundleDir: string|null}>}
24
82
  */
25
83
  function readSkillDirectory(directory) {
26
84
  if (!directory || !fs.existsSync(directory)) {
27
85
  return [];
28
86
  }
29
87
 
30
- let files;
88
+ let entries;
31
89
  try {
32
- files = fs.readdirSync(directory);
90
+ entries = fs.readdirSync(directory, { withFileTypes: true });
33
91
  } catch (err) {
34
92
  console.warn(`⚠ No pude leer el directorio de skills ${directory}: ${err.message}`);
35
93
  return [];
36
94
  }
37
95
 
38
- return files
39
- .filter((file) => file.endsWith('.md'))
40
- .sort()
41
- .map((file) => {
42
- const filePath = path.join(directory, file);
43
- try {
44
- return {
45
- name: file.replace(/\.md$/, ''),
46
- path: filePath,
47
- content: fs.readFileSync(filePath, 'utf8'),
48
- };
49
- } catch (err) {
50
- console.warn(`⚠ No pude leer el skill ${filePath}: ${err.message}`);
51
- return null;
52
- }
53
- })
54
- .filter(Boolean);
96
+ const skills = [];
97
+
98
+ // Sort by name for deterministic output across platforms.
99
+ entries.sort((a, b) => a.name.localeCompare(b.name));
100
+
101
+ for (const entry of entries) {
102
+ const entryPath = path.join(directory, entry.name);
103
+
104
+ if (entry.isFile() && entry.name.endsWith('.md')) {
105
+ const skill = loadFlatSkill(entryPath);
106
+ if (skill) skills.push(skill);
107
+ continue;
108
+ }
109
+
110
+ if (entry.isDirectory()) {
111
+ const skill = loadFolderSkill(entryPath);
112
+ if (skill) skills.push(skill);
113
+ continue;
114
+ }
115
+
116
+ // Ignore other entry types (symlinks to nowhere, non-md files).
117
+ }
118
+
119
+ return skills;
55
120
  }
56
121
 
57
122
  /**
@@ -59,7 +124,7 @@ function readSkillDirectory(directory) {
59
124
  *
60
125
  * @param {Object} options - Resolution options
61
126
  * @param {string} options.packageDir - Package installation directory
62
- * @returns {Array<{name: string, path: string, content: string}>}
127
+ * @returns {Array<{name: string, path: string, content: string, bundleDir: string|null}>}
63
128
  */
64
129
  function loadSkills(options = {}) {
65
130
  const { packageDir } = options;
@@ -70,7 +135,30 @@ function loadSkills(options = {}) {
70
135
  return readSkillDirectory(skillsDir);
71
136
  }
72
137
 
138
+ /**
139
+ * Normalize any user-facing skill identifier into its canonical name.
140
+ *
141
+ * Accepts `dax`, `dax.md`, `report-design`, `report-design/SKILL.md`,
142
+ * or `report-design\SKILL.md` (Windows separator) and returns the
143
+ * canonical skill name used as the key in readSkillDirectory's
144
+ * output map (`dax`, `report-design`).
145
+ *
146
+ * Uses a single alternation regex so the longer suffix `/SKILL.md`
147
+ * is tried BEFORE the bare `.md`. Earlier callers chained two
148
+ * `.replace()` calls and stripped `.md` first, which meant the
149
+ * `/SKILL.md` alternative never matched — `report-design/SKILL.md`
150
+ * came out as `report-design/SKILL` and the lookup failed.
151
+ *
152
+ * @param {string} input - User-supplied skill identifier
153
+ * @returns {string} Canonical skill name
154
+ */
155
+ function normalizeSkillName(input) {
156
+ if (typeof input !== 'string') return input;
157
+ return input.replace(/([/\\]SKILL\.md|\.md)$/, '');
158
+ }
159
+
73
160
  module.exports = {
74
161
  readSkillDirectory,
75
162
  loadSkills,
163
+ normalizeSkillName,
76
164
  };
@@ -29,9 +29,11 @@ Funciona con los 5 agentes:
29
29
  • Gemini CLI
30
30
  • Kilo Code
31
31
 
32
- 2 skills iniciales:
33
- /project-kickoff Analizá tu proyecto BI
32
+ 4 skills iniciales:
33
+ /bi-start Arrancar una sesión (menú + update + conexión)
34
+ /project-kickoff — Analizá tu proyecto BI (proyecto nuevo)
34
35
  /pbi-connect — Conectá tu agente a Power BI Desktop
36
+ /report-design — Generá reportes PBIR para Power BI Desktop (Windows)
35
37
 
36
38
  2 MCP servers:
37
39
  powerbi-modeling — Conexión local a Power BI Desktop (XMLA)
@@ -3,7 +3,7 @@
3
3
  * =================================================
4
4
  *
5
5
  * Detects installed MCP servers (Microsoft Power BI Modeling MCP).
6
- * Supports both local (VS Code extension) and remote (Fabric) MCPs.
6
+ * Covers the local (Windows) VS Code/Cursor extension install path.
7
7
  *
8
8
  * @module utils/mcp-detect
9
9
  */
@@ -205,7 +205,7 @@ function getInstallInstructions() {
205
205
  ],
206
206
  note:
207
207
  os.platform() !== 'win32'
208
- ? 'El MCP local solo está disponible en Windows. Puedes usar el MCP Remoto de Fabric en Mac/Linux.'
208
+ ? 'El MCP local solo está disponible en Windows. En Mac/Linux tenés microsoft-learn para docs oficiales.'
209
209
  : null,
210
210
  };
211
211
  }
@@ -0,0 +1,197 @@
1
+ ---
2
+ description: "Session opener — environment snapshot, update check, and routing to other skills"
3
+ ---
4
+
5
+ <!-- Generated by BI Agent Superpowers. Edit src/content/skills/bi-start.md instead. -->
6
+
7
+ # BI Start Skill
8
+
9
+ ## Trigger
10
+ Activate this skill when the user mentions:
11
+ - "bi-start", "bi start", "/bi-start"
12
+ - "empezar", "comenzar", "arranco", "arrancar"
13
+ - "get started", "start session", "new session"
14
+ - "qué puedo hacer", "what can I do", "qué hago", "what's here"
15
+ - "ayuda bi", "bi help", "help me start", "orientame"
16
+ - "mostrame los skills", "show me what you can do", "lista los comandos"
17
+
18
+ Also activate:
19
+ - At the start of any fresh conversation when the user hasn't yet picked a skill.
20
+ - When the user seems lost about which skill to invoke (e.g. says "no sé qué usar").
21
+
22
+ ## Identity
23
+ You are **BI Session Orchestrator**. Your job is to welcome the user at the start of a chat session, show them the available skills, check for updates, and — if Power BI Desktop is involved — offer to connect right away. You are **not** a project analyst (that's `/project-kickoff`), **not** a connection specialist (that's `/pbi-connect`), and **not** a report author (that's `/report-design`). You are the front desk.
24
+
25
+ You are the session-opener, **not** the project-opener. If the user's intent is clearly "I'm creating a brand-new BI project from scratch", delegate to `/project-kickoff`. Otherwise, this skill is the right home for general-purpose entry, discovery, environment checks, and pointing the user at the right specialist.
26
+
27
+ ## MANDATORY RULES
28
+
29
+ 1. **ONE QUESTION AT A TIME.** Only ask when you need a decision from the user (update yes/no, connect yes/no). Never stack multiple questions.
30
+ 2. **INFORMATIVE MENU — DON'T FORCE A CHOICE.** You are already inside `/bi-start`. Show the **3 specialist skills** as a table with 1-line descriptions. The user decides organically either by invoking `/<skill>` or by describing what they want. Do NOT say "pick 1, 2, or 3" — that's quiz-style and annoying for returning users.
31
+ 3. **PROACTIVE ON UPDATE + CONNECT.** When you detect (a) an available update or (b) Power BI Desktop running without a configured MCP, **ask once** and then dispatch the action yourself. Don't force the user to remember the exact command.
32
+ 4. **SAFE DEFAULTS ON SAY-NOTHING.** If the user greets you and then goes silent, show the menu and stop. Don't auto-dispatch anything without an explicit "sí" / "yes".
33
+ 5. **OS-AWARE, NOT OS-GATING.** Works on any OS. Mark Windows-only skills clearly. On macOS/Linux, `/project-kickoff` still has partial value (writes `AGENTS.md` and stops); mention that honestly instead of refusing.
34
+ 6. **DELEGATE CLEANLY.** When dispatching to another skill, say "dispatching /X" so the user sees the hand-off, then stop being the orchestrator for this turn. If they come back with "estoy en X, ahora qué", you can re-orient.
35
+
36
+ ---
37
+
38
+ ## PHASE 0: Update check (proactive)
39
+
40
+ Run the update check at the very start:
41
+
42
+ ```bash
43
+ node "{skillBundleDir}/scripts/update-check.js" --silent-if-snoozed
44
+ ```
45
+
46
+ Interpret the single-line output:
47
+
48
+ - **`UPTODATE`** — silent, continue to PHASE 1.
49
+ - **`UPDATE_AVAILABLE <installed> <latest>`** — say:
50
+ > _"Hay **bi-superpowers v{latest}** disponible (estás en v{installed}). ¿Lo actualizo ahora? (`sí` / `no`)"_
51
+
52
+ On `sí` / `yes`:
53
+ - If the user installed via Claude Code marketplace, dispatch: _"Corré `/plugin update bi-superpowers` en Claude Code — eso hace el update nativo sin pasar por npm."_ (you can't execute `/plugin` yourself).
54
+ - Otherwise, run `super upgrade` in the shell:
55
+ ```bash
56
+ super upgrade
57
+ ```
58
+ After it finishes, remind: _"Corré `super install --yes` cuando puedas para propagar las skills nuevas a tus agentes."_
59
+
60
+ On `no` — respect it, continue to PHASE 1 silently. The update-state.json already tracks the user's snooze per `update-check.js` semantics.
61
+
62
+ - **`SNOOZED <iso>`** — silent, continue.
63
+
64
+ - **Command failed / no output** — silent, continue. The update check must never block this skill.
65
+
66
+ ---
67
+
68
+ ## PHASE 1: Environment snapshot
69
+
70
+ Do these detections in order:
71
+
72
+ 1. **OS**: `process.platform` via a short shell command:
73
+ ```bash
74
+ node -e "console.log(process.platform)"
75
+ ```
76
+ - `win32` → full workflow available.
77
+ - `darwin` / `linux` → limited (report-design + local Modeling MCP don't work).
78
+
79
+ 2. **Project context** (CWD-based):
80
+ - `./pbip-files/*.pbip` present? → `$hasPbip = true`.
81
+ - `./AGENTS.md` present? → `$hasAgentsMd = true`.
82
+
83
+ 3. **Power BI Desktop running** (Windows only):
84
+ ```bash
85
+ tasklist /FI "IMAGENAME eq PBIDesktop.exe" 2>&1 | findstr /I "PBIDesktop.exe"
86
+ ```
87
+ (or equivalent). `$pbiDesktopRunning = true` if present.
88
+
89
+ 4. **MCP configured**: look for `.mcp.json` in project root OR `powerbi-modeling-mcp` entry in the agent's config file (`~/.claude.json`, `~/.codex/config.toml`, etc). Keep the check shallow — no need to deep-diff.
90
+
91
+ ### Emit the context in 3-4 lines max
92
+
93
+ Example on Windows, full setup:
94
+
95
+ ```
96
+ 📍 Windows · .pbip detectado en ./pbip-files/MyProj.pbip (con AGENTS.md)
97
+ PBI Desktop: corriendo · MCP: configurado
98
+ ```
99
+
100
+ Example on macOS:
101
+
102
+ ```
103
+ 📍 macOS · sin .pbip en CWD
104
+ Power BI Desktop no corre en macOS — los skills que requieren Desktop quedan limitados.
105
+ ```
106
+
107
+ Keep it 3-4 lines. The point is situational awareness, not a status page.
108
+
109
+ ---
110
+
111
+ ## PHASE 2: Skills menu (informativo)
112
+
113
+ Remind the user that `/bi-start` is the session opener, then show the **3 specialist skills** as a table. Plain, no prompt. Do NOT number them or ask "which one?".
114
+
115
+ ```
116
+ Ya estás en `/bi-start` (session opener). Los 3 specialist skills disponibles son:
117
+
118
+ /project-kickoff Arrancar un proyecto BI nuevo (crea AGENTS.md, plantea modelo) · Win / Mac / Linux (parcial fuera de Win)
119
+ /pbi-connect Conectar el agente a Power BI Desktop vía MCP · Windows
120
+ /report-design Generar las páginas PBIR desde el modelo · Windows + PBI Desktop
121
+
122
+ Invocá el que necesites con /<nombre>, o decime en lenguaje natural lo que querés
123
+ hacer (ej: "crear reportes", "conectar Power BI", "arranco proyecto nuevo") y te ruteo.
124
+ ```
125
+
126
+ If the user is on macOS/Linux and says they want `/report-design` or `/pbi-connect`, remind them once: _"Ese skill requiere Windows + PBI Desktop. Para este proyecto, podés arrancar con `/project-kickoff` — escribe `AGENTS.md` con el scope y cuando tengas acceso a una máquina Windows retomás los otros dos."_
127
+
128
+ ---
129
+
130
+ ## PHASE 3: Proactive connect (if applicable)
131
+
132
+ Skip this phase entirely if `$pbiDesktopRunning === false && $hasPbip === false`.
133
+
134
+ Three cases:
135
+
136
+ **Case A — PBI Desktop running + MCP configured**:
137
+ Don't ask, just confirm:
138
+ > _"✓ Power BI Desktop está abierto y el MCP está conectado. Listo para cualquier skill que necesite el modelo."_
139
+
140
+ Continue to PHASE 4.
141
+
142
+ **Case B — PBI Desktop running + MCP NOT configured** (Windows only):
143
+ Offer once:
144
+ > _"Power BI Desktop está abierto pero todavía no conectaste el agente al MCP. ¿Corro `/pbi-connect`? (`sí` / `no`)"_
145
+
146
+ - `sí` → dispatch `/pbi-connect` cleanly. Say "dispatching /pbi-connect" and stop being the orchestrator for this turn.
147
+ - `no` → continue to PHASE 4 silently.
148
+
149
+ **Case C — PBI Desktop NOT running + `.pbip` exists in CWD** (Windows only):
150
+ Offer once:
151
+ > _"No veo Power BI Desktop abierto. Para conectar el agente al modelo necesitás abrir el .pbip. ¿Lo abro yo y corro `/pbi-connect`? (`sí` / `no`)"_
152
+
153
+ - `sí`:
154
+ 1. Launch Desktop with the project's .pbip (use the standalone path per `/report-design` PHASE 5 launch pattern — see `references/pbi-desktop-installation.md` in `/report-design`):
155
+ ```bash
156
+ powershell -Command "Start-Process -FilePath 'C:\Program Files\Microsoft Power BI Desktop\bin\PBIDesktop.exe' -ArgumentList '\"<absolute-path-to.pbip>\"'"
157
+ ```
158
+ 2. Wait ~15-20 seconds for Desktop to finish loading.
159
+ 3. Dispatch `/pbi-connect`.
160
+
161
+ - `no` → continue to PHASE 4.
162
+
163
+ On macOS/Linux, skip Case B and Case C — mention once:
164
+ > _"PBI Desktop no corre fuera de Windows. El Modeling MCP queda solo disponible en una máquina Windows. `/project-kickoff` sí funciona parcialmente acá (escribe `AGENTS.md` y para)."_
165
+
166
+ ---
167
+
168
+ ## PHASE 4: Stand by
169
+
170
+ If you got here without dispatching, close with:
171
+
172
+ > _"Listo — invocá el specialist skill que necesites, o pedime ayuda específica sobre cualquiera de esos 3. Si abrís una sesión nueva mañana, `/bi-start` te orienta de nuevo."_
173
+
174
+ Stop. Don't hover. The user will tell you what they want next.
175
+
176
+ ---
177
+
178
+ ## What this skill does NOT do
179
+
180
+ - **Project analysis or setup**: that's `/project-kickoff`. If the user says "analizar mi proyecto", "armar el modelo base", "arrancar uno nuevo desde cero", delegate.
181
+ - **MCP wiring details**: that's `/pbi-connect`. bi-start just offers to dispatch it; the actual configuration work is in that skill.
182
+ - **Report authoring**: that's `/report-design`. Same pattern.
183
+ - **Running the update**: bi-start offers + dispatches `super upgrade`; the actual npm install + subsequent `super install --yes` chain is owned by `/bin/cli.js`.
184
+
185
+ ## Related Skills
186
+
187
+ - `/project-kickoff` — when it's a brand-new project that needs `AGENTS.md` + model scaffolding.
188
+ - `/pbi-connect` — when you need the agent talking to PBI Desktop via MCP.
189
+ - `/report-design` — when you're generating report pages via the bundled Node scripts.
190
+
191
+ ## Bundle contents
192
+
193
+ - `scripts/update-check.js` — the update-check helper invoked in PHASE 0. Same helper that every skill's preamble uses.
194
+
195
+ ---
196
+
197
+ _Session orchestrator — welcome, update, route._
@@ -4,22 +4,43 @@ description: "Power BI Desktop connection"
4
4
 
5
5
  <!-- Generated by BI Agent Superpowers. Edit src/content/skills/pbi-connect.md instead. -->
6
6
 
7
+ <!-- bi-superpowers update-check preamble (auto-generated, do not edit) -->
8
+ ## ⬆ Update check
9
+
10
+ Before handling the user's request below, run this command **once per conversation** and interpret the output:
11
+
12
+ ```bash
13
+ node "{skillBundleDir}/scripts/update-check.js" --silent-if-uptodate --silent-if-snoozed
14
+ ```
15
+
16
+ - Empty output or `UPTODATE` — proceed with the skill silently. No message.
17
+ - `UPDATE_AVAILABLE <installed> <latest>` — tell the user exactly once this conversation, before diving into the skill:
18
+ > "Hay **bi-superpowers v{latest}** disponible (estás en v{installed}). Actualizá con `super upgrade` (o `/plugin update bi-superpowers` en Claude Code) cuando te venga bien."
19
+
20
+ Then continue with the skill below.
21
+ - `SNOOZED <iso>` — proceed silently.
22
+
23
+ If the command fails (missing binary, permissions, offline), ignore the error and proceed with the skill. The update check must never block the user's request.
24
+
25
+ ---
26
+ <!-- /bi-superpowers update-check preamble -->
27
+
7
28
  # Power BI MCP Connection Skill
8
29
 
9
30
  ## Trigger
10
31
  Activate this skill when user mentions:
11
32
  - "connect Power BI", "PBI connection", "MCP connection", "Power BI MCP"
12
- - "modeling mcp", "remote mcp", "fabric mcp"
13
- - "Power BI Desktop", "PBIP", "semantic model", "Fabric workspace"
14
- - "conectar Power BI", "MCP de Power BI", "Fabric MCP"
33
+ - "modeling mcp", "Power BI Modeling MCP"
34
+ - "Power BI Desktop", "PBIP", "semantic model"
35
+ - "conectar Power BI", "MCP de Power BI", "modeling mcp"
15
36
  - "can't connect to Power BI", "connection error", "MCP not working"
16
37
 
17
38
  ## Identity
18
- You are a **Power BI MCP Connection Specialist**. Your job is to help the user connect Claude Code to Power BI and Fabric using the official Microsoft MCP servers, with a plugin-first workflow.
39
+ You are a **Power BI MCP Connection Specialist**. Your job is to help the user connect their AI agent to Power BI Desktop using the official Microsoft MCP servers shipped with bi-superpowers, with a plugin-first workflow.
19
40
 
20
41
  ## MANDATORY RULES
21
42
  1. **PLUGIN-FIRST.** Prefer `.mcp.json` in the Claude Code plugin root.
22
- 2. **OFFICIAL SERVERS ONLY.** Recommend `powerbi-remote`, `fabric-mcp-server`, and `powerbi-modeling-mcp`.
43
+ 2. **OFFICIAL SERVERS ONLY.** Use `powerbi-modeling-mcp` (local) and `microsoft-learn` (HTTP). Do not invent or recommend unofficial MCPs.
23
44
  3. **WINDOWS LIMITATION.** Explain clearly that the local Modeling MCP is only available on Windows.
24
45
  4. **NO PORT INVENTION.** Do not suggest local port-based setups for the official Modeling MCP flow.
25
46
  5. **ONE QUESTION AT A TIME.** Follow the wizard pattern.
@@ -34,13 +55,12 @@ Start with:
34
55
  POWER BI MCP CONNECTION
35
56
  =======================
36
57
 
37
- I'll help you connect Claude Code using the official Microsoft MCP servers.
58
+ I'll help you connect your AI agent using the official Microsoft MCP servers.
38
59
 
39
60
  What do you need?
40
61
 
41
- 1. Connect to Power BI Desktop / PBIP on this machine
42
- 2. Connect to a remote Power BI or Fabric workspace
43
- 3. Verify that my plugin `.mcp.json` is configured correctly
62
+ 1. Connect to Power BI Desktop on this machine (Windows)
63
+ 2. Verify that my plugin `.mcp.json` is configured correctly
44
64
  ```
45
65
 
46
66
  ---
@@ -81,19 +101,14 @@ If the user wants a config example, show:
81
101
 
82
102
  ```json
83
103
  {
84
- "powerbi-remote": {
85
- "type": "http",
86
- "url": "https://api.fabric.microsoft.com/v1/mcp/powerbi"
87
- },
88
- "fabric-mcp-server": {
89
- "type": "stdio",
90
- "command": "npx",
91
- "args": ["-y", "@microsoft/fabric-mcp@latest", "server", "start", "--mode", "all"]
92
- },
93
104
  "powerbi-modeling-mcp": {
94
105
  "type": "stdio",
95
106
  "command": "node",
96
107
  "args": ["${CLAUDE_PLUGIN_ROOT}/bin/mcp/powerbi-modeling-launcher.js"]
108
+ },
109
+ "microsoft-learn": {
110
+ "type": "http",
111
+ "url": "https://learn.microsoft.com/api/mcp"
97
112
  }
98
113
  }
99
114
  ```
@@ -118,51 +133,18 @@ Say:
118
133
 
119
134
  ```text
120
135
  The official local Power BI Modeling MCP is only available on Windows.
121
- You can still work with:
122
-
123
- - powerbi-remote
124
- - fabric-mcp-server
125
136
 
126
- If you need local Desktop editing, you'll need a Windows environment.
137
+ You still have `microsoft-learn` (HTTP) available on every platform for
138
+ docs, and you can work with Power BI files using the skills library.
139
+ For live editing of a local semantic model, you need a Windows environment.
127
140
  ```
128
141
 
129
142
  ---
130
143
 
131
- ## PHASE 2: Remote Power BI / Fabric
144
+ ## PHASE 2: Verify Plugin Config
132
145
 
133
146
  If the user chooses option 2:
134
147
 
135
- ```text
136
- REMOTE / FABRIC MCP
137
- ===================
138
-
139
- This path uses the Microsoft-hosted and Microsoft-published MCP servers.
140
-
141
- Default servers:
142
- - powerbi-remote
143
- - fabric-mcp-server
144
- ```
145
-
146
- Guide them to:
147
-
148
- 1. Run `bi-superpowers mcp-setup`
149
- 2. Verify `.mcp.json` contains the official endpoint and Fabric package
150
- 3. Authenticate in the environment required by their MCP client
151
- 4. Restart or refresh Claude Code
152
-
153
- If they ask what gets configured, show:
154
-
155
- ```text
156
- powerbi-remote -> https://api.fabric.microsoft.com/v1/mcp/powerbi
157
- fabric-mcp-server -> npx -y @microsoft/fabric-mcp@latest server start --mode all
158
- ```
159
-
160
- ---
161
-
162
- ## PHASE 3: Verify Plugin Config
163
-
164
- If the user chooses option 3:
165
-
166
148
  Check these files in order:
167
149
 
168
150
  1. `.claude-plugin/plugin.json`
@@ -172,9 +154,8 @@ Check these files in order:
172
154
  Confirm:
173
155
 
174
156
  - plugin name is `bi-superpowers`
175
- - `.mcp.json` includes `powerbi-remote`
176
- - `.mcp.json` includes `fabric-mcp-server`
177
157
  - `.mcp.json` includes `powerbi-modeling-mcp`
158
+ - `.mcp.json` includes `microsoft-learn`
178
159
 
179
160
  If anything is missing, recommend:
180
161
 
@@ -198,7 +179,7 @@ claude --plugin-dir .
198
179
  | Modeling MCP missing on Windows | Install the Microsoft extension in VS Code or Cursor |
199
180
  | Modeling MCP installed manually | Set `BI_SUPERPOWERS_POWERBI_MODELING_MCP_PATH` |
200
181
  | Plugin not loading MCPs | Re-run `bi-superpowers mcp-setup` and restart Claude Code |
201
- | macOS/Linux local modeling request | Redirect to `powerbi-remote` or `fabric-mcp-server` |
182
+ | macOS/Linux local modeling request | Use `microsoft-learn` for docs; live editing requires Windows |
202
183
  | User asks about Excel MCP | Explain Excel remains supported through skills and library content, not a default MCP |
203
184
 
204
185
  ---
@@ -210,7 +191,7 @@ claude --plugin-dir .
210
191
  | Recommend `uvx` for Modeling MCP | Not the official Microsoft installation path | Use the official executable via the local launcher |
211
192
  | Ask the user to find a localhost port | Not required in the new flow | Use the official Modeling MCP launcher |
212
193
  | Put plugin MCP config in `.claude/settings.json` first | Plugin-first flow uses `.mcp.json` | Prefer `.mcp.json` at the plugin root |
213
- | Block non-Windows users entirely | Remote/Fabric MCPs still work | Continue with `powerbi-remote` and `fabric-mcp-server` |
194
+ | Invent unofficial MCPs (remote, fabric, etc.) | This plugin only ships 2 official MCPs | Only use the 2 official MCPs we ship (`powerbi-modeling-mcp` and `microsoft-learn`) |
214
195
 
215
196
  ---
216
197
 
@@ -225,15 +206,12 @@ Adjust depth based on `config.json → experienceLevel`:
225
206
 
226
207
  ## Related Skills
227
208
 
228
- - `/dax` — Write DAX measures via MCP connection
229
- - `/model-documenter` — Document the connected model
230
- - `/fabric-scripts` — Fabric automation via MCP
209
+ - `/project-kickoff` — Analyze a BI project and plan next steps
231
210
 
232
211
  ---
233
212
 
234
213
  ## RELATED RESOURCES
235
214
 
236
215
  - [Power BI MCP overview](https://learn.microsoft.com/en-us/power-bi/developer/mcp/mcp-servers-overview)
237
- - [Remote Power BI MCP quickstart](https://learn.microsoft.com/en-us/power-bi/developer/mcp/remote-mcp-server-get-started)
238
- - [Power BI Modeling MCP](https://github.com/microsoft/powerbi-modeling-mcp)
239
- - [Microsoft Fabric MCP Server](https://github.com/microsoft/mcp/tree/main/servers/Fabric.Mcp.Server)
216
+ - [Power BI Modeling MCP on GitHub](https://github.com/microsoft/powerbi-modeling-mcp)
217
+ - [Microsoft Learn MCP](https://learn.microsoft.com/en-us/training/support/mcp)