# Git sync

> Git sync is an open-source agent skill for developer tools. Sync Metabase content with a git remote: import, export, branches and conflict checks. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/metabase/metabase-cli/tree/main/packages/cli/skill-data/git-sync
- **Repository:** https://github.com/metabase/metabase-cli
- **GitHub stars:** 20
- **License:** AGPL-3.0
- **Skill name:** git-sync
- **Collection:** https://github.com/metabase/metabase-cli
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

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 …`.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/metabase/metabase-cli/tree/HEAD/packages/cli/skill-data/git-sync)
- [Asks for: Read, Write, Edit, Bash, AskUserQuestion](https://github.com/metabase/metabase-cli/blob/HEAD/packages/cli/skill-data/git-sync/SKILL.md)
- [License: AGPL-3.0](https://github.com/metabase/metabase-cli/tree/HEAD/packages/cli/skill-data/git-sync)

## Features

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

## Install

### Claude Code

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

```sh
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.

### Codex

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

```sh
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.

### Cursor

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

```sh
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.

### Gemini CLI

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

```sh
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.

### VS Code

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

```sh
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.

### Other agents

Get the folder:

```sh
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.

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

## Alternatives

- [Sync CLI skill](https://ai-powered.com/skills/sync-cli-skill): Sync CLI skill is an open-source agent skill for developer tools.
- [Harness sync](https://ai-powered.com/skills/harness-sync-chachamaru127): Harness sync is an open-source agent skill for developer tools.
- [Metabase CLI](https://ai-powered.com/skills/metabase-cli): Metabase CLI is an open-source agent skill for analytics and data.
- [Docs sync edho ferdian](https://ai-powered.com/skills/docs-sync-edho-ferdian): Docs sync edho ferdian is an open-source agent skill for developer tools.
- [Git workflow](https://ai-powered.com/skills/git-workflow-aws-solutions): Git workflow is an open-source agent skill for developer tools.
- [Git workflow and versioning](https://ai-powered.com/skills/git-workflow-and-versioning): Git workflow and versioning is an open-source agent skill for developer tools.
- [Lovable sync](https://ai-powered.com/skills/lovable-sync): Lovable sync is an open-source agent skill for developer tools.
- [Ljg push](https://ai-powered.com/skills/ljg-push): Ljg push is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/git-sync
