powerbi-standardize-naming-conventions
Skill3 starsChanged 7 months agoMITView on GitHub
Interactive naming convention standardization for TMDL-based Power BI semantic models. Automatically invoke when the user asks to "standardize naming conventions", "fix naming conventions", "clean up model names", "apply naming standards", "audit naming", "make names human readable", "rename fields", "fix abbreviations in model", or mentions renaming measures, columns, or tables for consistency across a model.
In this repository58 other files it gives its agents.
- powerbi-audit-tenant-settingsSkill
- powerbi-bpa-rulesSkill
- powerbi-connect-pbidSkill
- powerbi-connectSkill
- powerbi-create-pbi-reportSkill
- powerbi-c-sharp-scriptingSkill
- powerbi-custom-visualsSkill
- powerbi-cyber-securitySkill
- powerbi-data-catalog-lineageSkill
- powerbi-data-governance-traceabilitySkill
- powerbi-data-transformationSkill
- powerbi-dax-masterySkill
- powerbi-dax-performanceSkill
- powerbi-daxSkill
- powerbi-deneb-visualsSkill
- powerbi-doctorSkill
- powerbi-duckdb-lakehouseSkill
- powerbi-fabric-appsSkill
- powerbi-fabric-app-templatesSkill
- powerbi-fabric-capacitySkill
- powerbi-fabric-cliSkill
- powerbi-fabric-pipelinesSkill
- powerbi-fabricSkill
- powerbi-lineage-analysisSkill
- powerbi-measure-glossarySkill
- powerbi-medallion-architectureSkill
- powerbi-modelSkill
- powerbi-modifying-theme-jsonSkill
- powerbi-paginated-reportsSkill
- powerbi-pbi-cliSkill
- powerbi-pbip-formatSkill
- powerbi-pbir-cliSkill
- powerbi-pbir-format-enhancedSkill
- powerbi-performance-scaleSkill
- powerbi-power-querySkill
- powerbi-project-managementSkill
- powerbi-python-visualsSkill
- powerbi-refresh-semantic-modelSkill
- powerbi-report-authoringSkill
- powerbi-report-conversionSkill
- powerbi-report-designSkill
- powerbi-reportSkill
- powerbi-report-structureSkill
- powerbi-report-themingSkill
- powerbi-review-reportSkill
- powerbi-review-semantic-modelSkill
- powerbi-r-visualsSkill
- powerbi-security-rlsSkill
- powerbi-source-integrationSkill
- powerbi-spark-livySkill
- powerbi-star-schema-modelingSkill
- powerbi-svg-visualsSkill
- powerbi-te2-cliSkill
- powerbi-te-cliSkill
- powerbi-te-docsSkill
- powerbi-testing-validationSkill
- powerbi-time-series-dataSkill
- powerbi-tmdlSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 9 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Read all table TMDL files to build a complete picture of current naming patterns.
- Very specific: line 33
Use AskUserQuestion to gather context:
- Distinctive: line 45
Before making changes, produce an audit report.
- Distinctive: line 63
Ask the user to confirm or adjust the proposed renames before proceeding.
- Distinctive: line 67
After user approval, edit the TMDL files.
- Very specific: line 72
Reorganize display folders: Add or restructure displayFolder: properties
- Very specific: line 73
Add descriptions: Add /// comments for measures and columns that lack them
- Very specific: line 74
Update relationship references: Check relationships.tmdl for renamed tables/columns
- Very specific: line 76
Cross-file reference updates are critical: When renaming a measure or column, search the entire definition/ directory for all references:
- Distinctive: line 86
After applying changes, verify:
- Distinctive: line 87
All TMDL files still parse correctly (no syntax errors)
- Distinctive: line 88
No orphaned references to old names remain in any file
- Distinctive: line 92
Run a final search to check for any missed references:
- Distinctive: line 134
Always warn the user about this before applying renames.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Standardize Naming Conventions
Interactive workflow for auditing and standardizing naming conventions in Power BI semantic models stored as TMDL files. Ensures tables, columns, measures, and display folders follow human-readable, consistent, business-aligned naming standards.
Primary Workflow
Phase 1: Discover the Model
Locate the TMDL files. Ask the user for the path to the .SemanticModel/definition/ directory if not obvious from context. Then scan the model structure:
# Count tables and get an overview
ls <path>/tables/*.tmdlRead all table TMDL files to build a complete picture of current naming patterns. Focus on:
- Table names (check for DIM_, FACT_, or other technical prefixes)
- Measure names (check for abbreviations, programming conventions, inconsistent syntax)
- Column names (check for CamelCase, snake_case, abbreviations)
- Display folder structure (check for organization and consistency)
- Presence of descriptions (
///comments)
Phase 2: Understand Business Context
CRITICAL: Do not rename anything without understanding the business terminology.
Use AskUserQuestion to gather context:
- Business terminology: "What terminology does your organization use for key metrics? For example, do you call it Revenue, Turnover, Sales, or Gross Sales?"
- Existing conventions: "Do you have any documented naming conventions or standards already?"
- Period conventions: "How do you typically refer to prior periods? (e.g., 1YP, PY, Prior Year, Last Year)"
- Unit conventions: "How do you typically express units in measure names? (e.g., parentheses like (%), (Value), (Quantity))"
- Downstream impact: "Are there downstream reports connected to this model that would need visual rebinding after renaming?"
Adapt the naming rules to the user's business context. The rules in references/naming-rules.md are defaults -- override them when the user's organization has established conventions.
Phase 3: Audit and Report
Before making changes, produce an audit report. Present a markdown table showing each proposed rename:
| Object Type | Current Name | Proposed Name | Issues Found |
|-------------|-------------|---------------|-------------|
| Table | FACT_Invoices | Invoices | Technical prefix |
| Measure | NetSls | Net Sales | CamelCase, abbreviation |
| Column | shp_dt | Ship Date | snake_case, abbreviation |Group findings by issue type:
- Programming conventions: CamelCase, snake_case, UPPER_CASE
- Abbreviations/acronyms: Shortened or opaque names
- Inconsistent syntax: Mixed period, unit, or aggregation patterns
- Technical prefixes: DIM_, FACT_, STG_ on tables
- Missing descriptions: Objects without
///docstrings - Disorganized folders: Missing or flat display folder hierarchy
Ask the user to confirm or adjust the proposed renames before proceeding.
Phase 4: Apply Changes
After user approval, edit the TMDL files. For each table file:
- Rename the table (if needed): Change the
tabledeclaration - Rename measures: Change measure names in their declarations. IMPORTANT: Also update all internal DAX references to renamed measures using
[Old Name]->[New Name]patterns across ALL table files in the model - Rename columns: Change column names in their declarations. IMPORTANT: Also update DAX references using
'Table'[Old Column]->'Table'[New Column]across ALL table files - Reorganize display folders: Add or restructure
displayFolder:properties - Add descriptions: Add
///comments for measures and columns that lack them - Update relationship references: Check
relationships.tmdlfor renamed tables/columns
Cross-file reference updates are critical. When renaming a measure or column, search the entire definition/ directory for all references:
# Find all references to a renamed measure
rg "OldMeasureName" <path>/definition/tables/
rg "OldMeasureName" <path>/definition/relationships.tmdlPhase 5: Validate
After applying changes, verify:
- All TMDL files still parse correctly (no syntax errors)
- No orphaned references to old names remain in any file
- Display folders are consistent across tables
- Descriptions are present on all visible measures and columns
Run a final search to check for any missed references:
# Check for any remaining old names
rg -n "old_name_pattern" <path>/definition/Naming Convention Rules
Consult references/naming-rules.md for the complete rule set including:
- Human-readable name requirements
- Abbreviation and acronym rules
- Technical prefix rules
- Aggregation, unit, and period syntax standards
- Display folder organization patterns
- Measure name construction order:
[Aggregation] [Base Name] [Period] ([Unit]) - Column naming patterns
Key Anti-Patterns to Detect
Quick-reference checklist for the most common issues:
| Anti-Pattern | Rule | Example Fix |
snake_case | Use spaces | net_sales -> Net Sales |
CamelCase | Use spaces | NetSales -> Net Sales |
UPPER_CASE | Use spaces | TOTAL_COST -> Total Cost |
| Abbreviations | Spell out | Del. Mrgn -> Delivery Margin |
| Opaque acronyms | Spell out | TFS -> Total Freight Surcharge |
| Technical prefix | Remove | FACT_Orders -> Orders |
| Inconsistent periods | Standardize | LY/PY/Last Year -> 1YP |
| Inconsistent units | Standardize | pct/%/(%) -> (%) |
| Missing descriptions | Add | /// docstrings on all visible objects |
| Flat folders | Organize | Numbered hierarchy with subfolders |
Downstream Report Impact
WARNING: Renaming model objects breaks downstream report visuals that reference those fields. After renaming:
- Identify all connected reports (
.pbirfiles or Power BI Service reports) - Rebind visuals to use the new field names
- This can be done manually in Power BI Desktop, or programmatically by editing the
visual.jsonfiles in PBIR format
Always warn the user about this before applying renames. If downstream reports exist, consider:
- Making a backup of the model before changes
- Planning a rebinding session after the rename
- Using a C# script in Tabular Editor to batch-rename with rebinding
Additional Resources
Reference Files
references/naming-rules.md-- Complete naming convention rules with detection patterns, anti-pattern tables, and the measure name construction order
Fetching Docs
To retrieve current semantic model and TMDL reference docs, use microsoft_docs_search + microsoft_docs_fetch (MCP) if available, otherwise mslearn search + mslearn fetch (CLI). Search based on the user's request and run multiple searches as needed to ensure sufficient context before proceeding.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

