{"slug": "agentbridge-sync-skills-mcp-servers-across-claude-code-codex-antigravity", "title": "AgentBridge – sync skills/MCP servers across Claude Code, Codex, Antigravity", "summary": "AgentBridge, a new open-source tool, synchronizes custom skills, MCP servers, and project rules across Google Antigravity, Claude Code, and OpenAI Codex using a shared hub at ~/.agentbridge/skills with native OS symlinks, eliminating manual copying. The tool merges MCP server definitions into each agent's config files and consolidates project rules from AGENTS.md into CLAUDE.md, GEMINI.md, CODEX.md, .cursorrules, and .github/copilot-instructions.md, with automatic pre-write backups and secret redaction.", "body_md": "Universal Skill & MCP Sync Engine for AI Coding Agents.\n\n**Google Antigravity**, **Claude Code**, and **OpenAI Codex** each keep their own private copy of your custom Skills, MCP servers, and project rules - in different folders, different file formats, none of them aware the others exist. Add a skill or an MCP server to one, and it's invisible to the rest until you copy it over by hand, every time, per agent.\n\nAgentBridge fixes that with one shared hub (`~/.agentbridge/skills`\n\n) that every agent's own skills folder links to directly via a native OS symlink/junction - no daemon, no polling, no elevated privileges. Add a skill once, it's instantly available everywhere. MCP servers and project rules (`AGENTS.md`\n\n→ `CLAUDE.md`\n\n/`GEMINI.md`\n\n/etc.) get merged and mirrored the same way with a single command instead of four manual edits.\n\n```\nflowchart TD\n    CLI[agentbridge CLI / SDK]\n\n    subgraph Core Engine\n        Detector[Client Detector]\n        SkillLinker[Skill Linker & Hub]\n        MCPSync[MCP Synchronizer]\n        Rules[Rule Consolidator]\n        Doctor[Health Diagnostics]\n        Rollback[Backup & Rollback]\n        Watcher[Live File Watcher]\n    end\n\n    CLI --> Detector\n    Detector -.detects installed agents.-> SkillLinker\n    Detector -.detects installed agents.-> MCPSync\n    CLI --> SkillLinker\n    CLI --> MCPSync\n    CLI --> Rules\n    CLI --> Doctor\n    CLI --> Rollback\n    CLI --> Watcher\n    Watcher -.logs change, hub is already live via the link.-> SkillLinker\n    Watcher -->|debounced auto-sync| Rules\n\n    SkillLinker <== \"Junction / Symlink\" ==> Hub[(~/.agentbridge/skills Hub)]\n    Hub <== \"Junction / Symlink\" ==> G[Google Antigravity<br/>~/.gemini]\n    Hub <== \"Junction / Symlink\" ==> C[Claude Code / Desktop<br/>~/.claude]\n    Hub <== \"Junction / Symlink\" ==> O[OpenAI Codex<br/>~/.codex]\n\n    MCPSync <== \"Merge JSON\" ==> G\n    MCPSync <== \"Merge JSON\" ==> C\n    MCPSync <== \"Merge TOML\" ==> O\n\n    Rules -->|source of truth| AGENTS[AGENTS.md]\n    AGENTS -->|sync| CLAUDEMD[CLAUDE.md]\n    AGENTS -->|sync| GEMINIMD[GEMINI.md]\n    AGENTS -->|sync| CODEXMD[CODEX.md]\n    AGENTS -->|sync| CURSORRULES[.cursorrules]\n    AGENTS -->|sync| COPILOT[.github/copilot-instructions.md]\n\n    Rollback -.snapshot before write.-> MCPSync\n    Rollback -.snapshot before write.-> Rules\n```\n\n`Doctor`\n\nreads across the hub and all 3 agents for diagnostics but writes nothing on its own (`--fix`\n\nrepairs broken links directly via the same cross-platform link helper `SkillLinker`\n\nuses, not by calling into `SkillLinker`\n\nitself), so it has no outgoing edges above. `SkillLinker`\n\n's own pre-link backup (see `link-skills`\n\nbelow) is a separate mechanism from `Rollback`\n\n- that's why no edge connects them.\n\nKey safety properties baked into every write path: automatic pre-write backups (`link-skills`\n\n, `sync-mcp`\n\n, `sync-rules`\n\n- see the Commands section below for exactly which mechanism each uses and how to restore), and secrets are never persisted in plain text if an equivalent OS environment variable already exists (see the Secret Redaction note under `sync-mcp`\n\n).\n\n**Skills are shared; MCP servers are copied - and that's deliberate, not a shortcut.** A skill is an isolated unit on disk (a folder with `SKILL.md`\n\nand nothing else mixed in), so every agent's skills directory can just be a symlink/junction into the same hub folder - genuinely one file, visible under multiple paths. Editing it anywhere changes it everywhere instantly, with no sync step needed (`link-skills`\n\nonly has to run once, to create the links).\n\nAn MCP server definition can't work the same way: it's one field inside a much larger config file that also holds each agent's own unrelated settings (Claude's own preferences, Codex's own settings, etc.) - a symlink only works at the whole-file level, and symlinking the *entire* file would leak one agent's unrelated settings into another's. So `sync-mcp`\n\ncopies the merged definition into each agent's config separately - a real, independent copy per agent (plus one more in the hub's own `~/.agentbridge/mcp_servers.json`\n\nregistry, used as a merge source). The tradeoff: MCP servers only stay in sync at the moment you run `sync-mcp`\n\n(or an agent gets re-synced by `link-skills`\n\n/`doctor --fix`\n\n) - edit one agent's server definition by hand and the others won't know until the next sync. `doctor`\n\nand `sync-mcp`\n\nboth detect and warn when two agents have drifted into disagreeing about the same server (see the MCP Server Conflict Detection note under `sync-mcp`\n\nin Commands, below) so drift doesn't go unnoticed between syncs.\n\n**Requirements:** Node.js ≥18.0.0.\n\nRun directly without installing, using `npx`\n\n:\n\n```\nnpx @helter/agentbridge status        # See what's detected - read-only, changes nothing\nnpx @helter/agentbridge link-skills   # Merge skills into the hub, link every agent to it\nnpx @helter/agentbridge sync-mcp      # Merge and mirror MCP servers across agents\nnpx @helter/agentbridge doctor        # Health check\n```\n\nOr install globally for a shorter command:\n\n```\nnpm install -g @helter/agentbridge\nagentbridge status\n```\n\nMost commands accept `--hub <path>`\n\nto override the default `~/.agentbridge/skills`\n\nhub location.\n\n| # | Command | What it does | Key options |\n|---|---|---|---|\n| 1 | `status` |\nOverview: detected agents, skill counts, MCP server counts, hub link status | `--json` , `--hub` |\n| 2 | `pick` (alias `import` ) |\nInteractively choose which skills/MCPs to import | `--target` , `--hub` |\n| 3 | `link-skills` |\nMerge existing skills into the hub, link every agent to it | `--dry-run` , `--no-backup` , `-y` , `--hub` |\n| 4 | `sync-mcp` |\nMerge & mirror MCP servers across all agent configs | `--output` , `--dry-run` , `-y` |\n| 5 | `sync-rules` |\nSync `AGENTS.md` to `CLAUDE.md` /`GEMINI.md` /`CODEX.md` /`.cursorrules` /copilot |\n`--mode` , `--cwd` , `-y` , `--no-backup` |\n| 6 | `add-skill <name>` |\nScaffold a new skill directly in the hub | `--desc` , `--tags` , `--author` , `--hub` |\n| 7 | `doctor` |\nHealth check: broken links, exposed secrets, name/MCP-server conflicts | `--fix` , `--hub` |\n| 8 | `unlink` |\nDisconnect agents from the hub, restore standalone copies | `--no-restore` , `-y` |\n| 9 | `rollback` |\nList or restore automatic backup snapshots | `--list` , `<snapshot-id>` |\n| 10 | `watch` |\nLive auto-sync for the skills hub and `AGENTS.md` |\n`--cwd` |\n\n**Common flags** (same meaning everywhere they appear):\n\n| Flag | Meaning |\n|---|---|\n`-y` , `--yes` |\nSkip the confirmation prompt |\n`--dry-run` |\nPreview what would happen, write nothing to disk |\n`--no-backup` |\nSkip the automatic pre-write backup for this run |\n`--hub <path>` |\nUse a different hub directory instead of `~/.agentbridge/skills` |\n`--json` |\nMachine-readable output instead of the formatted table (`status` only) |\n\nScans the system and presents an ASCII table overview of all installed AI coding agents, skills counts, hub linking status, and configured MCP servers.\n\n```\nagentbridge status\nagentbridge status --json    # Output machine-readable JSON\n```\n\nInteractively multiselect which skills, commands, or MCP servers to import into your active environment.\n\n```\nagentbridge pick\nagentbridge pick --target ./my-skills   # Import into a custom directory instead of the default hub\n```\n\nMigrates existing skills into the central hub (`~/.agentbridge/skills`\n\n) without data loss, then creates transparent directory junctions (Windows) or symbolic links (macOS/Linux).\n\n```\nagentbridge link-skills\nagentbridge link-skills --dry-run     # Preview actions without modifying disk\nagentbridge link-skills --no-backup   # Skip the pre-link snapshot backup\nagentbridge link-skills -y            # Skip confirmation prompt\n```\n\nNote (partial failure):if linking fails partway through more than one agent, the error names which agent actually failed, which agents were already processed before it (their skills may already be merged into the hub), and recommends running`agentbridge doctor`\n\nto check the current state before retrying.\n\nSafely reads MCP server declarations across all detected client configuration files, deep-merges environment variables, command arguments, and server keys, then mirrors them across all agents.\n\n```\nagentbridge sync-mcp\nagentbridge sync-mcp --output ./mcp-unified.json    # Export merged config to standalone file\nagentbridge sync-mcp --dry-run                      # Preview the merge without writing to disk\nagentbridge sync-mcp -y\n```\n\nSecret Redaction:`sync-mcp`\n\nnever writes a plain-text secret to disk if it doesn't have to. Before writing any agent config, it checks each`env`\n\nvalue against your current OS environment variables - if a value exactly matches one (e.g.`GITHUB_PERSONAL_ACCESS_TOKEN`\n\n), it writes`${GITHUB_PERSONAL_ACCESS_TOKEN}`\n\ninstead of the literal value. Set the variable once:\n\n```\n# Windows (PowerShell)\n[System.Environment]::SetEnvironmentVariable('GITHUB_PERSONAL_ACCESS_TOKEN', 'your-token', 'User')\n# macOS/Linux - add to your shell profile (~/.zshrc, ~/.bash_profile, ...)\nexport GITHUB_PERSONAL_ACCESS_TOKEN=your-token\n```\n\nthen run\n\n`agentbridge sync-mcp`\n\nagain - any agent's config still holding the literal value gets rewritten to the`${VAR}`\n\nreference automatically, no matter how many agents you have.`agentbridge doctor`\n\nflags any plain-text secret it finds (with this same fix in its warning text) but never sets an OS environment variable on your behalf - that's a real side effect on your machine only you should trigger, and only you know the right value.\n\nMCP Server Conflict Detection:if two agents independently define a server with the same name but genuinely different`command`\n\n,`args`\n\n, or an overlapping`env`\n\nkey with a different value,`sync-mcp`\n\nmerges them field-by-field - the later-processed agent's value silently wins on the fields that actually conflict (an env key present in only one side isn't a conflict; both survive).`sync-mcp`\n\nprints a warning naming the server, which fields disagreed, and which agents disagreed;`agentbridge doctor`\n\nreports the same thing as a persistent check (\"MCP Server Conflicts\") so it shows up even between syncs. Neither auto-resolves it - only you know which agent's definition should actually win. Re-run`sync-mcp`\n\nafter fixing the losing agent's config directly, or edit the merged result via`sync-mcp --output`\n\n.\n\nSynchronizes project-level agent rules. Reads `AGENTS.md`\n\nas the single source-of-truth and mirrors or symlinks it to `CLAUDE.md`\n\n, `GEMINI.md`\n\n, `CODEX.md`\n\n, `.cursorrules`\n\n, and `.github/copilot-instructions.md`\n\n.\n\n```\nagentbridge sync-rules\nagentbridge sync-rules --mode symlink    # Create symlinks instead of auto-sync copies\nagentbridge sync-rules --cwd ./my-repo\nagentbridge sync-rules -y                # Skip confirmation prompt\nagentbridge sync-rules --no-backup       # Skip snapshotting existing target files before overwriting\n```\n\nNote (creating a real file symlink requires Developer Mode or an elevated shell. Without either, AgentBridge transparently falls back to a hardlink, which stays in sync when`--mode symlink`\n\non Windows):`AGENTS.md`\n\nis edited in place but can go stale if it's replaced outright (e.g. some editors' \"atomic save\" does a delete + rewrite). The CLI output tells you which one you actually got (`Symlinked to source`\n\nvs`Hardlinked to source`\n\n) - if you see the latter and need true symlinks, enable Developer Mode or run as admin, then re-run the command.\n\nScaffolds a new skill directory in the central hub with a standard `SKILL.md`\n\ntemplate containing YAML frontmatter.\n\n```\nagentbridge add-skill database-migration --desc \"Automated PostgreSQL schema migration recipes\" --tags db,sql,migrations --author \"Your Name\"\n```\n\nRuns health diagnostics: audits plain-text tokens and secrets in MCP configs, detects skill name collisions and same-named MCP servers with conflicting definitions across agents, checks junction integrity, and repairs broken links with `--fix`\n\n.\n\n```\nagentbridge doctor\nagentbridge doctor --fix     # Automatically repair broken links and missing folders\n```\n\nNote (exit codes):without`--fix`\n\n, any warning or error in the report exits`1`\n\n(broken links, exposed secrets, and skill-name collisions are all reported at`warning`\n\nseverity, so this catches them too) - so`agentbridge doctor && deploy`\n\nstops before a real problem. With`--fix`\n\n, the exit code reflects the repair pass instead and is`0`\n\nonce it has run.\n\nSafely disconnects agents from the central hub, removing junctions/symlinks and restoring independent directories with copies of hub skills.\n\n```\nagentbridge unlink\nagentbridge unlink --no-restore     # Disconnect without copying hub skills back\nagentbridge unlink -y               # Skip confirmation prompt\n```\n\nLists timestamped backup snapshots from `~/.agentbridge/backups/`\n\nand restores configurations to an earlier state.\n\n```\nagentbridge rollback\nagentbridge rollback --list                 # List all available snapshots\nagentbridge rollback snapshot-1787674932079 # Restore a specific snapshot directly by ID\n```\n\nStarts a lightweight live file watcher that monitors the central skills hub and workspace `AGENTS.md`\n\n, automatically synchronizing changes in real time.\n\n```\nagentbridge watch\nagentbridge watch --cwd ./my-repo   # Watch a specific project root instead of the current directory\n```\n\n| AI Coding Agent | Config Directory | Skills Directory | MCP Config Path | Rules Target |\n|---|---|---|---|---|\nGoogle Antigravity |\n`~/.gemini/config` |\n`~/.gemini/config/skills` |\n`mcp_config.json` |\n`GEMINI.md` |\nClaude Code |\n`~/.claude` |\n`~/.claude/skills` |\n`claude_desktop_config.json` |\n`CLAUDE.md` |\nOpenAI Codex |\n`~/.codex` |\n`~/.codex/skills` |\n`config.toml` |\n`CODEX.md` |\n| — | — | — | — | `.cursorrules` (Cursor is a `sync-rules` target only for now - it isn't skill/MCP-managed like the 3 agents above) |\n| — | — | — | — | `.github/copilot-instructions.md` (GitHub Copilot is a `sync-rules` target only - it isn't skill/MCP-managed like the 3 agents above) |\n\n| Operating System | Skills Linking Strategy | Administrator Privileges Required? | Status |\n|---|---|---|---|\nmacOS (Apple Silicon / Intel) |\nPOSIX Symbolic Links (`dir` ) |\nNo | Supported |\nLinux (Ubuntu / Fedora / Arch) |\nPOSIX Symbolic Links (`dir` ) |\nNo | Supported |\nWindows 10 / 11 |\nNTFS Directory Junctions (`junction` ) |\nNo | Supported |\n\nYou can import and use `@helter/agentbridge`\n\ndirectly in Node.js / TypeScript code:\n\n``` js\nimport {\n  detectInstalledAgents,\n  linkAgentsToHub,\n  syncMcpConfigs,\n  syncProjectRules,\n  runDiagnostics,\n} from '@helter/agentbridge';\n\n// 1. Detect installed agents\nconst agents = await detectInstalledAgents();\n\n// 2. Link skills to central hub\nconst linkSummary = await linkAgentsToHub(agents);\n\n// 3. Mirror MCP configs\nconst mcpSummary = await syncMcpConfigs(agents);\n\n// 4. Run diagnostics\nconst report = await runDiagnostics();\n# Clone repository\ngit clone https://github.com/Helter5/agentbridge.git\ncd agentbridge\n\n# Install dependencies\nnpm install\n\n# Run Vitest test suite\nnpm test\n\n# Run tests with code coverage\nnpm run test:coverage\n\n# Build TypeScript binary\nnpm run build\n\n# Run local CLI\nnode dist/cli.js status\n```\n\nMIT (c) AgentBridge Contributors", "url": "https://wpnews.pro/news/agentbridge-sync-skills-mcp-servers-across-claude-code-codex-antigravity", "canonical_source": "https://github.com/Helter5/agentbridge", "published_at": "2026-08-26 19:26:16+00:00", "updated_at": "2026-08-26 19:44:03.818520+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "ai-agents"], "entities": ["AgentBridge", "Google Antigravity", "Claude Code", "OpenAI Codex"], "alternates": {"html": "https://wpnews.pro/news/agentbridge-sync-skills-mcp-servers-across-claude-code-codex-antigravity", "markdown": "https://wpnews.pro/news/agentbridge-sync-skills-mcp-servers-across-claude-code-codex-antigravity.md", "text": "https://wpnews.pro/news/agentbridge-sync-skills-mcp-servers-across-claude-code-codex-antigravity.txt", "jsonld": "https://wpnews.pro/news/agentbridge-sync-skills-mcp-servers-across-claude-code-codex-antigravity.jsonld"}}