| name | antigravity-chat-export |
| description | Use this skill when the user wants to export, recover, verify, trim, or clean up Google Antigravity chat history from the local UI, especially when the UI can show a conversation but ordinary files like transcript.jsonl, chat_history_export.md, or encrypted .pb files do not provide a trustworthy complete export. |
| metadata | {"source":"local"} |
Antigravity Chat Export
Purpose
Export the real conversation Markdown from a running Antigravity app through its local HTTPS language-server API.
Use this instead of reconstructing, summarizing, or rewriting a chat from partial files.
When To Use
Use this skill for requests like:
- "export this Antigravity conversation"
- "the UI can see the old chat but I cannot export it"
- "recover Antigravity chat history"
- "verify whether the generated chat_history_export.md is complete"
- "remove the later export/debugging discussion from the recovered chat"
- "turn the Antigravity UI conversation into a clean Markdown file"
Do not use this skill for generic Codex, Claude Code, ChatGPT, or browser history exports.
Completion Standard
Before saying the export is complete:
- Confirm the Antigravity app is running.
- Identify the target conversation/cascade ID. It is usually in the UI URL as
/c/<id>.
- Export through
ConvertTrajectoryToMarkdown, not by paraphrasing partial files.
- Verify the output starts with
# Chat Conversation.
- Count lines and conversation sections.
- If needed, compare against
GetCascadeTrajectory step count, but explain that step count and chat-section count are different things.
- If the user asks for a clean historical transcript, trim later "export/debugging" discussion at the exact phrase they name.
- Distinguish clearly:
- Markdown chat export: user and assistant visible conversation text.
- Raw trajectory: lower-level steps, tool calls, metadata, and internal fields.
- Encrypted
.pb: Antigravity storage, not the same as a direct Markdown export.
Never claim a file is "raw complete history" unless the raw trajectory itself was exported and verified.
Fast Path
Use the bundled script:
cd /path/to/antigravity-chat-export
scripts/export_antigravity_chat.sh <conversation-id-or-url> -o ./antigravity_chat.md
List recent conversations when the user does not know the conversation ID:
cd /path/to/antigravity-chat-export
scripts/export_antigravity_chat.sh --list --limit 20
If process inspection is blocked but the port and token are already known:
cd /path/to/antigravity-chat-export
scripts/export_antigravity_chat.sh <conversation-id-or-url> -o ./antigravity_chat.md --port <port> --csrf-token <token>
Trim from a later phrase:
cd /path/to/antigravity-chat-export
scripts/export_antigravity_chat.sh <conversation-id-or-url> -o ./antigravity_chat.md --trim-from-phrase "能把我们的聊天记录全部导出吗"
Also verify the raw trajectory count:
cd /path/to/antigravity-chat-export
scripts/export_antigravity_chat.sh <conversation-id-or-url> -o ./antigravity_chat.md --verify-trajectory
Manual Fallback
If the script fails, reproduce its steps manually.
Find the Antigravity language-server process and CSRF token:
ps -axo pid,command | rg 'Antigravity.app|language_server|csrf_token'
Find the local HTTPS port for that process:
lsof -nP -a -p <pid> -iTCP -sTCP:LISTEN
Export Markdown:
curl -sk -X POST "https://127.0.0.1:<port>/exa.language_server_pb.LanguageServerService/ConvertTrajectoryToMarkdown" \
-H "content-type: application/json" \
-H "x-codeium-csrf-token: <token>" \
--data '{"conversationId":"<conversation-id>"}' |
jq -r '.markdown' > antigravity_chat.md
Optional raw trajectory check:
curl -sk -X POST "https://127.0.0.1:<port>/exa.language_server_pb.LanguageServerService/GetCascadeTrajectory" \
-H "content-type: application/json" \
-H "x-codeium-csrf-token: <token>" \
--data '{"cascadeId":"<conversation-id>","trajectoryVerbosity":"CLIENT_TRAJECTORY_VERBOSITY_FULL"}' |
jq '{numTotalSteps, numTotalGeneratorMetadata, numTotalExecutorMetadata, stepArrayLength:(.trajectory.steps|length), status}'
Safety Rules
- Do not delete old generated files unless the user asks.
- When deleting fake exports, delete only the named export files and their metadata, not unrelated project artifacts.
- If writing outside the workspace requires approval, ask for approval or write to the workspace and tell the user the path.
- Do not paste large chat contents into the final reply. Give the path and the verification summary.
- If Antigravity restarted, the CSRF token and port may change. Re-detect them instead of reusing old values.
- Automatic detection uses
ps and lsof; in a sandbox it may require approval. If approval is not appropriate, use explicit --port and --csrf-token.