migrate-to-antigravity
Move an existing Claude Code setup onto the Antigravity CLI (agy) — user skills, CLAUDE.md, auto-memory, MCP servers, installed plugins, permissions and trusted workspaces. Use when the user says "migrate to Antigravity", "move my Claude Code config to agy", "bring my skills/memory/MCP over", "set up agy like my Claude Code", "agy plugin import claude found nothing", or asks what can and cannot be carried across. Also use to explain the two config layouts, or to reverse a migration. Not for ongoing, per-task delegation of work to Antigravity/Gemini once set up — see the sibling `antigravity` skill for that.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- migrate-to-antigravity
- description
- Move an existing Claude Code setup onto the Antigravity CLI (agy) — user skills, CLAUDE.md, auto-memory, MCP servers, installed plugins, permissions and trusted workspaces. Use when the user says "migrate to Antigravity", "move my Claude Code config to agy", "bring my skills/memory/MCP over", "set up agy like my Claude Code", "agy plugin import claude found nothing", or asks what can and cannot be carried across. Also use to explain the two config layouts, or to reverse a migration. Not for ongoing, per-task delegation of work to Antigravity/Gemini once set up — see the sibling `antigravity` skill for that.
- allowed-tools
- Bash(agy-migrate:*), Read
03 SKILL.md 正文
Migrating Claude Code → Antigravity CLI
Quick Start
- Run
agy-migratewith no flags for a dry-run report. - Read the report, including the permissions-widening warning.
- Run
agy-migrate --apply(backs up~/.gemini/configfirst). - Review
~/.gemini/.agy-migrate/proposed-permissions.jsonand only merge it with--apply-permissionsif you accept the widened grants. agy-migrate --uninstall --applyreverses everything if needed.
When to Use
- A one-time move of skills/memory/MCP/permissions from Claude Code onto agy.
- Explaining the two products' config layouts, or reversing a prior migration.
When NOT to Use
- Ongoing, per-task delegation of work to Antigravity/Gemini once migration is
done (or without ever needing it) — use the sibling
antigravityskill instead; this skill is a one-time config move, not a recurring delegation workflow.
Run agy-migrate (dry-run) → read the report → agy-migrate --apply.
agy-migrate --uninstall --apply reverses everything.
The tool treats the Claude Code config dir as read-only. The single exception is
an AGENTS.md symlink placed beside an existing CLAUDE.md, and only under
--include-repos.
Where the two products keep things
Claude Code — ~/.claude/ plus ~/.claude.json, relocatable together via
CLAUDE_CONFIG_DIR. Two things surprise people: there is usually no
~/.claude/CLAUDE.md, and auto-memory is per project, under
~/.claude/projects/<encoded-cwd>/memory/. The encoding maps /, _ and . all to
-, so it can only be matched forward (re-encode a known path), never decoded.
Claude Desktop / Cowork is a separate universe. It has its own
~/Library/Application Support/Claude/claude_desktop_config.json (MCP) and
Claude Extensions/ (.mcpb), and its Cowork skills are server-synced into
local-agent-mode-sessions/skills-plugin/, so no local original exists to migrate.
Only claude_desktop_config.json's mcpServers is portable, and the tool picks it up.
The bundled claude-code/<version>/claude.app inside the desktop app is the ordinary
CLI and does read ~/.claude.
Antigravity — rooted at ~/.gemini/, not ~/.antigravity:
| Path | Shared by |
|---|---|
~/.gemini/config/ — mcp_config.json, skills/, plugins/, skills.json, projects/ |
CLI and both desktop apps |
~/.gemini/antigravity-cli/settings.json |
agy only |
~/.gemini/{antigravity-cli,antigravity,antigravity-ide}/ — conversations, brain, knowledge |
each surface separately |
So customization is shared across surfaces; session state is not.
What moves, and how
| Asset | Mechanism | Notes |
|---|---|---|
| User skills | live — skills.json entry pointing at ~/.claude/skills |
no copy; edits show up on both sides |
| Installed plugins | native agy plugin import claude, run in a staging HOME |
output is then repaired (below) |
CLAUDE.md |
symlink AGENTS.md → CLAUDE.md |
--include-repos; both are plain Markdown |
| Auto-memory | generated rules | global → a plugin's rules/; per-repo → <repo>/.agents/rules/ |
| MCP servers | merged + translated into mcp_config.json |
url/httpUrl → serverUrl, type dropped, env copied verbatim (see below) |
| Trusted projects | trustedWorkspaces |
widens trust (disables Antigravity's own trust prompt) — proposal only, same --apply-permissions gate as permissions below |
| Permissions | proposal only by default | see the warning below |
Cannot move
Session transcripts. Claude Code writes plain JSONL; Antigravity writes one SQLite
database per conversation whose payloads are opaque protobuf blobs
(steps.metadata, gen_metadata.data, …). There is no supported writer.
Also unmovable: tasks/, plans/, file-history/, jobs/, and Claude Code's own
auth credentials (different auth systems entirely — never copy these).
Exception, and it matters: an MCP server's own env block (API keys, tokens —
whatever that server's own config carries) is copied verbatim into the new
mcp_config.json, because the server needs it to keep working under Antigravity.
This applies to the user-level ~/.gemini/config/mcp_config.json and to every
per-plugin ~/.gemini/config/plugins/<name>/mcp_config.json the plugin importer
repairs. agy-migrate locks every one of these files down (chmod 0600) so none
is left world-readable, but the secret itself now lives in a second (or third,
fourth…) file — review each mcp_config.json after a migration the same way
you'd review any file that holds credentials.
Four behaviours that will bite you
These are measured against agy 1.1.12, and none of them are documented.
- A rule without
trigger: always_onis silently ignored. No error, no warning. Only bareAGENTS.md/GEMINI.mdare always-on without frontmatter. Migrated memory is therefore rewritten with frontmatter, never stripped of it. - Workspace
.agents/only loads when the session is bound to an agy project — and registering one is not enough for headless runs.agy -palways uses the id inantigravity-cli/cache/default_project_id.txt(default-cli-projectout of the box) regardless of cwd. The tool registers each repo and prints the id; runagy --project <id>there, or pick the project in the TUI. Global~/.gemini/config/loads regardless, which is why global memory goes to a plugin. ~/is not expanded in the globalskills.json. Entry paths must be absolute.- Rules and workflows are capped at 12,000 characters per file. Oversized memory
is split into
-1.md,-2.mdparts on paragraph boundaries.
What the native importer gets wrong
agy plugin import claude exists and handles skills, agents, commands, hooks and MCP —
but:
- It only scans
~/.claude/plugins/<name>/one level deep, which no Claude Code 2.x install matches (plugins live underplugins/cache/<marketplace>/<plugin>/<version>/), so on a real machine it printsNo claude extensions found.and exits 0. It also does not follow symlinks, so the staging HOME must contain real copies. - It destroys remote MCP servers:
{"type":"http","url":…}becomes{"command":"","args":null}— the URL is dropped and noserverUrlis written. - It copies hooks verbatim. Antigravity's
hooks.jsonis a map of named hooks ({"my-hook": {"PreToolUse": [...]}}), its matchers are step-type names (run_command, notBash), and it fires onlyPreToolUse,PostToolUse,PreInvocation,PostInvocation,Stop—SessionStart,SessionEnd,PreCompact,NotificationandSubagentStophave no equivalent.${CLAUDE_PLUGIN_ROOT}is never set, so hook commands referencing it break.
agy-migrate runs the importer anyway (so the output tracks Google's format), then
repairs all three and drops the leftovers it copies.
Permissions widen the grant — always review
Claude's permissions.allow stores whole command lines, quoted prompts included,
not command prefixes. They cannot map 1:1 onto agy's command(), which matches on a
prefix. The tool keeps the executable plus one plain sub-word (Bash(git diff:*) →
command(git diff)), absorbs redundant prefixes, and drops entries whose executable
position holds a variable or shell metacharacter.
That is strictly a widening. So the result is written to
~/.gemini/.agy-migrate/proposed-permissions.json for review, and merged into
settings.json only with --apply-permissions.
Also not migrated, by design: model (no Gemini equivalent for a Claude model id),
effortLevel (agy's --effort is a per-session flag, low|medium|high only), and
env (Anthropic/Vertex routing that means nothing to agy).
Flags
| Flag | Effect |
|---|---|
| (none) | dry-run report |
--apply |
perform it; backs up ~/.gemini/config first |
--only / --skip |
plugins,skills,claudemd,memory,mcp,settings |
--include-repos |
write into git repos (AGENTS.md, .agents/rules/) |
--include-orphan-memory |
fold memory whose source directory no longer exists into global rules |
--apply-permissions |
actually write the translated allow-list and merge trustedWorkspaces |
--no-register-projects |
skip agy project registration (workspace rules then stay inert) |
--roots |
scope for CLAUDE.md and MCP discovery (default: the project paths recorded in ~/.claude.json, or ~ if there are none). The desktop app's claude_desktop_config.json is global and always included. |
--json |
machine-readable plan |
--uninstall |
remove what was generated |
Re-running is safe: generated files carry a marker comment, and a file whose marker you deleted is treated as yours and left alone.
Reference Guide
| Resource | Read when |
|---|---|
docs/agy-migration.md |
The full layout reference, the compatibility matrix, and how each behavior above was measured — this skill covers the workflow, that doc covers the detail |
Testing & Validation
Last dated run record: 2026-09-16, evals/migrate-to-antigravity/ — 2/2 evals, 7/7 assertions passed (Quick Workflow).
Verify this skill activates on:
- "migrate to Antigravity" / "move my Claude Code config to agy"
- "bring my skills/memory/MCP over"
- "agy plugin import claude found nothing"
Verify it does NOT activate on:
- "delegate this task to antigravity/gemini" →
antigravityskill instead - a question about ongoing cost/routing discipline, not a one-time config move
Quality gates:
- [ ] Always runs the dry-run report before suggesting
--apply - [ ] Never applies permissions without
--apply-permissionsexplicitly requested - [ ] States plainly what cannot move (session transcripts, tasks/plans/file-history/jobs, credentials)
04 同仓库更多 Skills
demo
Fixture skill used by scripts.marketplace_ci sync tests.
export-demo
Fixture skill used by scripts.marketplace_ci export tests.
work-to-development
Validate an accepted Linear Issue's readiness for implementation (criteria, dependencies, duplicate/existing artifacts) and request governed branch/worktree creation through git-kit:starting-work — recording work-started Git/GitHub evidence and a deliberate Linear Started transition only after Git identity is read back and verified. Use when asked to start work on a Linear issue, begin development for an accepted issue, or prepare an accepted issue for implementation. Never creates a branch directly — always delegates to git-kit.
work-linking
Create and maintain stable cross-system links and authority labels between Notion and Linear records, and detect/repair drift between them. Use when asked to link a Notion record to a Linear record, check for drift between Notion and Linear, or repair a broken/stale link. Repairs only the bounded non-authoritative copy or link — never chooses by newest timestamp, and never creates a reverse-write loop against either system's own authority.
status-and-learning
Produce a dated, explicitly non-live Linear-to-Notion progress summary, or capture an outcome/learning after work completes. Use when asked to summarize progress to Notion, report portfolio status, or capture what was learned from a completed piece of work — not to disposition open follow-up items (see open-item-management for that). Never runs automatically or continuously — every summary is a deliberate, approved snapshot, not a live sync.
repository-gates
Discover, delegate, record, and invalidate this repository's actual Git/GitHub lifecycle gates (pre-commit, pre-push, PR required checks, Codex delta review, review requirements, merge rights) and the repository-policy provider profile that maps governed operations to git-kit. Use when asked what gates apply to this repository, to discover repository policy before starting Wave 2 work, or to check whether prior gate evidence is still valid after new commits. Discovery and delegation only — never executes a gate's own internal logic, and never invents a gate the repository doesn't actually define (in particular, never assumes a "Review Changes" gate exists).