microsoft/skills-for-fabric/git-integration-operations-cli
Claude Code and agent skill by microsoft/skills-for-fabric
- vendor
Checking that the SKILL.md file is still in the repository.
Runs the Fabric Git integration lifecycle through fab api or az rest, including connecting a workspace to Azure DevOps or GitHub, committing, updating from Git, reading sync status, resolving conflicts, disconnecting a connected workspace, and automating sync with a service principal. For stage promotion use deployment-pipelines-authoring-cli. Branch switching, fab deploy, fabric-cicd and cross-workspace rebinding are out of scope.
Install
npx vskill@latest install microsoft/skills-for-fabric/git-integration-operations-cliSKILL.md
The same SKILL.md was published earlier as microsoft/skills-for-fabric/git-integration-operations-cli.
Telemetry — MANDATORY. Everyapi.fabric.microsoft.comcall must carryx-ms-fabric-skill: git-integration-operations-cli(az rest:--headers "x-ms-fabric-skill=git-integration-operations-cli"),including every LRO poll,fabric_lroand retry. Snippets omit it — add it anyway.
CRITICAL NOTES1. To find a workspace ID from its name: list all workspaces, then filter bydisplayNamewith JMESPath. To find an item ID: list items of that type in theworkspace, then filter bydisplayName.2. All Git operations are control plane calls againsthttps://api.fabric.microsoft.com. Runfab auth loginonce andfab apisets the base URL and Fabric token audience automatically. With theaz restfallback you must pass the matching--resourceyourself, or you get a 401.3.commitToGit,updateFromGit, and evengit/statuscan return **HTTP 202(long-running operation)**, not just a synchronous body. On202, poll theoperation: withfab, readx-ms-operation-idfrom--show_headersand pollfab api operations/{id}untilstatusisSucceeded; with theaz restfallback, poll theLocation/x-ms-operation-idheader (see COMMON-CORElong-running operation polling). When a202came fromgit/statusitself,read its body fromoperations/{id}/result(thegit_statushelper doesthis); callinggit/statusagain can just return another202. After acommitToGit/updateFromGitoperation succeeds, read status withgit_statusto confirmworkspaceHead == remoteCommitHash, and do not acton itschangesuntil the heads match. (Learn: rest/api/fabric/core/git andfabric/cicd/git-integration/git-automation.)4.updateFromGitrequires the workspace's currentworkspaceHead; a stalevalue returns400 WorkspaceHeadMismatch. Always readgit/statusfirst.5. Prerequisites for every Git operation: the workspace must be assigned to acapacity (an unassigned workspace fails withWorkspaceHasNoCapacityAssigned),and the caller (user or service principal) must hold the right workspacerole: connect and disconnect require Admin; **commit and update require atleast Contributor with write permission on all items; branch switchingrequires Admin** (or Contributor when the workspace opt-in setting *Allow userswith at least Contributor role to change Git branch* is on). Only one Gitoperation may run against a workspace at a time.6. Tenant admin switches gate Git integration and are a common cause of anunexplained failure. The GitHub sync switch is off by default (enable itbefore any GitHub connect); Azure DevOps sync is on by default. Cross-regionworkspace-to-Azure-repo needs the cross-geo export switch (GitHub does notenforce it). See references/git-integration-concepts.md § Tenant admin prerequisites.
Git Integration Operations — CLI Skill
Automate the Fabric Git integration lifecycle (connect, commit, update, status, disconnect) from CLI environments. Whether cross-workspace item references rebind after promotion is a separate concern, determined by the item definition format (logical vs object IDs) rather than the Git lifecycle itself.
Prerequisite Knowledge
Read these shared references first (paths assume this skill lives under skills/git-integration-operations-cli/ in skills-for-fabric; adjust when drafting outside the repo):
- COMMON-CLI.md § Finding Workspaces and Items in Fabric — Mandatory for resolving workspace/item IDs by name.
- COMMON-CORE.md § Authentication & Token Acquisition — wrong audience = 401; read before any auth issue.
- COMMON-CLI.md § Authentication Recipes —
az loginflows and token acquisition for CLI. - COMMON-CLI.md § Fabric Control-Plane API via az rest — the
az restfallback path (always pass `--resource`); includes LRO polling helpers. - COMMON-CORE.md § Core Control-Plane REST APIs — pagination, long-running-operation polling, rate limiting.
Table of Contents
Must/Prefer/Avoid
MUST DO
- Read
git/statusand pass the currentworkspaceHeadinto everycommitToGit
and updateFromGit call.
- Generate a meaningful
commitToGitcomment of at most 300 characters. If the
requested text is longer, rewrite it concisely before the API call while preserving intent; do not silently cut it mid-sentence. Retry once, with a rewritten comment strictly shorter than the rejected one, only when Fabric explicitly reports a comment-length validation error.
- Poll
git/statusafter each async operation until
workspaceHead == remoteCommitHash and the changes array is empty. A 202/Succeeded status is not proof of a correct sync — validate the state.
- Deploy an item together with the items it references in the same commit, so
logical IDs can resolve inside the target workspace.
MUST NEVER
- Never run two Git operations concurrently on the same workspace — a second
commitToGit/updateFromGit while one is still Running corrupts head tracking. Serialize: poll the first to Succeeded before starting the next.
- Never treat a workspace as both a source of truth and a CI/CD push target
on the same branch. Pick one writer per branch: either humans commit from the workspace, or automation pushes to Git — not both at once.
PREFER
fab api(afterfab auth login) as the primary driver: it sets the base
URL and Fabric token audience automatically, avoiding the 401 wrong-audience trap. Use az rest with --resource "https://api.fabric.microsoft.com" as the fallback when fab is unavailable or you need fine-grained header control.
PreferRemoteconflict resolution for a clean "pull latest from Git" into a
downstream/target workspace.
AVOID
- Reusing a stale
workspaceHead(causes400 WorkspaceHeadMismatch). - Passing request bodies via stdin to
fab api(use-i <file.json>or-i '<inline JSON>').
CLI: fab primary, az rest fallback
Every operation below is shown with fab api. Run fab auth login once (it supports service principals for automation); fab then handles the base URL and token audience for you. The identical call on the az rest fallback is a mechanical translation:
Authenticate `fab` for the identity you are running as:
A service principal or managed identity must be workspace Admin to connect or disconnect (at least Contributor with write on all items is enough for commit/update) and (for the ConfiguredConnection path) hold the git provider credentials. See references/automation-templates.md for full pipeline scripts.
fab api <endpoint>becomesaz rest --method GET --url "https://api.fabric.microsoft.com/v1/<endpoint>" --resource "https://api.fabric.microsoft.com".fab api -X post <endpoint> -i body.jsonadds--method POST --headers "Content-Type=application/json" --body @body.json.
fab api reads a request body via -i from either a file path or an inline JSON string (e.g. -i '{"displayName":"..."}') — never from stdin. It prints {"status_code": <code>, "text": <parsed body>} (add --show_headers for a top-level headers object), so read response fields with jq -r '.text.<field>' and the LRO id with jq -r '.headers["x-ms-operation-id"]'. See Example 2 for a full az rest pair.
Pre-Flight (before you connect)
Run these Git-relevant checks in order before git/connect. Each failure has a specific fix — resolving them up front avoids the most common connect-time errors.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files. Certified 14 Nov 2026.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/git-integration-operations-cli/SKILL.md
Popularity
- Repository stars
- 1,002
- Repository forks
- 284
- 7-day trend score
- 35
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/microsoft/skills-for-fabric/git-integration-operations-cli)