sessions

sessions is a command for Claude Code from Fmarzochi/EGC. It costs 12 tokens per session (3,969 once invoked), scanned A, original, Apache-2.0.

A command for viewing, loading, naming, and inspecting saved coding sessions.

In plain words
What is it for?
Use it to list saved sessions, search by date or ID, load one, or inspect its project and worktree details.
Why use it?
It makes past session context easier to find and continue instead of reconstructing it from memory.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Use it to list saved sessions, search by date or ID, load one, or inspect its project and worktree details.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/fmarzochi/egc/sessions
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/Fmarzochi/EGC

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sessions

README.md
[![agentmods](https://agentmods.dev/badge/commands/fmarzochi/egc/sessions/github.svg)](https://agentmods.dev/commands/fmarzochi/egc/sessions)
Your own site
<a href="https://agentmods.dev/commands/fmarzochi/egc/sessions"><img src="https://agentmods.dev/badge/commands/fmarzochi/egc/sessions/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sessions

Your own site · 80×15
<a href="https://agentmods.dev/commands/fmarzochi/egc/sessions"><img src="https://agentmods.dev/badge/commands/fmarzochi/egc/sessions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,969 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00012 $0.03969
Opus 5.5 $0.00005 $0.01588
Sonnet 5.5 $0.00002 $0.00794
Haiku 4.5 $0.00001 $0.00397

Measured 1mo ago against content hash bc56cc70c7d4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sessions scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

3 near-identical copies found in the catalogue:

  • sessions — 89% identical, 72 lines differ
  • sessions — 89% identical, 73 lines differ
  • sessions — 86% identical, 70 lines differ
commands/sessions.md · 340 lines

How it starts

The opening of the file, as written. The whole thing — 340 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Sessions Command

Manage Gemini Code session history - list, load, alias, and edit sessions stored in ~/.gemini/session-data/ with legacy reads from ~/.gemini/sessions/.

Usage

/sessions [list|load|alias|info|help] [options]

Actions

List Sessions

Display all sessions with metadata, filtering, and pagination.

Use /sessions info when you need operator-surface context for a swarm: branch, worktree path, and session recency.

/sessions                              # List all sessions (default)
/sessions list                         # Same as above
/sessions list --limit 10              # Show 10 sessions
/sessions list --date 2026-02-01       # Filter by date
/sessions list --search abc            # Search by session ID

Script:

node -e "
const _r = (()=>{var e=process.env.GEMINI_PLUGIN_ROOT;if(e&&e.trim())return e.trim();var p=require('path'),f=require('fs'),h=require('os').homedir(),d=p.join(h,'.gemini'),q=p.join('scripts','lib','utils.js');if(f.existsSync(p.join(d,q)))return d;for(var s of [['egc'],['egc@egc'],['marketplace','egc'],['everything-gemini'],['everything-gemini@everything-gemini'],['marketplace','everything-gemini']]){var l=p.join(d,'plugins',...s);if(f.existsSync(p.join(l,q)))return l}try{for(var g of ['egc','everything-gemini']){var b=p.join(d,'plugins','cache',g);for(var o of f.readdirSync(b,{withFileTypes:true})){if(!o.isDirectory())continue;for(var v of f.readdirSync(p.join(b,o.name),{withFileTypes:true})){if(!v.isDirectory())continue;var c=p.join(b,o.name,v.name);if(f.existsSync(p.join(c,q)))return c}}}}catch(x){}return d})();
const sm = require(_r + '/scripts/lib/session-manager');
const aa = require(_r + '/scripts/lib/session-aliases');
const path = require('path');

const result = sm.getAllSessions({ limit: 20 });
const aliases = aa.listAliases();
const aliasMap = {};
for (const a of aliases) aliasMap[a.sessionPath] = a.name;

console.log('Sessions (showing ' + result.sessions.length + ' of ' + result.total + '):');
console.log('');
console.log('ID        Date        Time     Branch       Worktree           Alias');
console.log('────────────────────────────────────────────────────────────────────');

for (const s of result.sessions) {
  const alias = aliasMap[s.filename] || '';
  const metadata = sm.parseSessionMetadata(sm.getSessionContent(s.sessionPath));
  const id = s.shortId === 'no-id' ? '(none)' : s.shortId.slice(0, 8);
  const time = s.modifiedTime.toTimeString().slice(0, 5);
  const branch = (metadata.branch || '-').slice(0, 12);
  const worktree = metadata.worktree ? path.basename(metadata.worktree).slice(0, 18) : '-';

  console.log(id.padEnd(8) + ' ' + s.date + '  ' + time + '   ' + branch.padEnd(12) + ' ' + worktree.padEnd(18) + ' ' + alias);
}
"

Read the full file on GitHub · 340 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 340 lines · 12 tokens per session scan A bc56cc70c7d4

Subscribe to this mod's changes

sessions is a command published in the GitHub repository Fmarzochi/EGC (67 stars, last pushed 3d ago), licensed Apache-2.0. It adds 12 tokens to every session and 3,969 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.