pbi-quality-rules

pbi-quality-rules is a skill for Claude Code, Codex from luccapinto/agentic-data-kit. It costs 40 tokens per session (560 once invoked), scanned A, original, MIT.

A checker for Power BI semantic models, which define the tables, calculations, and relationships behind a report. It runs Tabular Editor's Best Practice Analyzer against the model using a shared set of rules.

In plain words
What is it for?
Use it to validate TMDL or model files, run checks in development or CI, and review violations from the team's BPA rules.
Why use it?
It finds model problems and reports them consistently, with errors, warnings, or informational results. Error findings can also make a command fail, which is useful in automated checks.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/luccapinto/agentic-data-kit/pbi-quality-rules
Any agent
npx skills add luccapinto/agentic-data-kit --skill pbi-quality-rules
Clone the repo
git clone --depth 1 https://github.com/luccapinto/agentic-data-kit

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 pbi-quality-rules

README.md
[![agentmods](https://agentmods.dev/badge/skills/luccapinto/agentic-data-kit/pbi-quality-rules.svg)](https://agentmods.dev/skills/luccapinto/agentic-data-kit/pbi-quality-rules)
Your own site
<a href="https://agentmods.dev/skills/luccapinto/agentic-data-kit/pbi-quality-rules"><img src="https://agentmods.dev/badge/skills/luccapinto/agentic-data-kit/pbi-quality-rules.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 560 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00040 $0.00560
Opus 5 $0.00020 $0.00280
Sonnet 5 $0.00008 $0.00112
Haiku 4.5 $0.00004 $0.00056

Measured 4d ago against content hash 72f3ba938c51, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pbi-quality-rules 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 4d 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.

.agent/skills/pbi-quality-rules/SKILL.md · 43 lines

How it starts

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

Skill: pbi-quality-rules

Run the Best Practice Analyzer (BPA) — the industry-standard model linter — against a PBIP semantic model. This skill uses the real BPA engine from Tabular Editor 2 (free, open source) instead of a homegrown checker, so results match what Power BI developers expect and the rules are portable.

Rule set

bpa-rules.json (next to this file) holds the team's BPA rules in Tabular Editor's native format (ID, Name, Category, Severity, Scope, Expression in Dynamic LINQ over the TOM). Severity: 3 = error, 2 = warning, 1 = info. Edit this file to add or tune rules; it loads directly into Tabular Editor's BPA UI too.

Requires Tabular Editor 2 (free). Desktop should be closed so disk reflects the latest state.

# Windows (TabularEditor.exe on PATH). Point at the .SemanticModel folder (TMDL) or model.bim.
TabularEditor.exe "Sales.SemanticModel" -A ".agent/skills/pbi-quality-rules/bpa-rules.json" -V
  • -A <rulesfile> runs the BPA with the given rules; -V writes violations to the console (and sets a non-zero exit code on error-severity hits — useful in CI).
  • The cross-platform te CLI (preview) accepts the same rules file if installed instead.

Parse the console output, then present errors and warnings only (omit info unless asked).

Fallback — no Tabular Editor installed

The kit stays usable without the tool. Parse the TMDL files directly and evaluate the same rules by hand: for each rule, read its Scope and Expression from bpa-rules.json and apply the equivalent check to the parsed objects (measures, tables, columns, relationships). This is less robust than the real BPA — say so, and recommend installing Tabular Editor 2 for accuracy.

Agent flow

  1. Run after large model edits / refactors, or on demand.
  2. Show errors first; for each error, offer an immediate fix. For warning, suggest but don't force. Group by category so the report is scannable.

Read the full file on GitHub · 43 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 4d ago First seen · 43 lines · 40 tokens per session scan A 72f3ba938c51

Subscribe to this mod's changes

pbi-quality-rules is a skill published in the GitHub repository luccapinto/agentic-data-kit (7 stars, last pushed 1mo ago), licensed MIT. It adds 40 tokens to every session and 560 once invoked, about $0.0002 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.