Skip to content
Skill

Git sync

Sync Metabase content with a git remote: import, export, branches and conflict checks

Git sync is an open-source agent skill for developer tools. It is available on Claude Code.

Scripts
None
Platforms
Claude Code
GitHub stars
20
Last commit
License
AGPL-3.0
Listing updated

Similar skills

About Git sync

Git sync moves Metabase content such as cards, dashboards, transforms, snippets, collections and Library-published table metadata between a Metabase instance and a git repository, driven through the mb git-sync command set. It gives the agent status, dirty and remote-change checks, import and export with a branch guard, a preflight preview before pushing, branch creation and stashing, and toggling collections in or out of sync scope.

The skill sets an order of operations: read the sync state before importing or exporting, preview the push, and avoid retrying after a conflict. It also explains how to handle changes made inside the instance versus changes made as files in the repo, and it warns against force operations without explicit user approval.

It expects a Metabase instance with remote sync configured and an authenticated mb CLI profile. Content is stored as YAML using name-based references, and the skill refers to other Metabase skills for query and visualization formats.

When your agent uses it

Round-trip Metabase content (cards, dashboards, transforms, snippets, collections, Library-published table/field metadata) between an instance and a git remote via `mb git-sync …` — status, dirty / has-remote-changes checks, import, export (with branch guard and a preflight preview), branches, stash, add/remove a collection from sync. Load when the user wants to "import the latest changes", "export to git", "push my changes to the repo", "open a PR with my Metabase changes", "git sync", "dirty check", "stash before pulling", "add a collection to sync", or anything `mb git-sync …`.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (23 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

Copy the skill folder to ~/.claude/skills/git-sync to use it in all your projects:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/metabase/metabase-cli.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/git-sync &&
cp -R "$tmp/packages/cli/skill-data/git-sync" ~/.claude/skills/git-sync &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/git-sync inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/git-sync to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/metabase/metabase-cli.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/git-sync &&
cp -R "$tmp/packages/cli/skill-data/git-sync" ~/.agents/skills/git-sync &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/git-sync inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/git-sync to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/metabase/metabase-cli.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/git-sync &&
cp -R "$tmp/packages/cli/skill-data/git-sync" ~/.cursor/skills/git-sync &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/git-sync inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/metabase/metabase-cli.git --path packages/cli/skill-data/git-sync

Or copy the folder to ~/.gemini/skills/git-sync yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/git-sync:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/metabase/metabase-cli.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/git-sync &&
cp -R "$tmp/packages/cli/skill-data/git-sync" ~/.copilot/skills/git-sync &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/git-sync inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/metabase/metabase-cli.git

Then copy metabase-cli/packages/cli/skill-data/git-sync into your agent's skills folder as git-sync. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Status and change checks
Reads sync configuration, dirty objects, in-flight tasks and whether the remote has unimported commits.
Import and export workflow
Pulls remote content into the instance or pushes instance changes to a git branch with polling.
Export preflight preview
Dry-runs a push against the live remote to report conflicts and what a merge would apply.
Conflict recovery guidance
Lays out safe options for resolving a conflict through a reviewed pull request.
Branch management
Lists remote branches, creates sync branches and stashes current state onto a new branch.
Collection sync scope
Adds or removes collections from sync, including the read-only mode prerequisite and dependency rules.

Good for

  • Import the latest changes from the repo into my Metabase instance
  • Export my dashboard and card edits to a feature branch
  • Open a pull request with my Metabase changes
  • Check whether the remote has commits I have not imported yet
  • Add a collection to git sync and stash my current work

Git sync FAQ

Does Git sync need a Metabase instance with remote sync configured?

Yes. Import, export, has-remote-changes and export-preflight return an error when remote sync is not configured.

Will Git sync push to main automatically?

No. Before exporting, the skill checks the tracked branch and asks the user whether to switch to a feature branch if it is main or master.

Are force import or force export run by default?

No. The skill requires explicit user confirmation before running either force option, since one discards instance work and the other overwrites the remote.

What is the default commit message on export?

If no message is passed with -m, the server picks a generic default message.

How do I install Git sync in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/git-sync to use it in all your projects, or to .claude/skills/git-sync in one project.

Does Git sync run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Git sync?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

What are the best alternatives to Git sync?

The closest alternatives to Git sync are Sync CLI skill, Harness sync, Metabase CLI, Docs sync edho ferdian and Git workflow.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from metabase/metabase-cli

  1. Guides an agent to write end-to-end tests that run the built CLI against real Metabase

    • Open source
    • 20 GitHub stars
    • Developer tools
  2. Writes unit and Playwright tests for a Metabase data app with mocked queries and actions

    • Open source
    • 20 GitHub stars
    • Developer tools
  3. Plans fixtures, expectations and coverage for testing a transform's logic on known rows

    • Open source
    • 20 GitHub stars
    • Analytics and data
  4. Guides an agent to add a Metabase API resource across client, CLI and e2e tests

    • Open source
    • 20 GitHub stars
    • Analytics and data
  5. Sweeps a whole repository for architectural drift using parallel read-only review passes

    • Open source
    • 20 GitHub stars
    • Developer tools
  6. Runs a strict end-of-task review that flags architectural drift before work is marked done

    • Open source
    • 20 GitHub stars
    • Developer tools