Snapshot

From mikeprasad/aria-knowledge · View interactive version

Snapshot is an AI agent skill from the GitHub repository mikeprasad/aria-knowledge. Save the current Antigravity transcript to the knowledge intake on demand. Use when user says '/snapshot', 'snapshot the session', 'save this conversation', 'capture the transcript', or 'archive this session'. Same archival output as the canonical pre-compact hook, but explicit because Antigravity h

How to use this skill

Skill file

/snapshot — On-Demand Transcript Snapshot (Antigravity)

Archive the current Antigravity conversation transcript to intake/pre-compact-captures/ for later review. The mechanism differs from the Claude Code variant: Antigravity puts the conversation transcript at a single known path delivered via hook stdin (transcriptPath), not in a per-cwd directory of jsonl files.

How the transcript is located

The aria-pre-invocation hook (fires before every model call) caches transcriptPath from its stdin payload to ~/.gemini/antigravity/.last-transcript-path. This skill reads that cache.

If the cache doesn't exist yet, the most likely cause is that the agent hasn't completed a model call in this session — transcriptPath only becomes available once the pre-invocation hook has fired at least once. Solution: have the agent respond to one message first, then re-run /snapshot.

When to use this vs. /extract vs. /intake

/snapshot is intentionally orthogonal: it preserves the raw record so /extract (or a human review) can work from it later.

Step 1: Run the Helper

Execute:

bash "${CLAUDE_PLUGIN_ROOT}/bin/save-transcript.sh"

The script (port-specific behavior):

  1. Reads ~/.gemini/antigravity/aria-knowledge.local.md via config.sh — stops with a setup message if unconfigured.
  2. Reads ~/.gemini/antigravity/.last-transcript-path to locate the current conversation transcript. If the cache file doesn't exist, exits with a clear "no transcript cached yet — let the pre-invocation hook fire first" message.
  3. Copies the transcript to {knowledge_folder}/intake/pre-compact-captures/{YYYY-MM-DD}_{conversationId-8-chars}.md (using the conversationId from the transcript itself, or falling back to a timestamp).
  4. Prints the snapshot path, the source transcript path, and pointers to the two review paths — /extract for in-context synthesis now, or /audit-knowledge which will review the snapshot at the next audit cycle.

Step 2: Relay the Output

Print the script's stdout to the user verbatim. The path and source filename are both useful for verification.

If the script exits non-zero, relay the stderr message. Common causes:

Rules

Antigravity vs. Claude Code parity note

In Claude Code, /snapshot walks ~/.claude/projects/{cwd-encoded}/*.jsonl and picks the most-recently-modified file — this distinguishes concurrent windows. In Antigravity, each workspace has one persistent transcript.jsonl so the disambiguation isn't needed; the cached transcriptPath always points to this conversation's transcript.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.