Agent skill · Documentation

c-sharp-scripting

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".

data-goblingithub.com/data-goblinGitHub ↗
claude-codecopilotships scriptsGPL-3.0
Install
npx skills add data-goblin/power-bi-agentic-development --skill c-sharp-scripting --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 228
SKILL.md size: 15 KB
Bundled scripts: yes
Path: plugins/tabular-editor/skills/c-sharp-scripting/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 833
Language: C#

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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 |

What's inside
Steps it walks through
  1. When to Use This Skill
  2. Critical
  3. C# Version Support
  4. Default Imports and Assemblies
  5. Auto-Imported Namespaces
  6. Pre-Loaded Assemblies
  7. Adding External Assemblies
  8. Prerequisites
  9. For Tabular Editor CLI
  10. Environment Variables (for XMLA)
  11. Execution Methods
  12. 1. Tabular Editor CLI
  13. 2. Connection Types
  14. Core Objects
Ships with 24 files
  • examples/README.md
  • examples/bulk-operations/README.md
  • examples/bulk-operations/add_descriptions_to_all.csx
  • examples/bulk-operations/add_expression_to_descriptions.csx
  • examples/bulk-operations/clean_object_names.csx
  • examples/bulk-operations/create_measures_from_columns.csx
  • examples/bulk-operations/initialize_model.csx
  • examples/bulk-operations/sync_folders_from_names.csx
  • examples/bulk-operations/update_descriptions_from_comments.csx
  • examples/bulk-operations/validate_and_fix_issues.csx
  • examples/calculation-groups/README.md
  • examples/calculation-groups/currency_conversion.csx
  • examples/calculation-groups/time_intelligence.csx
  • examples/columns/README.md
  • examples/columns/add-calculated-column.csx
  • examples/columns/add_calculated_column.csx
  • examples/columns/disable-available-in-mdx.csx
  • examples/columns/disable_summarization.csx
  • examples/columns/get-column-cardinality.csx
  • examples/columns/get-column-sizes.csx
  • examples/columns/hide_key_columns.csx
  • examples/columns/hide_keys.csx
  • examples/columns/modify-calculated-column-expression.csx
  • examples/columns/set-alignment.csx
first 24 of 228
Commands it runs
Inline script
TabularEditor.exe "WorkspaceName/ModelName" -S "Info(Model.Database.Name);"
Script file
TabularEditor.exe "WorkspaceName/ModelName" -S "script.csx"
More from power-bi-agentic-development
All skills →
About this skill
What does the c-sharp-scripting skill do?

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".

How do I install it?

Run `npx skills add data-goblin/power-bi-agentic-development --skill c-sharp-scripting --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From data-goblin/power-bi-agentic-development, a repository with 833 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going