Back to Skills

gemini-session-management

verified

Central authority for Gemini CLI session management. Covers session resume, retention policies, session browser, and cleanup. Use when resuming Gemini sessions, configuring retention, browsing past sessions, or managing session storage. Delegates 100% to gemini-cli-docs for official documentation.

View on GitHub

Marketplace

melodic-software

melodic-software/claude-code-plugins

Plugin

google-ecosystem

Repository
Verified Org

melodic-software/claude-code-plugins
13stars

plugins/google-ecosystem/skills/gemini-session-management/SKILL.md

Last Verified

January 21, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/melodic-software/claude-code-plugins/blob/main/plugins/google-ecosystem/skills/gemini-session-management/SKILL.md -a claude-code --skill gemini-session-management

Installation paths:

Claude
.claude/skills/gemini-session-management/
Powered by add-skill CLI

Instructions

# Gemini Session Management

## MANDATORY: Invoke gemini-cli-docs First

> **STOP - Before providing ANY response about Gemini sessions:**
>
> 1. **INVOKE** `gemini-cli-docs` skill
> 2. **QUERY** for the specific session topic
> 3. **BASE** responses EXCLUSIVELY on official documentation loaded

## Overview

Meta-skill for managing Gemini CLI sessions. Sessions preserve conversation history and can be resumed, searched, and configured with retention policies.

## When to Use This Skill

**Keywords:** session, resume, /resume, session browser, retention, maxAge, maxCount, --list-sessions, --delete-session

**Use this skill when:**

- Resuming a previous session
- Configuring session retention
- Browsing past sessions
- Managing session storage
- Understanding session limits

## Session Resume

### Resume Last Session

```bash
gemini --resume
# or
gemini -r
```

### Resume via Browser

In an active session:

```text
/resume
```

Opens interactive session browser to search and select.

## Session Retention

Configure automatic cleanup in `settings.json`:

```json
{
  "general": {
    "sessionRetention": {
      "maxAge": "7d",
      "maxCount": 100,
      "minRetention": "1d"
    }
  }
}
```

| Setting | Description | Example |
| --- | --- | --- |
| `maxAge` | Maximum session age | `"7d"`, `"24h"` |
| `maxCount` | Maximum sessions to keep | `100`, `50` |
| `minRetention` | Minimum time before deletion | `"1d"`, `"12h"` |

## Session Limits

Configure turn limits:

```json
{
  "general": {
    "maxSessionTurns": 100
  }
}
```

## Session Storage

Sessions are stored in:

```text
~/.gemini/tmp/<project_hash>/
```

## Command Line Options

| Option | Description |
| --- | --- |
| `--resume`, `-r` | Resume last session |
| `--list-sessions` | List available sessions |
| `--delete-session <id>` | Delete specific session |

## Keyword Registry (Delegates to gemini-cli-docs)

| Topic | Query Keywords |
| --- | --- |
| Resume | `--resume flag`, `resume session`, `/resume comma

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
4249 chars