c-sharp-scripting — Claude Code skill: automate Power BI models with C#
c-sharp-scripting is a Claude Code skill that runs C# scripts through Tabular Editor 2/3 to automate bulk changes to Power BI measures, columns, calculation groups, and model security.
GPL-3.0 ★ 1,104 updated 2026-10-28
/plugin marketplace add data-goblin/power-bi-agentic-development
/plugin install tabular-editor@power-bi-agentic-developmentWhat c-sharp-scripting does
This skill exposes the full Tabular Object Model API and LINQ methods for Power BI objects. Write C# scripts directly in Claude Code and run them locally via Tabular Editor CLI or IDE. The skill activates automatically when you mention C# scripts, macros, TOM API, or ask to automate model changes.
Core libraries are pre-loaded: System, System.Linq, System.Data, Newtonsoft.Json, TabularEditor.TOMWrapper, and Microsoft.AnalysisServices.Tabular. Scripts access the Model object to read and modify tables, measures, calculated columns, security roles, and DAX expressions. WinForms dialogs and output methods let you build interactive scripts and display results.
Key constraints: every C# statement requires a semicolon, strings use double quotes with backslash escaping, folder paths use forward slashes. Test scripts on a copy of your model first; changes are reversible via Ctrl+Z in the Tabular Editor UI, but the CLI cannot undo writes.
What it helps with
- Apply a single formula or format to dozens of measures without editing each one manually
- Create and populate a calculation group with multiple calculation items
- Set up row-level and object-level security across several tables in one operation
- Standardize measure names, display folders, and number formats across the entire model
- Export model metadata (properties, descriptions, DAX formulas) to a file for version control
Example prompts for the agent
- Write a C# script that applies format string
$#,0to all measures with 'Amount' in their name - Create a Tabular Editor macro that moves all calculated columns into a Display Folder called Utility
- Write a TOM script to list all tables and columns in the model and save the list to
metadata.txt
How to install c-sharp-scripting
1Plugin marketplace
/plugin marketplace add data-goblin/power-bi-agentic-development/plugin install tabular-editor@power-bi-agentic-developmentThis installs the whole tabular-editor plugin with all its skills
2Skills CLI (Vercel)
npx skills add data-goblin/power-bi-agentic-development --skill c-sharp-scripting -a claude-code3Manually: put the files in place
~/.claude/skills/c-sharp-scripting/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/c-sharp-scripting/
1Skills CLI (Vercel)
npx skills add data-goblin/power-bi-agentic-development --skill c-sharp-scripting -a codex2Manually: put the files in place
.agents/skills/c-sharp-scripting/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add data-goblin/power-bi-agentic-development --skill c-sharp-scripting -a cursor2Manually: put the files in place
.cursor/skills/c-sharp-scripting/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install data-goblin/power-bi-agentic-development plugins/tabular-editor/skills/c-sharp-scripting2Manually: put the files in place
.github/skills/c-sharp-scripting/SKILL.md1Skills CLI (Vercel)
npx skills add data-goblin/power-bi-agentic-development --skill c-sharp-scripting -a gemini-cli2Platform CLI
gemini skills install https://github.com/data-goblin/power-bi-agentic-development --path plugins/tabular-editor/skills/c-sharp-scriptingManually: put the files in place
.devin/skills/c-sharp-scripting/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about c-sharp-scripting
How do I install c-sharp-scripting in Claude Code?
Run /plugin marketplace add data-goblin/power-bi-agentic-development, then /plugin install tabular-editor@power-bi-agentic-development. Alternatively, use npm: npx skills add data-goblin/power-bi-agentic-development --skill c-sharp-scripting -a claude-code. Then check ~/.claude/skills/c-sharp-scripting/SKILL.md.
What does c-sharp-scripting do?
It lets you write C# scripts to automate Power BI semantic model changes. You can modify metadata (names, formats, folders), create calculation groups, manage security roles, and perform other operations via the Tabular Editor TOM API.
Which C# versions are supported?
Tabular Editor 2 uses the default compiler; Tabular Editor 3 supports C# 12 with the Roslyn compiler. To use newer C# features in TE2, configure the Roslyn compiler path in File > Preferences > General.