en un clic
ln-004-agent-config-sync
Sync skills (symlinks) and MCP settings from Claude to Gemini CLI and Codex CLI
Menu
Sync skills (symlinks) and MCP settings from Claude to Gemini CLI and Codex CLI
| name | ln-004-agent-config-sync |
| description | Sync skills (symlinks) and MCP settings from Claude to Gemini CLI and Codex CLI |
| license | MIT |
Paths: File paths (
shared/,references/,../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root.
Type: Standalone Utility Category: 0XX Shared
Synchronizes skills and MCP server configurations from Claude Code (source of truth) to Gemini CLI and Codex CLI. Creates symlinks for skills, copies/converts MCP settings.
| Parameter | Required | Default | Description |
|---|---|---|---|
| targets | No | both | gemini, codex, or both |
| mode | No | full | skills (symlinks only), mcp (MCP only), or full (both) |
| dry_run | No | false | Show planned actions without executing |
Detect OS → Discover Configs → Sync Skills → Sync MCP → Report
| Check | Result | Impact |
|---|---|---|
uname or platform | win32 / darwin / linux | Junction vs symlink |
| Home directory | $HOME or $USERPROFILE | Config paths |
Paths by OS:
| Agent | Windows | macOS / Linux |
|---|---|---|
| Claude | %USERPROFILE%\.claude.json (primary) | ~/.claude.json (primary) |
| Claude | %USERPROFILE%\.claude\settings.json (fallback) | ~/.claude/settings.json (fallback) |
| Gemini | %USERPROFILE%\.gemini\settings.json | ~/.gemini/settings.json |
| Codex | %USERPROFILE%\.codex\config.toml | ~/.codex/config.toml |
Read Claude settings (check both sources, merge):
~/.claude.json → extract mcpServers block (primary source, app state file)~/.claude/settings.json → extract mcpServers block (fallback, user settings file)mcpServers in either → WARN "No MCP servers configured in Claude", skip MCP syncRead target configs (if exist):
~/.gemini/settings.json → extract existing mcpServers~/.codex/config.toml → extract existing [mcp_servers.*]Detect installed plugins:
~/.claude/plugins/*/plugin.json → list plugin directoriesCheck existing symlinks:
~/.gemini/skills → exists? points where?~/.codex/skills → exists? points where?Show current state:
Current State:
| Agent | Skills | MCP Servers | Config Exists |
|-------|--------|-------------|---------------|
| Claude (source) | 5 plugins | 4 servers | yes |
| Gemini | no link | 2 servers | yes |
| Codex | → ~/.claude/plugins | 4 servers | yes |
FOR EACH target IN (gemini, codex) WHERE target in targets:
Determine link path:
~/.gemini/skills~/.codex/skillsCheck if already linked correctly:
Determine source:
Create link:
| OS | Command |
|---|---|
| Windows | cmd /c mklink /J "{target_path}" "{source_path}" |
| macOS / Linux | ln -s "{source_path}" "{target_path}" |
Verify: Check link exists and resolves correctly
Source: ~/.claude.json (primary) + ~/.claude/settings.json (fallback) → merged mcpServers
mcpServers as JSON objectsettings.json (or create {} if missing)settings.jsonConversion: Transport type mapping required:
| Claude field | Gemini field | Notes |
|---|---|---|
type: "http" + url | httpUrl | Streamable HTTP |
type: "sse" + url | url | SSE transport |
command + args | command + args + cwd | stdio (same format) |
env | env | Same format ($VAR_NAME syntax in Gemini) |
headers | headers | Same format (JSON object, for url/httpUrl) |
Gemini-only fields (not mapped from Claude):
timeout — request timeout in ms (default: 10min)trust — bypass tool confirmationsincludeTools / excludeTools — tool whitelist/blacklistRead Claude mcpServers as JSON object
Read Codex config.toml (or create empty if missing)
Convert each server:
| Claude JSON field | Codex TOML field | Notes |
|---|---|---|
command | command | Same |
args | args | JSON array → TOML array |
env | [mcp_servers.{name}.env] | Nested table |
type: "http" + url | url | Streamable HTTP (Codex auto-detects by url presence) |
type: "sse" + url | url | SSE → Streamable HTTP (same url field) |
headers | http_headers | Different key name! Static header values |
Example conversion:
"context7": {
"command": "npx",
"args": ["-y", "@upstash/context7-mcp"]
}
[mcp_servers.context7]
command = "npx"
args = ["-y", "@upstash/context7-mcp"]
Merge strategy: Claude servers override. Codex-only servers preserved.
Write updated config.toml
Codex-only fields (preserve as-is, no Claude equivalent):
bearer_token_env_var — Codex bearer token authenabled_tools / disabled_tools — Codex tool filteringstartup_timeout_sec / tool_timeout_sec — Codex timeoutsenabled / required — Codex server lifecycleenv_vars / env_http_headers — Codex env-based headersSync Complete:
| Action | Target | Status |
|--------|--------|--------|
| Skills symlink | Gemini | Created → ~/.claude/plugins/... |
| Skills symlink | Codex | Already linked |
| MCP sync | Gemini | 4 servers synced (2 new, 2 updated) |
| MCP sync | Codex | 4 servers synced (1 new, 3 updated) |
.bak copy.dry_run=true, show all planned actions without executing.| # | Criterion |
|---|---|
| 1 | Claude settings read successfully |
| 2 | Skills symlinks created/verified for each target |
| 3 | MCP settings synced with format conversion (JSON→TOML for Codex) |
| 4 | Backup files created before any config modification |
| 5 | Report shown with all actions and warnings |
Version: 1.1.0 Last Updated: 2026-03-09
Research best practices via MCP Ref/Context7/WebSearch and create documentation (guide/manual/ADR/research). Single research, multiple output types.
Commit and push ALL changes (staged + unstaged + untracked) to the remote repository
Probes CLI agents (Codex, Gemini) and writes docs/environment_state.json — agent availability config for Phase 0
Top orchestrator for complete doc system. Delegates to ln-110 coordinator (project docs) + ln-120-150 workers. Phase 3: global cleanup. Idempotent.
Meta-orchestrator: reads kanban board, lets user pick ONE Story, drives it through pipeline 300->310->400->500 via TeamCreate. Creates worktree isolation; coordinates workers + reports.
Coordinates project documentation creation. Gathers context once, detects project type, delegates to specialized workers (ln-111-115).