# semantic-model-auditor

semantic-model-auditor audits Power BI and Fabric semantic models for memory bottlenecks, schema issues, and DAX anti-patterns by inspecting exported TMDL files.

- subagent · `type=agent` · Claude Code, Codex, Cursor, GitHub Copilot · ★ 1104 repo stars
- Author: Kurt Buhler
- License: GPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/data-goblin/power-bi-agentic-development/tree/HEAD/plugins/semantic-models/agents/semantic-model-auditor.agent.md
- Updated: 2026-10-28
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/agents/semantic-model-auditor

## What it does

This subagent automates reviews of Fabric and Power BI semantic models. It triggers the audit by exporting the workspace model to `/tmp/audit` via the Fabric CLI command `fab export`. This generates a directory of TMDL files covering tables, relationships, and model settings.

The agent then inspects the TMDL files against specific severity checks. It flags bidirectional cross-filtering, circular measure references, missing data types, and auto-generated tables like `LocalDateTable_*`. To tackle memory consumption, it spots unsplit datetime fields, unneeded calculated columns, and high-cardinality keys that inflate VertiPaq dictionaries. In DAX formulas, it highlights nested `CALCULATE` statements and costly `DISTINCTCOUNT` operations.

Fabric CLI (`fab`) must be installed and authenticated in your shell environment. Without access to the target workspace, the export step fails immediately and halts the audit.

## Requirements
- Works with: Power BI

## Install

### GitHub Copilot (native platform)

**Manually: put the files in place**
- File: `.github/agents/semantic-model-auditor.agent.md`

### Claude Code

1. **Plugin marketplace**
In the agent chat (not a shell):
```text
/plugin marketplace add data-goblin/power-bi-agentic-development
```
In the agent chat (not a shell):
```text
/plugin install semantic-models@power-bi-agentic-development
```

2. **Manually: put the files in place**
- File: `.claude/agents/semantic-model-auditor.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention. Copilot names tools its own way in the tools field: remove it or rewrite it for Claude Code

### Codex

**Manually: put the files in place**
- File: `.codex/agents/semantic-model-auditor.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/semantic-model-auditor.md` — Cursor also reads .claude/agents/

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/data-goblin/power-bi-agentic-development/tree/HEAD/plugins/semantic-models/agents/semantic-model-auditor.agent.md

## When to use it
- detect bidirectional relationships and circular dependencies across measures
- identify unsplit datetime columns and high-cardinality keys consuming memory
- catch auto-generated date hierarchy tables bloating model size
- locate redundant nested `CALCULATE` statements in DAX code

## Example prompts
- Audit the Sales model in the Production workspace for performance bottlenecks
- Run a best practice check on my semantic model before release
- Inspect the exported model for DAX anti-patterns and high-cardinality columns

## Similar
- [Power BI Authoring MCP Server (Local)](https://affpapa.org/en/nevibecode/mcp/power-bi-authoring-mcp-server-local.md) — MCP server · ★ 1297 repo stars
- [Horizun PBI MCP](https://affpapa.org/en/nevibecode/mcp/horizun-pbi-mcp.md) — MCP server · ★ 34 repo stars
- [power-bi-model-design-review](https://affpapa.org/en/nevibecode/skills/power-bi-model-design-review.md) — skill · 9000 installs
- [power-bi-dax-optimization](https://affpapa.org/en/nevibecode/skills/power-bi-dax-optimization.md) — skill · 9100 installs
- [power-bi-salespulse-360-dashboard](https://affpapa.org/en/nevibecode/skills/power-bi-salespulse-360-dashboard.md) — skill · 661 installs
- [power-bi-retail-analytics-salespulse360](https://affpapa.org/en/nevibecode/skills/power-bi-retail-analytics-salespulse360.md) — skill · 659 installs

From the same set: [data-goblin/power-bi-agentic-development](https://affpapa.org/en/nevibecode/by/data-goblin/power-bi-agentic-development.md) — 59 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
