Skip to content
Back to skills

Import Chats

ASecurity

Import local Claude Code / Claude Desktop (Code tab) and Codex CLI / Desktop conversations into Google Antigravity with 4-tier smart project matching, deduplication, Markdown archives, and ready-to-resume handoff context. Use when the user asks to import, migrate, sync, or continue conversations from Claude or Codex (including codex://threads/... URIs), or invokes /import-chats.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 29, 2026
ai-agentspythongobashapidatabase

Works with

  • claude code
  • claude desktop
  • cli
  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 29, 2026

npx -y skills add kuangre123/antigravity-chat-importer --skill import-chats --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Import Chats?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Import Chats
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/kuangre123-import-chats/badge)](https://www.skillsdirectory.com/skills/kuangre123-import-chats)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: import-chats
description: >-
  Import local Claude Code / Claude Desktop (Code tab) and Codex CLI / Desktop
  conversations into Google Antigravity with 4-tier smart project matching,
  deduplication, Markdown archives, and ready-to-resume handoff context. Use
  when the user asks to import, migrate, sync, or continue conversations from
  Claude or Codex (including codex://threads/... URIs), or invokes /import-chats.
---

# Import Conversations from Claude & Codex into Antigravity

Use the bundled zero-dependency Python CLI at [scripts/import_chats.py](./scripts/import_chats.py) to scan local Claude and Codex histories, match them to Antigravity Projects, export readable Markdown transcripts, and create ready-to-resume Antigravity conversations via the official `ConversationService` API.

## Rules & Boundaries

- **Read-only on source tools & Antigravity project configs**: Never edit or delete files under `~/.claude/`, `~/.codex/`, or `~/.gemini/config/projects/`.
- **Official API only**: Create conversations exclusively through `product.v1.ConversationService` (handled by `import_chats.py` using `$ANTIGRAVITY_LS_ADDRESS` and `$ANTIGRAVITY_CSRF_TOKEN`). Do not modify internal Antigravity databases or create undocumented project config files directly.
- **Remember project immutability**: A conversation's `projectId` is immutable once created. Always run `scan` first when importing into projects so the user can add any missing local folders via Antigravity's sidebar **Projects `+`** before creating conversations.

## Workflow

### Step 1: Parse the user's request & run `scan`

Translate natural-language requests or `/import-chats ...` arguments into flags:

- Source: `--source claude`, `--source codex`, or `--source all` (default: `all`)
- Count: `--limit <N>` (default: `20`; `0` for unlimited)
- Specific project: `--project <name-or-path>`
- Specific thread/session: `--id <uuid-or-codex://threads/...>`
- Time window: `--since <24h|7d|2w|YYYY-MM-DD>`
- Include Codex archived sessions: `--include-archived`

Locate `scripts/import_chats.py` relative to this `SKILL.md` and run a dry-run preview first:

```bash
python3 "<path-to-this-skill>/scripts/import_chats.py" scan --source all --limit 20
```

### Step 2: Confirm missing projects (if any)

Review the `scan` output:

- **All new sessions already match existing Antigravity projects** (or are scratch workspaces, or the user explicitly asked to import directly to the default area / passed `--only-matched`): proceed straight to Step 3.
- **There are unmatched local project folders** (`exists` on disk) and the user hasn't already told you to skip project binding:
  1. Show a concise summary of how many new sessions matched existing projects vs how many belong to unmatched local folders.
  2. List the unmatched folder paths clearly and offer two choices:
     - **Recommended**: Add the folders they want to keep in Antigravity's left sidebar (**Projects `+`**), then reply "done" so conversations bind directly to those projects.
     - **Quick import**: Proceed immediately and place unmatched sessions in Antigravity's default area with `[projectName]` title prefixes.
  3. Wait for confirmation before calling `import`.

*(Tip: If the user previously moved a folder, they can map old paths to new paths or project names in `~/.antigravity-chat-importer/aliases.json`.)*

### Step 3: Run `import`

Run the import in batches using `flash_lite` by default (fast and quota-friendly; the user can switch models in any conversation afterward):

```bash
python3 -u "<path-to-this-skill>/scripts/import_chats.py" import \
  --source <claude|codex|all> \
  --limit <N> \
  --mode handoff \
  --model flash_lite \
  --batch-size 3
```

Available modes:
- `--mode handoff` (default): Creates each conversation with a structured continuation handoff prompt (initial goal, compaction summaries, modified files, recent turns, and path to full `transcript.md`), waits until `RUN_STATE_IDLE`.
- `--mode empty`: Creates titled conversations without sending an initial turn (zero token cost) while saving full Markdown archives locally.
- `--mode archive-only`: Exports Markdown transcripts and handoff docs locally without calling Antigravity APIs (works offline).

Sessions are automatically deduplicated via `~/.antigravity-chat-importer/state.json` and imported oldest-to-newest so the most recent chats appear at the top of the sidebar.

### Step 4: Verify & report

1. Confirm every created conversation reached `RUN_STATE_IDLE` (in `handoff` mode).
2. Present a concise summary grouped by Antigravity project, with clickable `[Title](conversation://<id>)` links and a clickable link to `~/.antigravity-chat-importer/INDEX.md`.

Files in this skill

  • SKILL.md4.6 KB
  • scripts/import_chats.py67 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.