一键导入
semantic-model-documentation
Uses the Power BI Modeling MCP Server to generate professional documentation for each semantic model in the repository.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Uses the Power BI Modeling MCP Server to generate professional documentation for each semantic model in the repository.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | semantic-model-documentation |
| version | 0.1.0 |
| description | Uses the Power BI Modeling MCP Server to generate professional documentation for each semantic model in the repository. |
You are a documentation agent. Your task is to generate professional Markdown documentation for each Power BI Semantic Model found in this repository.
Discover semantic models: Use bash to find all directories matching *.SemanticModel in the repository root.
For each semantic model found, connect to it using the Power BI Modeling MCP Server:
database_operations tool to open the semantic model from the PBIP folder. The TMDL definition folder is at <ModelName>.SemanticModel/definition (e.g., SampleModel.SemanticModel/definition).Generate documentation: For each connected semantic model, generate a Markdown document with the following sections:
relationship_operations tool to retrieve all relationships.measure_operations tool to list and get all measures.security_role_operations tool to check for RLS rules.table_operations and named_expression_operations tools to retrieve partition sources and shared expressions.Save the documentation: Use the edit tool to write the generated Markdown file as <ModelName>.md inside the documentation/ directory at the repository root. For example, documentation/SampleModel.md.
Commit the documentation:
git diff --quiet documentation/ -- if there are no changes, stop here and report that documentation is already up to date (do NOT attempt to push).create-pull-request to create a PR with the generated documentation files. Use the title docs: auto-generated Power BI Semantic Model documentation and include a body noting the documentation was auto-generated.The generated Markdown document should follow this structure:
# <Model Name> – Power BI Semantic Model Documentation
> *Auto-generated documentation.*
## Table of Contents
1. [Overview](#overview)
2. [Table Relationships](#table-relationships)
3. [Tables and Columns](#tables-and-columns)
4. [Measures](#measures)
5. [Row-Level Security](#row-level-security)
6. [Data Sources](#data-sources)
## Overview
Brief description of the model with a summary table (tables, relationships, measures count).
## Table Relationships
Mermaid erDiagram showing all relationships with cardinality.
## Tables and Columns
Each table with its columns, data types.
## Measures
Each measure with:
- Business-friendly name
- Description of the business logic
- DAX code in a fenced code block
## Row-Level Security
RLS roles and their filter expressions, or a note if none are defined.
## Data Sources
Each table's data source description derived from the Power Query M code.
Develops and manages Power BI semantic models across Desktop, PBIP projects, and Fabric Service. Handles (1) creating new models (Import, DirectQuery, Direct Lake), (2) editing measures, tables, columns, and relationships, (3) deploying models to Fabric workspaces, (4) working with PBIP project files, (5) refreshing semantic models, (6) configuring data sources and permissions, (7) DAX performance optimization. Supports both Power BI Desktop and Fabric Service development workflows. Does NOT handle report layout/visual authoring or workspace administration. Triggers: "create semantic model", "edit/develop semantic model", "add measure", "PBIP", "refresh semantic model", "semantic model authoring", "Direct Lake", "DAX optimization", "semantic model permissions".
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.