Skip to content
Development
Command

/suggest-rule

Suggest BPA rules based on a description or model analysis. Use when creating new Best Practice Analyzer rules for Tabular Editor.

From plugin
power-bi-agentic-development
1.1k2 skills8 agents2 commands1 MCP
> /plugin marketplace add data-goblin/power-bi-agentic-development

Command definition

suggest-rule.md
name: suggest-rule
description: Suggest BPA rules based on a description or model analysis. Use when creating new Best Practice Analyzer rules for Tabular Editor.
argument-hint: "[description or model path]"
model: sonnet

Suggest BPA Rule

Generate a BPA (Best Practice Analyzer) rule based on the provided description or model analysis.

Arguments

$ARGUMENTS

Instructions

1. **Understand the Request**

  • If a description is provided, identify the best practice to enforce
  • If a model path is provided, analyze the model for potential rule opportunities

2. **Load Skill Context**

  • Load the `bpa-rules` skill for reference documentation
  • Review `references/expression-syntax.md` for available properties and patterns
  • Check `examples/comprehensive-rules.json` for similar existing rules

3. **Generate Rule**

  • Determine appropriate Scope based on what objects the rule applies to
  • Write Expression using Dynamic LINQ syntax
  • Consider if a FixExpression is appropriate (only for simple, safe fixes)
  • Assign appropriate Severity (1=info, 2=warning, 3=error)
  • Use standard Category or create descriptive custom category
  • Follow ID naming convention: `PREFIX_DESCRIPTIVE_NAME`

4. **Output Format**

Provide the complete rule in JSON format:

{
  "ID": "PREFIX_RULE_NAME",
  "Name": "Human readable rule name",
  "Category": "Category",
  "Description": "Why this rule matters and guidance for fixing",
  "Severity": 2,
  "Scope": "Measure, CalculatedColumn",
  "Expression": "Dynamic LINQ expression",
  "FixExpression": null,
  "CompatibilityLevel": 1200
}

5. **Validate**

  • Ensure Expression syntax is valid
  • Verify Scope includes all applicable object types
  • Check that rule doesn't duplicate existing standard rules

Examples

**User**: "Create a rule to check if measures use CALCULATE without filters"

**Output**:

{
  "ID": "DAX_CALCULATE_NO_FILTERS",
  "Name": "CALCULATE should have filter arguments",
  "Category": "DAX Expressions",
  "Description": "CALCULATE without filter arguments is redundant. Either add filters or remove CALCULATE.",
  "Severity": 1,
  "Scope": "Measure, CalculatedColumn",
  "Expression": "Tokenize().Any(Type = FUNCTION and Text = \"CALCULATE\") and not Tokenize().Any(Type = FUNCTION and Text = \"CALCULATE\" and Next.Type = OPEN_PARENS and Next.Next.Type <> COMMA)",
  "FixExpression": null,
  "CompatibilityLevel": 1200,
  "Remarks": "May have false positives for complex expressions"
}
Read more
@data-goblin
Ships withpower-bi-agentic-development

Power BI AI skills and Power BI agents for Claude Code and GitHub Copilot: a plugin marketplace of Power BI skills, subagents, and hooks for semantic models, DAX, TMDL, reports, and AI dashboards. Includes Microsoft Fabric skills and Fabric agents. Weekly updates.

1.1k35 skills8 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
1.1k
Star history of data-goblin/power-bi-agentic-development on GitHub, a chart by star-history.com

Other commands on power-bi-agentic-development.

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command