agentleFS
yuting0624yuting0624/antigravity-for-claude-code/skills/migrate-to-antigravity/SKILL.md

migrate-to-antigravity

Skill477 starsChanged 5 months agoMITView on GitHub

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.

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 1

    1. GryAsl/Polyphony★ 499% same

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repositoryOne other file it gives its agents.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run agy-migrate (dry-run) → read the report → agy-migrate --apply.

    line 9
  2. Very specific:

    Only claude_desktop_config.json's mcpServers is portable, and the tool picks it up.

    line 30
  3. Very specific:

    A rule without trigger: always_on is silently ignored: No error, no warning. Only bare AGENTS.md / GEMINI.md are always-on without …

    line 72
  4. Distinctive:

    Only bare AGENTS.md / GEMINI.md are always-on without frontmatter.

    line 73

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Migrating Claude Code → Antigravity CLI

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:

PathShared by
~/.gemini/config/ — mcp_config.json, skills/, plugins/, skills.json, projects/CLI and both desktop apps
~/.gemini/antigravity-cli/settings.jsonagy only
~/.gemini/{antigravity-cli,antigravity,antigravity-ide}/ — conversations, brain, knowledgeeach surface separately

So customization is shared across surfaces; session state is not.


What moves, and how

AssetMechanismNotes
User skillslive — skills.json entry pointing at ~/.claude/skillsno copy; edits show up on both sides
Installed pluginsnative agy plugin import claude, run in a staging HOMEoutput is then repaired (below)
CLAUDE.mdsymlink AGENTS.md → CLAUDE.md--include-repos; both are plain Markdown. Git repositories only — a CLAUDE.md elsewhere is reported as skipped, and package caches are never scanned
Auto-memorygenerated rulesglobal → a plugin's rules/; per-repo → <repo>/.agents/rules/
MCP serversmerged + translated into mcp_config.jsonurl/httpUrl → serverUrl, type dropped
Trusted projectstrustedWorkspacesthe one clean settings mapping
Permissionsproposal only by defaultsee 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 credentials (different auth systems entirely — never copy these).


Four behaviours that will bite you

These are measured against agy 1.1.12, and none of them are documented.

  1. A rule without trigger: always_on is silently ignored. No error, no warning. Only bare AGENTS.md / GEMINI.md are always-on without frontmatter. Migrated memory is therefore rewritten with frontmatter, never stripped of it.
  2. Workspace .agents/ only loads when the session is bound to an agy project — and registering one is not enough for headless runs. agy -p always uses the id in antigravity-cli/cache/default_project_id.txt (default-cli-project out of the box) regardless of cwd. The tool registers each repo and prints the id; run agy --project <id> there, or pick the project in the TUI. Global ~/.gemini/config/ loads regardless, which is why global memory goes to a plugin.
  3. ~/ is not expanded in the global skills.json. Entry paths must be absolute.
  4. Rules and workflows are capped at 12,000 characters per file. Oversized memory is split into -1.md, -2.md parts 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 under plugins/cache/<marketplace>/<plugin>/<version>/), so on a real machine it prints No 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 no serverUrl is written.
  • It copies hooks verbatim. Antigravity's hooks.json is a map of named hooks ({"my-hook": {"PreToolUse": [...]}}), its matchers are step-type names (run_command, not Bash), and it fires only PreToolUse, PostToolUse, PreInvocation, PostInvocation, Stop — SessionStart, SessionEnd, PreCompact, Notification and SubagentStop have 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

FlagEffect
(none)dry-run report
--applyperform it; backs up ~/.gemini/config first
--only / --skipplugins,skills,claudemd,memory,mcp,settings
--include-reposwrite into git repos (AGENTS.md, .agents/rules/) — and only into those. Needs git on PATH; without it the run exits 18 rather than calling every repository a non-repository
--include-orphan-memoryfold memory whose source directory no longer exists into global rules
--apply-permissionsactually write the translated allow-list
--no-register-projectsskip agy project registration (workspace rules then stay inert)
--rootsscope 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.
--jsonmachine-readable plan
--uninstallremove 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.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.