best-practices
Skill9 starsChanged 10 months agoMITView on GitHub
Applies Power BI best practices, BPA rules, and enterprise standards. Use for quality validation, naming conventions, and performance optimization.
20 other projects use a version of this.
Adopted by
Most recently taken up by
- jscraik/Agent-Skillstheir own version, first seen Sep 27, 2026
- sd0xdev/sd0x-harnesstheir own version, first seen Sep 26, 2026
- PracticalSwan/agent-skillstheir own version, first seen Sep 14, 2026
- vinta/hal-9000their own version, first seen Sep 12, 2026
- RealDougEubanks/ClaudeMarketplacetheir own version, first seen Sep 10, 2026
- addyosmani/web-quality-skillstheir own version, first seen Aug 24, 2026
Used with
Projects with it also use web-quality-audit, core-web-vitals and 6 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
RodrigoTomeESSkillweb-quality-audit
Comprehensive web quality audit covering performance, accessibility, SEO, and best practices. Use when asked to "audit my site", "review web quality", "run lighthouse audit", "check page quality", or "optimize my website".
Also in 5 projects that use this
thisisAhsanIqbalSkillcore-web-vitals
Audits HTML patterns that affect Core Web Vitals (LCP, CLS, INP). Checks for layout shift causes, largest contentful paint blockers, and interaction responsiveness issues. Use when optimising page performance or fixing Google PageSpeed Insights warnings.
Also in 5 projects that use this
pluginagentmarketplaceSkillperformance
Optimize application performance through caching strategies, load balancing, database scaling, and monitoring. Build systems handling thousands of concurrent users.
Also in 5 projects that use this
ElasticSkillaccessibility
Accessibility guidance for Kibana. Use this skill when working with or reviewing EUI components, resolving a11y-related (@elastic/eui) ESLint issues, and ensuring proper use of ARIA attributes, focus management, keyboard interactions, and accessible naming conventions.
Also in 7 projects that use this
CloudAI-XSkilldatabase-design
Designs database schemas, indexing strategies, query optimization, and migration patterns for SQL and NoSQL databases. Use when designing tables, optimizing queries, fixing N+1 problems, planning migrations, or when asked about database performance, normalization, ORMs, or data modeling.
Also in 3 projects that use this
iamladiSkillseo
Comprehensive programmatic SEO (pSEO) skill for auditing, architecting, and scaling to 100k+ pages. Covers metadata, schemas, internal linking, content strategy, and Core Web Vitals. Use when planning or auditing SEO at scale.
Also in 4 projects that use this
Other versions20 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 20
- addyosmani/web-quality-skills★ 2.9ksame name
- MoizIbnYousaf/ai-agent-skills★ 1.1ksame name
- sd0xdev/sd0x-harness★ 191same name
- vinta/hal-9000★ 138same name
- acedergren/oci-agent-skills★ 21same name
- PracticalSwan/agent-skills★ 18same name
- RodrigoTomeES/getmcp★ 13same name
- jscraik/Agent-Skills★ 9same name
- officialunofficial/skills★ 7same name
- ila/duckdb-claude-skills★ 4same name
10 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- calculation-groupsSkill
- daxSkill
- deploymentSkill
- pbip-projectSkill
- power-querySkill
- report-visualsSkill
- securitySkill
- semantic-modelSkill
- themesSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. 0 are common, 19 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 17 edited versions we read keep these.
19
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 289
Delete these if not used:
- Distinctive: line 297
Every object should have a description:
- Distinctive: line 318
Follow SQLBI DAX formatting conventions
- Distinctive: line 324
Before creating relationships, verify:
- Distinctive: line 332
Before using measures in visuals:
- Distinctive: line 333
Test with simple filters
- Distinctive: line 334
Verify time intelligence with date table
- Distinctive: line 335
Check for circular references
- Distinctive: line 373
Use Git commit messages
- Distinctive: line 374
Add change log in model description
- Distinctive: line 398
Use parameters for environment-specific values:
- Distinctive: line 424
Consider incremental refresh for large tables
- Distinctive: line 434
Use Import for dimensions, DirectQuery for facts
- Distinctive: line 439
Create required parameters in Power Query:
- Distinctive: line 467
Ensure transformations push to source database:
- Distinctive: line 476
Check folding: Right-click step > "View Native Query"
- Distinctive: line 487
Verify no bi-directional unless needed
- Distinctive: line 500
Test with sample data
- Distinctive: line 504
After using other skills, apply best practices:
“Common” is measured: kept by at least 6 in 10 of the 17 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Best Practices Skill
This skill helps apply Power BI best practices, Best Practice Analyzer (BPA) rules, and enterprise standards to semantic models and reports.
When to Use This Skill
- Validating model quality against BPA rules
- Applying naming conventions
- Optimizing model performance
- Adding documentation and descriptions
- Enforcing enterprise governance patterns
- Reviewing DAX measures for quality
Best Practice Analyzer (BPA) Overview
BPA rules are organized into categories:
- Performance - Optimization and efficiency rules
- DAX Expressions - Measure and calculation quality
- Formatting - Naming and organization standards
- Maintenance - Housekeeping and cleanup rules
- Error Prevention - Validation and safety rules
Quick Validation Checklist
Model Structure
- All tables have descriptions
- Relationships are one-to-many (no bi-directional unless required)
- Key columns are marked as hidden
- Date table is marked as date table
- No unused columns or tables
DAX Measures
- All measures have descriptions (/// comments)
- DIVIDE() used instead of
/operator - Variables used for repeated expressions
- Measures organized in display folders
- No implicit measures (summarizations)
Naming Conventions
- Tables: PascalCase, singular nouns
- Columns: PascalCase with spaces allowed
- Measures: Business-friendly names
- No special characters or reserved words
Performance
- No calculated columns where measures work
- Integer keys instead of string keys
- Narrow tables preferred (fewer columns)
- Appropriate data types used
Performance Rules
HIGH IMPACT
Avoid bi-directional relationships
Bi-directional relationships cause performance overhead and can create ambiguity.
Instead of:
relationship {{guid}}
fromColumn: TableA.'Key'
toColumn: TableB.'Key'
crossFilteringBehavior: bothDirectionsDo this:
relationship {{guid}}
fromColumn: TableA.'Key'
toColumn: TableB.'Key'
// Use DAX CROSSFILTER() in measures when needed
measure 'Filtered Value' =
CALCULATE(
[Base Measure],
CROSSFILTER(TableA[Key], TableB[Key], Both)
)Use integer keys instead of strings
Integer comparisons are faster than string comparisons.
Instead of:
column 'Product Key'
dataType: stringDo this:
column 'Product Key'
dataType: int64Minimize calculated columns
Calculated columns consume memory and slow refresh. Use measures when possible.
Instead of calculated column:
column 'Profit Margin' =
DIVIDE(Sales[Profit], Sales[Revenue], 0)Use a measure:
measure 'Profit Margin' =
DIVIDE(SUM(Sales[Profit]), SUM(Sales[Revenue]), 0)MEDIUM IMPACT
Remove unused columns
Unused columns waste memory. Delete columns not used in:
- Relationships
- Measures
- Visuals
- Filters
Avoid high cardinality columns
Columns with many unique values increase model size. Consider:
- Grouping/binning high cardinality data
- Moving detail columns to a separate table
- Using calculated columns only when necessary
Use appropriate data types
| Data | Recommended Type |
| IDs, Keys | int64 |
| Flags | boolean |
| Currency | decimal |
| Percentages | double or calculated in DAX |
| Dates | dateTime |
DAX Rules
REQUIRED
Use DIVIDE instead of /
Bad:
Margin = Sales[Profit] / Sales[Revenue]Good:
Margin = DIVIDE(Sales[Profit], Sales[Revenue], 0)Use VAR for repeated expressions
Bad:
Growth % =
(SUM(Sales[Amount]) - CALCULATE(SUM(Sales[Amount]), SAMEPERIODLASTYEAR(Date[Date])))
/ CALCULATE(SUM(Sales[Amount]), SAMEPERIODLASTYEAR(Date[Date]))Good:
Growth % =
VAR CurrentSales = SUM(Sales[Amount])
VAR PriorSales = CALCULATE(SUM(Sales[Amount]), SAMEPERIODLASTYEAR(Date[Date]))
RETURN
DIVIDE(CurrentSales - PriorSales, PriorSales)Add descriptions to measures
/// Calculates total sales revenue
/// Excludes returns and cancellations
measure 'Total Sales' =
SUM(Sales[Amount])RECOMMENDED
Avoid IFERROR with aggregations
IFERROR masks data quality issues.
Bad:
Total = IFERROR(SUM(Sales[Amount]), 0)Good:
Total = SUM(Sales[Amount])
// Handle blanks explicitly if needed
Total = COALESCE(SUM(Sales[Amount]), 0)Use REMOVEFILTERS instead of ALL
REMOVEFILTERS is more explicit about intent.
Prefer:
All Sales = CALCULATE([Total Sales], REMOVEFILTERS(Products))Avoid nested CALCULATE
Deeply nested CALCULATE is hard to maintain.
Bad:
Measure =
CALCULATE(
CALCULATE(
CALCULATE([Base], Filter1),
Filter2
),
Filter3
)Good:
Measure =
CALCULATE(
[Base],
Filter1,
Filter2,
Filter3
)Formatting Rules
Table Naming
| Pattern | Example | Use |
| PascalCase | SalesOrders | Standard tables |
| Singular | Customer not Customers | Dimension tables |
| Prefix dim/fact | dimCustomer, factSales | Optional, for clarity |
Column Naming
| Pattern | Example |
| PascalCase with spaces | Customer Name |
| Keys end with Key | Product Key |
| IDs end with ID | Transaction ID |
| Dates end with Date | Order Date |
Measure Naming
| Category | Pattern | Example |
| Aggregations | Noun phrase | Total Sales |
| Percentages | End with % | Gross Margin % |
| Ratios | Include units | Sales per Customer |
| Time Intelligence | Include period | Sales YTD, Sales PY |
| Counts | End with Count | Customer Count |
Display Folders
Organize measures into logical folders:
├── Core Metrics
│ ├── Total Sales
│ ├── Total Cost
│ └── Total Profit
├── Time Intelligence
│ ├── Sales YTD
│ ├── Sales PY
│ └── Sales YoY %
├── Percentages
│ ├── Gross Margin %
│ └── % of Total
└── KPIs
├── Target
└── AchievementMaintenance Rules
Remove unused objects
Delete these if not used:
- Tables with no relationships or references
- Columns not in visuals, measures, or relationships
- Measures not in visuals or other measures
- Hidden columns not used in calculations
Document everything
Every object should have a description:
/// Customer dimension table
/// Contains customer demographics and segmentation
table Customers
lineageTag: ...
/// Unique identifier for each customer
column 'Customer ID'
...
/// Customer's full name (First + Last)
column 'Customer Name'
...Use consistent formatting
- TMDL: Use tabs for indentation
- DAX: Use 4 spaces for indentation
- Follow SQLBI DAX formatting conventions
Error Prevention Rules
Validate relationships
Before creating relationships, verify:
- "To" column contains unique values
- Data types match exactly
- Orphan handling is considered
- Filter direction is appropriate
Validate measure references
Before using measures in visuals:
- Test with simple filters
- Verify time intelligence with date table
- Check for circular references
- Validate with EVALUATE in DAX Studio
Test edge cases
Consider these scenarios:
- Empty filter context (grand total)
- Single value context (card visual)
- Multiple selections
- No data (blanks)
Enterprise Governance Patterns
Row-Level Security (RLS)
Define RLS roles in TMDL:
role SalesRep
modelPermission: read
tablePermission Sales = 'Sales'[Sales Rep] = USERPRINCIPALNAME()Data Sensitivity
Mark sensitive columns:
column 'SSN'
dataType: string
isHidden
// Consider not including in modelAudit Trail
Document model changes:
- Use Git commit messages
- Add change log in model description
- Track measure versions with comments
Data Source Governance
Credential Security
NEVER store credentials in source files:
/// BAD: Hardcoded connection string
expression ConnectionString = "Server=prod.database.com;User=admin;Password=secret123"
/// GOOD: Use parameters without credentials
expression ServerName = "prod.database.com" meta [IsParameterQuery=true, Type="Text"]Credentials should be:
- Configured in Power BI Service after publish
- Managed via gateway for on-premises sources
- Stored in Azure Key Vault for automated scenarios
Connection Parameters
Use parameters for environment-specific values:
/// Server name parameter (update per environment)
expression ServerName = "dev-server.database.windows.net" meta [IsParameterQuery=true, Type="Text", IsParameterQueryRequired=true]
/// Database name parameter
expression DatabaseName = "SalesDB_Dev" meta [IsParameterQuery=true, Type="Text", IsParameterQueryRequired=true]Gateway Configuration
For on-premises or VNet data sources:
| Source Location | Gateway Required |
| Cloud (Azure SQL, SharePoint Online) | No |
| On-premises (SQL Server, file share) | Yes |
| VNet (private endpoints) | Yes (VNet gateway) |
| Local files (CSV, Excel) | Yes or use cloud storage |
Refresh Considerations
Import Mode:
- Data copied into model at refresh
- Schedule refreshes in Power BI Service
- Consider incremental refresh for large tables
DirectQuery:
- Live queries to source
- No refresh needed
- Source must be always available
- Performance dependent on source
Hybrid (Composite):
- Mix of Import and DirectQuery
- Use Import for dimensions, DirectQuery for facts
- Requires careful relationship configuration
Incremental Refresh Setup
- Create required parameters in Power Query:
RangeStart = #datetime(2020, 1, 1, 0, 0, 0) meta [IsParameterQuery=true, Type="DateTime"]
RangeEnd = #datetime(2025, 12, 31, 23, 59, 59) meta [IsParameterQuery=true, Type="DateTime"]- Filter query with these parameters:
Table.SelectRows(Source, each [Date] >= RangeStart and [Date] < RangeEnd)- Configure refresh policy in Power BI Desktop before publish
Data Source Checklist
- No credentials in source files
- Connection strings use parameters
- Gateway configured for on-premises sources
- Query folding verified for large tables
- Incremental refresh configured where appropriate
- Timeout settings appropriate for data volume
- Error handling in Power Query transformations
- Data source documented in model description
Query Folding Validation
Ensure transformations push to source database:
| Foldable (DO) | Non-Foldable (AVOID) |
Table.SelectRows (simple) | Table.AddColumn (custom) |
Table.SelectColumns | Table.Buffer |
Table.Sort | Custom functions |
Table.Group | Cross-source joins |
Check folding: Right-click step > "View Native Query"
Validation Workflow
- After creating tables
- Verify naming conventions
- Check data types
- Add descriptions
- After adding relationships
- Confirm cardinality
- Verify no bi-directional unless needed
- Check filter flow
- After writing measures
- Run BPA checks
- Verify DIVIDE usage
- Add descriptions
- Test calculations
- Before deployment
- Remove unused objects
- Verify all descriptions
- Check performance
- Test with sample data
Integration with Other Skills
After using other skills, apply best practices:
| Skill | Validation Focus |
pbip-project | File structure, encoding |
semantic-model | Relationships, data types |
dax | Measure quality, formatting |
report-visuals | Visual references, performance |
power-query | Query folding, data source parameters |
themes | Accessibility, color contrast |
calculation-groups | Appropriate use, format strings |
security | RLS filter efficiency, complete coverage |
deployment | BPA in CI/CD, secret management |
BPA Rule Reference
See bpa-rules.md for complete rule list.
Naming Convention Reference
See naming-conventions.md for detailed naming guidelines.
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.

