Skip to main content
skill CX Codex

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

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add data-goblin/power-bi-agentic-development
/plugin install tabular-editor@power-bi-agentic-development
Open on GitHub

What 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 $#,0 to 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-development

This 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-code

3Manually: put the files in place

~/.claude/skills/c-sharp-scripting/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/c-sharp-scripting/

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.

Similar skills

All skills for Automation and no-code: n8n, Zapier, Make →
power-bi-security-rls-best-practices official github The power-bi-security-rls-best-practices is a GitHub Copilot rule that guides DAX role filtering, embedded analytics security, and Fabric Warehouse policies. CX Codex +1 ★ 41,430repo stars powerbi-modeling official github The powerbi-modeling skill helps build and review Power BI semantic models, write DAX, and configure relationships. Use it when the model includes RLS or complex calculations. CX Codex +1 9,934installs logifleet-pulse-supply-chain-analytics reason-machines logifleet-pulse-supply-chain-analytics is a Claude Code skill for planning logistics analytics with MS SQL Server and Power BI. It activates on requests about warehouse and fleet models, reports, or optimization. CX Codex +1 659installs power-bi-retail-analytics-salespulse360 reason-machines power-bi-retail-analytics-salespulse360 is a skill that deploys and tunes the SalesPulse 360 Power BI retail dashboard for revenue tracking, regional margins, and predictive forecasting. CX Codex +1 659installs DAX Terminal n0hb0dy This prompt turns a chat into a DAX terminal: you send a command, you get measure code back with no explanations. Handy when you need a quick formula example for a Power BI data model. GP ChatGPT ★ 178,201repo stars SemanticOps MCP (for Power BI) maxanatsko SemanticOps MCP (for Power BI) is an MCP server that gives AI assistants direct access to Power BI Desktop files to work with DAX measures, table relationships, and model optimization. CX Codex +1 ★ 256repo stars

From the same set59

The whole set →
refresh-semantic-model The refresh-semantic-model Claude Code skill runs and monitors Power BI refreshes, then compares data before and after for a whole model or selected tables and partitions. CX Codex +1 ★ 1,104repo stars paginated-report A skill for authoring, validating, and publishing Power BI paginated reports in RDL format — invoices, statements, regulatory filings. CX Codex +1 ★ 1,104repo stars semantic-model-auditor semantic-model-auditor audits Power BI and Fabric semantic models for memory bottlenecks, schema issues, and DAX anti-patterns by inspecting exported TMDL files. CX Codex +1 ★ 1,104repo stars create-pbi-report create-pbi-report is a Claude Code skill that builds Power BI reports from semantic models, from page planning to validation and publishing. CX Codex +1 ★ 1,104repo stars pbip Guides Claude Code on structuring Power BI Project (PBIP) files, managing thick vs thin reports, and configuring Git tracking. CX Codex +1 ★ 1,104repo stars querying-fabric querying-fabric is a Claude Code skill that builds and tests DAX queries for Fabric and Power BI semantic models. It prepares data for dashboard KPIs, charts, and tables. CX Codex +1 ★ 1,104repo stars review-report review-report — a skill that runs a structured check on a Power BI report, telling you whether people actually open it and giving ranked recommendations. CX Codex +1 ★ 1,104repo stars svg-visuals svg-visuals builds inline SVG charts in Power BI PBIR reports using DAX formulas. Handy for rendering sparklines, bullet bars, and gauges inside tables or card visuals. CX Codex +1 ★ 1,104repo stars

Project sponsors

Companies that keep this analytics open