Agent skill · Audited from source
C Sharp Scripting
skill · data-goblin/power-bi-agentic-developmentGPL-3.0 licenceAudited 13 Oct 2026 · source b8d9b0f3c97a
Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit b8d9b0f3c97a and found no filesystem, network or shell access and no hard-coded secrets. What it does: Writing and executing C# scripts and macros against Power BI semantic models using Tabular Editor 2/3. Automatically invoke when the user mentions "C# script", "Tabular Editor script", "TOM scripting",…
Cite
Cite this page
ModelsAtlas. “C Sharp Scripting (data-goblin/power-bi-agentic-development)”. Retrieved 13 Oct 2026. https://modelsatlas.com/skills/data-goblin/c-sharp-scripting
Trust audit
Audit 0.4.1 · source read 13 Oct 2026
SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 17,406 of 18,389 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 0 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | PASS | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | PASS | 1 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: no behavioural pass.
Findings (1)
INFOPrompt injectionprompt.authority_framing · object-types/roles.md:23
| `Administrator` | Full access |
- Why
- No further detail recorded for this rule.
- Fix
- —
Audit 0.4.1 · source sha b8d9b0f3c97a · 13 Oct 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- Publisherdata-goblin GitHub userOwner of the repository this skill is read from
- Source folderdata-goblin/power-bi-agentic-development/plugins/tabular-editor/skills/c-sharp-scriptingThe exact folder we audited
- LicenceGPL-3.0As the repository states it
- Commit pinned for this verdictb8d9b0f3c97aA new audit runs when the source changes
- Repository statusNot archivedPushed today
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: Writing and executing C# scripts and macros against Power BI semantic models using Tabular Editor 2/3. Automatically invoke when the user mentions "C# script", "Tabular Editor script", "TOM scripting",…
---
name: c-sharp-scripting
description: Writing and executing C# scripts and macros against Power BI semantic models using Tabular Editor 2/3. Automatically invoke when the user mentions "C# script", "Tabular Editor script", "TOM scripting", "MacroActions.json", "XMLA", or asks to "automate model changes", "bulk update measures", "create calculation groups", "write a macro", "format DAX expressions", "manage model metadata".
---
# C# Scripting for Tabular Editor
Expert guidance for writing and executing C# scripts to manipulate Power BI semantic model metadata using Tabular Editor 2/3 CLI or the Tabular Editor IDE.
## When to Use This Skill
Activate automatically when tasks involve:
- Writing C# scripts for Tabular Editor
- Bulk operations on model objects (measures, columns, tables)
- Creating or modifying calculation groups
- Managing model security (roles, RLS, OLS)
- Formatting DAX expressions
- Automating repetitive model changes
- Querying model metadata via TOM API
- Building interactive scripts with user input dialogs
## Critical
- Every statement must end with `;` (semicolon required by C#)
- Use double quotes `"` for strings and escape with `\` when needed
- Use forward slashes `/` in DisplayFolder paths (auto-converted to `\`)
- Always add `Info()` statements for debugging - script stops at error point
- Test scripts on non-production models first
- Changes are undoable with Ctrl+Z in the Tabular Editor UI
## C# Version Support
| Environment | C# Version | Notes |
|-------------|------------|-------|
| **Tabular Editor 2** | Default compiler | Older C# syntax |
| **Tabular Editor 3** | Roslyn | Supports up to C# 12 with VS2022 |
| **TE2 with Roslyn** | Configurable | Set in File > Preferences > General |
To use newer C# features in TE2, configure Roslyn compiler path in preferences.
## Default Imports and Assemblies
### Auto-Imported Namespaces
Scripts automatically have these `using` statements applied:
```csharp
using System;
using System.Linq;
using System.Collections.Generic;
using Newtonsoft.Json;
using TabularEditor.TOMWrapper;
using TabularEditor.TOMWrapper.Utils;
using TabularEditor.UI;
```
### Pre-Loaded Assemblies
These .NET assemblies are loaded by default:
- `System.Dll`
- `System.Core.Dll`
- `System.Data.Dll`
- `System.Windows.Forms.Dll` (for UI dialogs)
- `Microsoft.Csharp.Dll`
- `Newtonsoft.Json.Dll`
- `TomWrapper.Dll`
- `TabularEditor.Exe`
- `Microsoft.AnalysisServices.Tabular.Dll`
### Adding External Assemblies
```csharp
// Assembly references must be at the very top of the file:
#r "System.IO.Compression"
#r "System.Drawing"
// Using statements come after assembly references:
using System.IO.Compression;
using System.Drawing;
```
## Prerequisites
### For Tabular Editor CLI
| Requirement | Description |
|-------------|-------------|
| **Tabular Editor 2 CLI** | Download from [GitHub releases](https://github.com/TabularEditor/TabularEditor/releases) |
| **XMLA Read/Write** | Enabled on Fabric capacity or Power BI Premium |
| **Azure Service Principal** | For XMLA connections (see authentication.md) |
### Environment Variables (for XMLA)
```
AZURE_CLIENT_ID=<app-id>
AZURE_TENANT_ID=<tenant-id>
AZURE_CLIENT_SECRET=<secret>
```
## Execution Methods
### 1. Tabular Editor CLI
```bash
# Inline script
TabularEditor.exe "WorkspaceName/ModelName" -S "Info(Model.Database.Name);"
# Script file
TabularEditor.exe "WorkspaceName/ModelName" -S "script.csx"
```
### 2. Connection Types
| Type | Format | Example |
|------|--------|---------|
| **XMLA** | `workspace/model` | `"Sales WS/Sales Model"` |
| **Local BIM** | `path/to/model.bim` | `"./model.bim"` |
| **Local TMDL** | `path/to/definition/` | `"./MyModel.SemanticModel/definition/"` |
| **PBI Desktop** | `localhost:PORT` | `"localhost:52123"` |
## Core Objects
### The `Model` Object
Access any object in the loaded Tabular Model:
```csharp
Model // Root model object
Model.Tables // All tables
Model.Tables["Sales"] // Specific table
Model.AllMeasures // All measures across all tables
Model.AllColumns // All columns across all tables
Model.Relationships // All relationships
Model.Roles // All security roles
Model.CalculationGroups // All calculation groups
Model.Perspectives // All perspectives
Model.Cultures // All translations/cultures
Model.Expressions // All M expressions (shared queries)
Model.DataSources // All data sources
```
### The `Selected` Object
Access objects currently selected in the TOM Explorer (IDE only):
```csharp
// Plural form - collections (safe even when empty)
Selected.Tables // Selected tables
Selected.Measures // Selected measures
Selected.Columns // Selected columns
Selected.Hierarchies // Selected hierarchies
// Singular form - single object (error if not exactly one selected)
Selected.Table // The single selected table
Selected.Measure // The single selected measure
Selected.Column // The single selected column
// Set properties on multiple objects at once
Selected.Measures.DisplayFolder = "Test";
Selected.Columns.IsHidden = true;
// Bulk rename with pattern
Selected.Measures.Rename("Amount", "Value");
```
When a Display Folder is selected, all child items are included in the selection.
## LINQ Fundamentals
LINQ is essential for filtering and transforming TOM collections. See **`references/linq-reference.md`** for the full method table, lambda syntax, and examples.
Key methods: `Where()`, `First()`, `FirstOrDefault()`, `Any()`, `All()`, `Count()`, `Select()`, `OrderBy()`, `ForEach()`, `ToList()`.
```csharp
// Common pattern: filter, chain, act
Model.AllMeasures
.Where(m => m.Name.Contains("Revenue"))
.Where(m => string.IsNullOrEmpty(m.FormatString))
Excerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit b8d9b0f
git clone https://github.com/data-goblin/power-bi-agentic-development git -C power-bi-agentic-development checkout b8d9b0f3c97a
The author documents no install command, so this uses the repository directly. Our verdict covers commit b8d9b0f3c97a only.
Works in which agents?
What its own text says, not a test
| Agent | Status | More |
|---|---|---|
| Claude Code | Mentioned in its text, not tested | Skills for Claude Code · About Claude Code |
Audit history
Every audit, every source change
- ✓SAFE B 89 / 100
first audit · source
b8d9b0f3c97a
README badge
For maintainers · shows the latest audit
[](https://modelsatlas.com/skills/data-goblin/c-sharp-scripting/)
The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.
Similar skills
All data & analysis skills →data-goblin/power-bi-agentic-development
Automatically invoke this skill whenever the user asks about Fabric tenant settings or Power BI tenant settings or auditing tenant settings. You can use this skill if the user mentions "Fabric administration".
data-goblin/power-bi-agentic-development
Interactive BPA rule generation for Power BI semantic models; guided discovery, model investigation, and expert rule authoring. Automatically invoke when the user mentions "BPA rule", "Best Practice Analyzer", or asks…
data-goblin/power-bi-agentic-development
TOM and ADOMD.NET guidance via PowerShell for connecting to Power BI Desktop's local Analysis Services instance. Covers model enumeration, DAX queries, metadata modification, annotations, calendar definitions, field…
data-goblin/power-bi-agentic-development
Step-by-step workflow for creating complete Power BI reports from scratch using pbir CLI. Covers model discovery, report creation, page layout, theme setup, visual placement, field binding, filtering, formatting,…
data-goblin/power-bi-agentic-development
DAX performance optimization for semantic models. Automatically invoke when the user asks to "optimize DAX", "fix slow DAX", "DAX performance", "tune a measure", "debug a measure", "DAX anti-patterns", or mentions slow…
data-goblin/power-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…
Add this badge to your README
[](https://modelsatlas.com/skills/data-goblin/c-sharp-scripting/)
<a href="https://modelsatlas.com/skills/data-goblin/c-sharp-scripting/"><img src="https://modelsatlas.com/skills/data-goblin/c-sharp-scripting/badge.svg" alt="ModelsAtlas: SAFE B"></a>
Questions about C Sharp Scripting
What does the C Sharp Scripting skill do?
Is C Sharp Scripting safe to install?
What can C Sharp Scripting access on my machine?
Which assistants does C Sharp Scripting work with?
How current is this page?
Sources
- github.com/data-goblin/power-bi-agentic-development/tree/main/pl — the audited source at commit b8d9b0f3c97a and every finding aboveObserved · 13 Oct 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the C Sharp Scripting skill do?
- Is C Sharp Scripting safe to install?
- What can C Sharp Scripting access on my machine?