# suggest-rule

suggest-rule generates Best Practice Analyzer rules for Tabular Editor from plain text requirements or model files.

- command · `type=command` · Claude Code, Codex, GitHub Copilot, Gemini CLI · ★ 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/tabular-editor/commands/suggest-rule.md
- Updated: 2026-10-28
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/commands/suggest-rule

## What it does

The command constructs complete JSON entries compatible with the Tabular Editor Best Practice Analyzer. It accepts either an informal prompt explaining the standard to enforce or a path pointing to a semantic model. During execution, it inspects `references/expression-syntax.md` and checks `examples/comprehensive-rules.json` to prevent duplicated logic and verify supported properties.

The resulting payload includes target object scopes, severity ratings between 1 and 3, a standard or custom category, and Dynamic LINQ filter expressions. Automated remediations via `FixExpression` are only included when edits are straightforward and risk-free.

Execution relies on the `sonnet` model configuration. Because rule validation references external repository guides inside `bpa-rules`, having the companion skill installed is necessary for schema verification.

## Requirements
- Works with: Power BI

## Install

### Claude Code (native platform)

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 tabular-editor@power-bi-agentic-development
```

2. **Manually: put the files in place**
- File: `.claude/commands/suggest-rule.md` — Call it with /suggest-rule. For all projects use ~/.claude/commands/

### Codex

**Manually: put the files in place**
- File: `~/.codex/prompts/suggest-rule.md` — Call it with /prompts:suggest-rule. Codex marks this format deprecated in favour of skills

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/prompts/suggest-rule.prompt.md`

### Gemini CLI

**Manually: put the files in place**
- File: `.gemini/commands/suggest-rule.toml` — Gemini stores commands as TOML: the prompt text goes into the prompt field

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/tabular-editor/commands/suggest-rule.md

## When to use it
- construct Dynamic LINQ filters for DAX measure diagnostics
- produce structured BPA rule definitions in JSON format
- identify enforcement opportunities directly from a tabular model file
- assign appropriate severity and scope settings to custom rules

## Example prompts
- /suggest-rule Make a rule that flags measures using CALCULATE without filters
- /suggest-rule ./models/sales.bim

## Similar
- [power-bi-dax-optimization](https://affpapa.org/en/nevibecode/skills/power-bi-dax-optimization.md) — skill · 9100 installs
- [power-bi-model-design-review](https://affpapa.org/en/nevibecode/skills/power-bi-model-design-review.md) — skill · 9000 installs
- [power-bi-build](https://affpapa.org/en/nevibecode/skills/power-bi-build.md) — skill · 688 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
- [DAX Terminal](https://affpapa.org/en/nevibecode/prompts/dax-terminal.md) — prompt · ★ 178201 repo stars

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
