pbip-dependency-analyzer
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "pbip-dependency-analyzer":https://skillpi.com/zh/skills/deepskill-7ac7b95a282fadb304e7e295e21087ef3fa6ef0ec5eb82fee7910e0169c5bc71。安装前核对上游来源和版本:https://github.com/lukasreese/powerbi-claude-skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
Power BI PBIP 依赖关系分析器,用于分析 Power BI 项目(.pbip)、TMDL 导出及语义模型定义,映射度量、列、表、M/Power Query、关系和报表视觉对象之间的依赖关系。适用于查找未使用的度量或列、执行依赖或影响分析、清理数据模型、识别孤立对象或审计模型质量,以及在用户上传 .pbip、model.bim、TMDL 导出或 report.json 文件时了解结构或依赖关系。
介绍来源: third_party · lukasreese · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 适合谁
- 翻译待完成,请参阅来源文档。
- 输入和输出
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: pbip-dependency-analyzer
description: "Power BI PBIP Dependency Analyzer. Analyzes all Power BI Project (.pbip) files, TMDL exports, and semantic model definitions to map dependencies between measures, columns, tables, M/Power Query, relationships, and report visuals. Use this skill EVERY TIME the user asks to: find unused measures or columns, analyze dependencies, clean up a data model, check what would break if something is deleted, perform impact analysis, identify orphaned objects, audit model quality, or asks 'what can I delete'. Also trigger when the user uploads .pbip files, model.bim files, TMDL exports, or report.json files and wants to understand their structure or dependencies. Trigger phrases include: 'analyze dependencies', 'find unused', 'what can I delete', 'clean up model', 'impact analysis', 'dependency check', 'unused measures', 'unused columns', 'orphaned objects', 'model audit', 'PBIP analysis'."Power BI PBIP Dependency Analyzer
Overview
This skill analyzes Power BI Project (PBIP) files to create a complete dependency map across all semantic models and reports. It identifies unused objects (measures, columns, calculated tables) that can be safely deleted, and warns about objects that would cause breaking changes if removed.
When to Use
- User wants to find unused measures, columns, or tables
- User wants to know "what happens if I delete X"
- User uploads PBIP files or TMDL exports for analysis
- User wants to clean up or optimize a semantic model
- User asks about dependencies between objects
- User wants a model quality audit
Analysis Workflow
When triggered, follow these steps in order:
Step 1: Identify Available Files
Check what the user has provided. Look in project knowledge and uploads for:
Accepted file types:
- .pbip files (Power BI Project metadata)
- model.bim (full semantic model JSON)
- TMDL exports (.tmdl text files)
- report.json / pages/ folders (visual definitions)
- .pq / .m files (Power Query / M expressions)
PBIP folder structure reference:
MyReport.pbip
MyReport/
definition/
report.json <- Visual field references
pages/
page1/
visuals/ <- Individual visual configs
model.bim <- Full semantic model
MyModel.pbip
MyModel/
definition/
model.bim <- Semantic model definition
tables/
TableName/
columns/ <- Column definitions
measures/ <- Measure DAX definitions
partitions/ <- M/Power Query or DAX source
relationships/ <- Relationship definitions
expressions/ <- Shared M expressions
TMDL export structure (alternative to PBIP):
model.tmdl <- Model metadata
tables/
TableName.tmdl <- Table with columns, measures, partitions
relationships.tmdl <- All relationships
expressions.tmdl <- Shared expressions
Step 2: Inventory All Objects
Create a complete inventory. Parse each file type as follows:
From Semantic Model (model.bim / TMDL / tables/):
Tables — For each table, record:
- Name
- Type:
imported(M/Power Query source),calculated(DAX), orcalculationGroup - Source: The M expression or DAX expression that creates it
Columns — For each column, record:
- Name and parent table
- Type:
source(from M/Power Query),calculated(DAX expression), orrowNumber - If calculated: the full DAX expression
- isHidden flag
Measures — For each measure, record:
- Name and parent table
- Full DAX expression
- Display folder
- Description (if any)
- Format string
- isHidden flag
Relationships — For each relationship, record:
- From table + column
- To table + column
- Cardinality (One-to-Many, Many-to-Many, etc.)
- Cross-filter direction (Single, Both)
- isActive flag
Calculated Tables — Record:
- Name
- Full DAX expression
- All output columns
Hierarchies — Record:
- Name, parent table
- Level columns
From M/Power Query (partitions / expressions):
For each query/partition:
- Query name
- Full M expression
- Referenced queries (other queries used as source)
- Output columns
- Parameters used
- Merge/join operations and which columns they use
From Reports (report.json / pages/):
For each page and visual:
- Page name
- Visual type (table, matrix, card, chart, slicer, etc.)
- Fields in Rows/Columns/Values/Tooltips/Legend
- Filter fields (visual-level, page-level, report-level)
- Conditional formatting field references
- Drillthrough fields
- Sort-by fields
- Small multiples fields
CRITICAL: Conditional formatting measures often do NOT appear in the visual's value fields. They are defined in the visual's formatting config under objects → values → backColor / foreColor / fontColor. Always check these separately.
Step 3: Build Dependency Graph
For each object, trace ALL inbound and outbound references:
DAX Reference Parsing
Scan every DAX expression (measures, calculated columns, calculated tables) for:
Reference patterns to detect:
- [MeasureName] -> measure reference
- TableName[ColumnName] -> column reference
- 'Table Name'[ColumnName] -> column reference (quoted table)
- SELECTEDVALUE(Table[Column]) -> column reference
- CALCULATE(..., Table[Column]) -> column reference
- FILTER(TableName, ...) -> table reference
- ALL(TableName) -> table reference
- VALUES(Table[Column]) -> table + column reference
- RELATEDTABLE(TableName) -> table reference + relationship dependency
- RELATED(Table[Column]) -> column reference + relationship dependency
- USERELATIONSHIP(col1, col2) -> specific relationship activation
- TREATAS(...) -> virtual relationship
Build two lists per object:
- References (what this object depends on)
- Referenced By (what depends on this object)
M/Power Query Reference Parsing
Scan M expressions for:
- Source references: = OtherQueryName
- Table.Join / Table.NestedJoin -> which columns used in joins
- Table.SelectColumns -> which columns are kept
- Table.RemoveColumns -> which columns are dropped
- Table.RenameColumns -> column name mappings
- #"Query Name" -> query references (quoted)
Relationship Dependencies
Columns used in relationships are ALWAYS considered active, even if they appear in no visual or DAX expression. Mark them as ACTIVE - Relationship.
Visual Dependencies
Map each visual field reference back to the semantic model:
- Direct measure references
- Direct column references
- Implicit table references (any column from a table makes the table active)
Step 4: Classify Each Object
Assign each object exactly one status:
| Status | Code | Definition |
|---|---|---|
| Used in Visual | V |
Directly in at least one visual's values, rows, columns, legend, tooltip |
| Used in Filter | F |
Used only in filters or slicers |
| Used in CF | CF |
Used only for conditional formatting |
| Referenced by DAX | D |
Not in any visual, but referenced by another measure/calc that IS used |
| Relationship Column | R |
Column required for an active relationship |
| M Dependency | M |
Column/table required by M/Power Query (join key, intermediate query) |
| Referenced by Orphan | O-CHAIN |
Referenced only by objects that are themselves orphaned |
| Orphaned | O |
Not referenced by anything, not in any visual |
| Broken Reference | BROKEN |
References an object that does not exist |
| Circular | CIRC |
Part of a circular dependency chain |
Classification priority (if multiple apply): V > F > CF > D > R > M > O-CHAIN > O
Step 5: Generate Reports
Present findings in this order:
Report A: Object Inventory Summary
Quick stats:
Total tables: X (Y imported, Z calculated)
Total columns: X (Y source, Z calculated)
Total measures: X
Total relationships: X
Reports analyzed: X
Pages analyzed: X
Visuals analyzed: X
Report B: Unused Objects (Safe to Delete)
Sort by impact (highest savings first):
- Unused Calculated Tables — Remove DAX calculated tables first (biggest memory/refresh savings)
- Unused Measures — No data impact, just remove logic
- Unused Calculated Columns — Saves recalculation time
- Unused Source Columns — Requires M/Power Query edit (highest effort)
For each object:
| Object | Type | Table | Status | Risk | Why Unused |
|---|---|---|---|---|---|
| Name | Measure/Column/Table | Parent | O / O-CHAIN | LOW/MED/HIGH | No references found / Only referenced by [other orphan] |
Risk levels:
- LOW — Zero references in DAX, visuals, filters, CF, M. Safe to delete.
- MEDIUM — Referenced only by other orphaned objects. Delete the chain together.
- HIGH — No references found but isHidden=true (might be intentionally hidden for API/external use). Investigate.
Report C: Impact Analysis
For every ACTIVE object, show the dependency chain:
| Object | Direct Dependents | Indirect Dependents | Visuals | Pages | Reports |
|---|---|---|---|---|---|
| Name | [list] | [list] | [list] | [list] | [list] |
When user asks "what if I delete X", trace the full chain and list everything that would break.
Report D: Model Quality Warnings
Check for these issues:
| Category | Check | Severity |
|---|---|---|
| Measures | No description | LOW |
| Measures | No display folder | LOW |
| Measures | Duplicate logic (similar DAX in multiple measures) | MEDIUM |
| Columns | Unused calculated column (expensive for nothing) | MEDIUM |
| Columns | Column with no references and isHidden=false | LOW |
| Relationships | Many-to-Many | HIGH |
| Relationships | Bidirectional cross-filter | MEDIUM |
| Relationships | Inactive relationship | LOW |
| Tables | Table with no relationships (island) | MEDIUM |
| Tables | Calculated table that could be M/Power Query | MEDIUM |
| M/Power Query | Query that disables folding unnecessarily | MEDIUM |
| M/Power Query | Intermediate query not marked as non-reportable | LOW |
| Model | Circular dependency | HIGH |
| Model | Broken references | CRITICAL |
Report E: Cross-Model Analysis (if multiple models)
If multiple semantic models are provided:
- Which reports connect to which models
- Shared table/column/measure names
- Potential consolidation opportunities
- Live connection dependencies (flag external reports risk)
Step 6: Recommend Actions
Provide a prioritized action list:
PRIORITY 1 - Delete Now (zero risk):
- [objects with status O, risk LOW, no hidden flag]
PRIORITY 2 - Delete Together (low risk):
- [orphan chains where all objects in chain are unused]
PRIORITY 3 - Investigate First (medium risk):
- [hidden objects, objects with unclear references]
PRIORITY 4 - Model Optimization:
- [quality warnings, performance improvements]
PRIORITY 5 - Cannot determine (external risk):
- [objects that might be used by Live Connection reports not in this project]
Important Rules
- NEVER assume unused without checking ALL reference types: DAX, M/Power Query, Visuals, Filters, CF, Drillthrough, Slicers, Sort-by, Tooltips, Bookmarks
- M/Power Query is a hidden dependency layer: A column might look unused in DAX but be essential for a merge/join in M
- Relationship columns are ALWAYS active: Even if not in any visual or DAX
- CF measures are invisible in visual fields: Always check formatting config separately
- Hidden objects need investigation: They might be hidden for external tools, API access, or Live Connection reports
- When in doubt, classify as WARNING not ORPHAN: False positives (keeping something unused) are cheaper than false negatives (deleting something needed)
- Always warn about Live Connection risk: Reports outside this project might depend on these objects
- Check isHidden on columns: Hidden columns feeding calculated columns are common and must not be flagged as unused
- Calculated table columns inherit dependency: If a calculated table is used, ALL its columns are considered used
- USERELATIONSHIP activates inactive relationships: Those relationships and their columns become active in that measure's context
Output Formatting
Always use tables for structured data. Keep analysis concise. Lead with actionable findings (what to delete) before detailed analysis.
When the user asks a specific question like "can I delete measure X", skip the full analysis and just trace that one object's dependencies. Show the chain and give a clear YES/NO answer with reasoning.
当前收录版本
0.0.1
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 解决 Power BI 模型清理、性能优化、影响分析等核心痛点
- 覆盖度量值、列、表、M/Power Query、关系和报表视觉对象的全链路依赖分析
- 提供明确的操作建议和风险分级,直接提升用户工作效率
亮点
- 触发词覆盖全面,包括'分析依赖关系'、'查找未使用的'、'影响分析'等关键短语
- 明确列出支持的文件类型(.pbip, model.bim, TMDL等),边界清晰
- description 位置正确,内容完整无截断
待提升项
-
文档长度 原报告严重程度:轻微
文档内容较为详尽,部分章节可能超过推荐长度
改进建议:考虑将部分详细说明拆分为子章节或附录,提升可读性
亮点
- 分析流程步骤清晰,从文件识别到依赖图构建再到报告生成逻辑完整
- 包含详细的文件结构参考和对象分类标准
- 提供了完整的输出格式和优先级建议
待提升项
-
错误处理覆盖 原报告严重程度:轻微
文档详细描述了分析逻辑,但对文件解析失败、格式错误等底层异常的处理说明不够具体
改进建议:补充文件验证和错误恢复机制的具体实现建议
亮点
- 明确了10条重要规则,覆盖隐藏依赖、关系列、条件格式等易错点
- 提供了风险分级机制,避免误删关键对象
- 包含模型质量检查清单,提升分析结果的可靠性
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。