save-session
Save AI agent session information for later resumption. Use when: (1) Finishing a work session and want to save progress (2) User says "save session", "remember this session", or "save your session ID" (3) Before ending a long coding/debugging session (4) When user wants to be able to resume this conversation later Supports Claude, Codex, Gemini, Copilot, Cursor, and other AI agents.
Best use case
save-session is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Save AI agent session information for later resumption. Use when: (1) Finishing a work session and want to save progress (2) User says "save session", "remember this session", or "save your session ID" (3) Before ending a long coding/debugging session (4) When user wants to be able to resume this conversation later Supports Claude, Codex, Gemini, Copilot, Cursor, and other AI agents.
Teams using save-session should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/save-session/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How save-session Compares
| Feature / Agent | save-session | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Save AI agent session information for later resumption. Use when: (1) Finishing a work session and want to save progress (2) User says "save session", "remember this session", or "save your session ID" (3) Before ending a long coding/debugging session (4) When user wants to be able to resume this conversation later Supports Claude, Codex, Gemini, Copilot, Cursor, and other AI agents.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
# Save Session
Save session metadata to `docs/.ai/sessions.json` for future resumption by any AI agent.
## Usage
```bash
python3 ~/.agents/skills/save-session/scripts/save_session.py \
--session-id "SESSION_ID" \
--agent "claude" \
--summary "Brief description of work done" \
--repo-root "$(pwd)"
```
For Codex, you can use automatic detection:
```bash
python3 ~/.agents/skills/save-session/scripts/save_session.py \
--session-id auto \
--agent codex \
--summary "Brief description of work done" \
--repo-root "$(pwd)"
```
## Finding Your Session ID by Agent
### Claude Code
**Session storage:** `~/.claude/projects/<project-hash>/<SESSION_ID>.jsonl`
**How to find:**
- Extract UUID from file paths in context (e.g., tool output paths contain the session ID)
- Use `/status` command to see session info
- List sessions: `claude --resume` (interactive picker)
**Environment:** `CLAUDE_CONFIG_DIR` changes storage location (default: `~/.claude`)
**Resume:** `claude --resume SESSION_ID` or `claude -r SESSION_ID`
### OpenAI Codex CLI
**Session storage:** `~/.codex/sessions/`
**How to find:**
- Use `/status` command within Codex
- Copy from session picker
- List files in `~/.codex/sessions/`
- Or pass `--session-id auto` (uses latest `~/.codex/shell_snapshots/*.sh` filename; verify if multiple sessions are active)
**Note:** Session ID is not currently exposed to the model itself (see GitHub issue #5912)
**Resume:** `codex resume SESSION_ID`
### Google Gemini CLI
**Session storage:** `~/.gemini/tmp/<project_hash>/chats/`
**How to find:**
- Use `gemini --list-sessions` to see all sessions with UUIDs
- Sessions are project-specific
**Resume options:**
- `gemini --resume` (latest session)
- `gemini --resume <UUID>` (specific session)
- `gemini --resume <index>` (by index number)
- `/resume` command within interactive mode
### GitHub Copilot CLI
**How to find:**
- Use `/session` or `/usage` command to display current session ID
- Use `gh agent-task list` (requires gh v2.80.0+)
- Use `gh agent-task view` for session details
**Resume:** `/resume SESSION_ID` or `/resume last`
**Note:** Auto-compaction maintains context across long sessions
### Cursor IDE
**Session storage:** SQLite databases in workspace storage
- **macOS:** `~/Library/Application Support/Cursor/User/workspaceStorage/`
- **Linux:** `~/.config/Cursor/User/workspaceStorage/`
- **Windows:** `%APPDATA%\Cursor\User\workspaceStorage\`
**How to find:** Sessions stored in `.vscdb` files as JSON blobs
**Note:** No built-in session ID. Use SpecStory extension for backup/export.
### Aider
**Session storage:** Chat history in `.aider.chat.history.md` in repo root
**Note:** No formal session ID system. History is file-based and can be referenced by timestamp.
## Session File Format
```json
{
"sessions": [
{
"id": "uuid-session-id",
"agent": "claude",
"summary": "Implemented multi-platform CI",
"created_at": "2026-01-31T15:45:00Z",
"tags": ["ci", "rust"]
}
]
}
```
## Resuming Sessions
| Agent | Resume Command |
|-------|----------------|
| Claude Code | `claude --resume SESSION_ID` |
| Codex | `codex resume SESSION_ID` |
| Gemini CLI | `gemini --resume SESSION_ID` |
| Copilot CLI | `/resume SESSION_ID` |
| Cursor | Restore from workspaceStorage backup |
| Aider | Reference `.aider.chat.history.md` |Related Skills
second-opinion
Run an external LLM code review with Codex CLI, Gemini CLI, or both. Use when the user asks for a second opinion, external review, Codex review, Gemini review, or wants a model-vs-model review of current changes, a branch diff, a specific commit, or a GitHub pull request.
seatbelt-sandboxer
Generates minimal macOS Seatbelt sandbox configurations. Use when sandboxing, isolating, or restricting macOS applications with allowlist-based profiles.
screenshot-analyzer
Find and analyze screenshots from ~/Downloads/Screenshots/ for UI/UX review. Use when asked to look at screenshots, review UI designs, inspect interface errors, analyze layout issues, or examine visual problems. Triggers on "check my latest screenshot", "review my UI", "analyze this screen capture".
rust-profiling
Profile Rust code using samply to identify CPU bottlenecks. Use when performance is slow, before optimizing, or when the user asks to profile.
ratatui-tui
Build terminal UIs with ratatui following 2026 Rust best practices. Use when: (1) Creating new TUI apps, (2) Adding widgets/layouts, (3) Keyboard navigation/state management, (4) Image integration via ratatui-image, (5) Async event handling, (6) Release optimization. Covers v0.30.0+ API, Elm Architecture, StatefulWidget, color-eyre.
orchestrate
Orchestrate multi-step work with Claude Code CLI as a bounded worker while Codex stays lead developer. Use when Codex should split a task into scoped sub-tasks, delegate planning or implementation to Claude with `claude -p`, run parallel Claude sessions, isolate risky edits in worktrees, define custom Claude subagents, or move repeated enforcement into Claude hooks/settings.
karpathy-guidelines
Behavioral checklist for disciplined LLM coding. Use when starting non-trivial tasks to enforce assumption surfacing, minimal changes, and verifiable goals. Derived from Andrej Karpathy's observations on LLM coding pitfalls.
instruments-profiling
Use when profiling native macOS or iOS apps with Instruments/xctrace. Covers correct binary selection, CLI arguments, exports, and common gotchas.
humanizer
Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases. 30c5c8d (Update humanizer plugin to upstream v2.2.0)
html-artifacts
Produce a single self-contained .html artifact (no build, no external assets) when the task is spatial, interactive, visual, multi-axis, or long-running. Triggers on "build me an HTML for X", "make a dashboard / status snapshot / comparison / decision tree / timeline / architecture map", "render this plan as a clickable site", or when content can't fit markdown structurally. Skips short replies, code-only outputs, simple plans.
handoff
Generate optimized handoff prompts for delegating work to another LLM agent. Use when handing work to GPT-5.x/Codex, Claude 4.x, Gemini 3.x, or Grok 4.x, either as a shared-workspace sub-task handoff or a fresh-context handoff for a new session or model. Triggers on requests like "create a handoff prompt", "delegate this task to another agent", "hand this off", or "prepare context for another agent".
go-performance
Measure and improve Go program performance on modern Go (1.24+). Use when profiling Go code, diagnosing CPU or memory bottlenecks, investigating latency or contention, writing or fixing benchmarks, comparing benchmark results, using pprof or trace data, applying PGO, or tuning hot-path Go code.