powerbi-connect-pbid

powerbi-connect-pbid is a skill for Claude Code, Codex from santoshkanthety/powerbi-agent. It costs 179 tokens per session (8,106 once invoked), scanned A, original, MIT.

Guidance for connecting to the data model running inside Power BI Desktop. That model is the local in-memory structure behind a report, including its tables, relationships, and calculations.

In plain words
What is it for?
Listing model objects, running DAX queries, inspecting query activity, changing model metadata, and managing calendar, field-parameter, or DAX library settings.
Why use it?
It provides a way to inspect or change the model while Power BI Desktop is running. It also records genuinely unexpected connection details for future use.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is **If a TOM operation fails** with a compatibility level error or missing type, the `.retail.amd64` package may be too old. A newer package (`Microsoft.AnalysisS.

Good fit Listing model objects, running DAX queries, inspecting query activity, changing model metadata, and managing calendar, field-parameter, or DAX library settings.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/santoshkanthety/powerbi-agent
agentmods
npx agentmods add skills/santoshkanthety/powerbi-agent/powerbi-connect-pbid

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for powerbi-connect-pbid

README.md
[![agentmods](https://agentmods.dev/badge/skills/santoshkanthety/powerbi-agent/powerbi-connect-pbid/github.svg)](https://agentmods.dev/skills/santoshkanthety/powerbi-agent/powerbi-connect-pbid)
Your own site
<a href="https://agentmods.dev/skills/santoshkanthety/powerbi-agent/powerbi-connect-pbid"><img src="https://agentmods.dev/badge/skills/santoshkanthety/powerbi-agent/powerbi-connect-pbid/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for powerbi-connect-pbid

Your own site · 80×15
<a href="https://agentmods.dev/skills/santoshkanthety/powerbi-agent/powerbi-connect-pbid"><img src="https://agentmods.dev/badge/skills/santoshkanthety/powerbi-agent/powerbi-connect-pbid.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 179 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,106 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00179 $0.08106
Opus 5 $0.00089 $0.04053
Sonnet 5 $0.00036 $0.01621
Haiku 4.5 $0.00018 $0.00811

Measured 12d ago against content hash 652b38b89dda, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

powerbi-connect-pbid scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/powerbi-connect-pbid/SKILL.md · 617 lines

How it starts

The opening of the file, as written. The whole thing — 617 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Connect to Power BI Desktop (Local Analysis Services)

CRITICAL: Record mistakes, surprises, and model-specific nuances encountered while using this skill in .claude/rules/connect-pbid.md. This file must begin with "Learnings from Claude about connecting to semantic models via the connect-pbid skill". Write only active reference notes (e.g. "QueryGroup property returns an object; access .Folder for the name string"); do not log a changelog or history of events. Omit anything already documented in the skill or its references. Keep the file under 1500 characters at all times; prune stale entries when adding new ones. Do not over-attend to this file; update it only when something genuinely unexpected is discovered.

Note: No MCP server required; do not use this skill with MCP servers or CLI tools. Use this skill to execute PowerShell commands directly via Bash to connect to Power BI Desktop's local Analysis Services instance.

Expert guidance for connecting to Power BI Desktop's local tabular model via the Tabular Object Model (TOM) and ADOMD.NET in PowerShell. Covers connection, enumeration, DAX queries, query traces, and full model modification.

When to Use This Skill

Activate only when the Tabular Editor CLI or a Power BI MCP server is unavailable. TOM is more reliable than direct TMDL editing because it validates changes against the engine and applies them atomically.

WARNING: This skill does NOT support remote models via the XMLA endpoint. For Direct Lake models or models hosted in Fabric, use the Tabular Editor CLI or a Power BI MCP server instead; the local Analysis Services proxy does not expose Direct Lake databases to external TOM/ADOMD.NET connections.

Critical

  • Power BI Desktop must be open with a model loaded before connecting; if there are errors it is likely due to a "thin report" connected to a remote model, or a Direct Lake model (which uses a remote proxy that blocks external connections)
  • The local Analysis Services instance only accepts connections from localhost
  • Multiple PBI Desktop files open means multiple msmdsrv.exe processes on different ports. Connect to each port, read $server.Databases[0].Name, and ask the user which model to work with if more than one is found
  • Always use a timeout of 60000ms or higher for PowerShell commands via Bash
  • Shell escaping: Bash eats PowerShell $ variables ($env:TEMP, $server, etc.) silently. Two options: (1) single-quote the -Command arg so Bash passes $ literally to PowerShell; (2) write a .ps1 file with a heredoc (single-quoted delimiter preserves $) and use -File. On macOS via Parallels, the prlctl -> cmd.exe -> powershell.exe chain adds extra escaping layers; .ps1 files are more reliable for complex scripts but inline -Command with single quotes works for short commands.
  • Always use -ExecutionPolicy Bypass when running PowerShell commands or scripts. Windows blocks unsigned scripts by default.
  • Script file location -- persistent scripts should go in the agent harness's scripts directory for the project (.claude/scripts/, .github/scripts/, .cursor/scripts/, .gemini/scripts/, etc. depending on the harness). Ephemeral or throwaway scripts should go in a project tmp/ directory (which should be .gitignored). Do not write scripts to ./ root or /tmp/.
  • Do not modify model metadata without explicit user direction
  • Always call $model.SaveChanges() to persist modifications; without it, changes are discarded
  • For macOS users running PBI Desktop in Parallels, see parallels-macos.md
  • Validation hooks are active for this plugin; they validate DAX references, enforce measure metadata, check referential integrity, and report compatibility level upgrade opportunities. Toggle checks in hooks/config.yaml.

Read the full file on GitHub · 617 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 617 lines · 179 tokens per session scan A 652b38b89dda

Subscribe to this mod's changes

powerbi-connect-pbid is a skill published in the GitHub repository santoshkanthety/powerbi-agent (2 stars, last pushed 13d ago), licensed MIT. It adds 179 tokens to every session and 8,106 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

seshat-bi

Route a BI project through Seshat BI's governed seven-stage readiness flow. Use when a user asks to inspect a retail source, initialize a Seshat project, find the truthful next action, validate readiness evidence, or stop at the correct human approval gate.

Kemetra/Seshat-BI · 58 tokens

Data Retention Schedule Review

Use when reviewing a draft or existing data retention schedule to inventory data categories against stated purposes, collect retention-period facts, flag legal-hold interactions, and surface orphaned-data and vendor-coverage gaps for attorney review.

zgbrenner/agentcounsel · 49 tokens

powerbi-workflows

Route guarded Power BI work -- design, native report authoring, semantic-model operations, published queries, QA, bounded formatting, and PBIP adoption -- to the correct Seshat or official Microsoft surface under Seshat BI's gates.

Kemetra/Seshat-BI · 53 tokens

dbt-workflows

Route dbt intent to Seshat's governed shadow workflow or the official dbt Labs competence and execution owner, without bypassing readiness or evidence.

Kemetra/Seshat-BI · 35 tokens

dagster-workflows

Route Dagster intent to Seshat's governed medallion workflow or the official Dagster competence owner without bypassing readiness, approvals, or evidence.

Kemetra/Seshat-BI · 36 tokens

pbi-mcp-doctor

Use when a user asks whether or how to wire Microsoft's official Power BI MCP servers into a Seshat BI workspace: run the read-only environment doctor, map a task to the governed Power BI surface (including the official report-authoring skill), generate a safe read-only config template, or run the mocked read-only…

Kemetra/Seshat-BI · 73 tokens