Agent skill

Claude Code Sessions

by davila7 in davila7/claude-code-templates

Search, analyze, and manage Claude Code session history. An agent skill from davila7/claude-code-templates.

MITAuto-check passed

Install Claude Code Sessions

skills CLI
$ npx skills add davila7/claude-code-templates --skill claude-code-sessions -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install davila7/claude-code-templates claude-code-sessions --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/davila7/claude-code-templates.git skills-src && mkdir -p .claude/skills && cp -r skills-src/cli-tool/components/skills/productivity/claude-code-sessions .claude/skills/claude-code-sessions && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
claude-code-sessions
GitHub stars
32k
Token cost
~789 tokens
SKILL.md length
277 words
Files
1
Skills in repo
477
Repo updated
First seen
Licence
MIT

At a glance

Search, analyze, and manage Claude Code session history. An agent skill from davila7/claude-code-templates.

  • The user wants to find past sessions
  • SKILL.md covers What It Does, Install, Architecture and Use Cases, plus 1 more section
  • Calls bun
  • Check token usage

What it does

Claude Code Sessions is an agent skill from davila7/claude-code-templates. Search, analyze, and manage Claude Code session history. Use when the user wants to find past sessions, check token usage, review tool breakdowns, resume previous work, or manage tasks across sessions. Provides 11 skills and a web dashboard.

Its SKILL.md is about 790 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: CLI tool for configuring and monitoring Claude Code. The licence is MIT.

When your agent uses it

  • The user wants to find past sessions
  • Check token usage
  • Review tool breakdowns
  • Resume previous work

Example prompts

  • “/claude-code-sessions”

What it can do on your machine

Read from SKILL.md and the folder at commit 4c82aba. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • bun

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Claude Code Sessions loads about 789 tokens when it runs. Until then it costs about 66 tokens; SKILL.md has 277 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~66
When it runs · the whole SKILL.md, loaded when a task matches
~789

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from davila7/claude-code-templates at commit 4c82aba, republished under its MIT licence (© davila7). 277 words, ~789 tokens.

Download SKILL.mdSave it as .claude/skills/claude-code-sessions/SKILL.md (or your agent's skills folder).
name
claude-code-sessions
description
Search, analyze, and manage Claude Code session history. Use when the user wants to find past sessions, check token usage, review tool breakdowns, resume previous work, or manage tasks across sessions. Provides 11 skills and a web dashboard.

Claude Code Sessions

Session intelligence plugin for Claude Code. Reads the JSONL session files that Claude Code writes to ~/.claude/projects/ and makes them searchable and analyzable.

What It Does

Claude Code records every session as a JSONL file — messages, tool calls, token counts, diffs, tasks. This plugin reads those files and provides two interfaces. Most operations are read-only; delete and cleanup skills can remove session files when explicitly invoked.

11 skills usable directly in Claude Code:

SkillPurpose
/session-search "query"Full-text search across every session
/session-statsToken usage, model distribution, tool breakdown
/session-listList sessions sorted by recency, size, or duration
/session-detailDeep dive into a specific session
/session-diffCompare two sessions — files, tools, topics
/session-timelineChronological view of sessions on a project
/session-resumeGenerate a context recovery prompt from any session
/session-tasksFind pending and orphaned tasks across sessions
/session-exportExport a session as clean markdown
/session-cleanupFind empty, tiny, or stale sessions
/session-deleteDelete sessions and their associated tasks

Web dashboard at localhost:3000 with four views: Dashboard (summary stats), Sessions (sortable table with bulk operations), Search (full-text with context snippets), Tasks (grouped by status with orphan detection).

Install

bash
/plugin marketplace add apappascs/claude-code-sessions
/plugin install claude-code-sessions@claude-code-sessions

No API keys. No config. No runtime dependencies. It reads what's already on disk.

For the dashboard:

bash
bun run ui
# → http://localhost:3000

Architecture

Same TypeScript modules power skills, dashboard, and CLI:

lib/formatters.ts      — pure utilities, no I/O
lib/session-parser.ts  — parses one JSONL file into structured data
lib/session-store.ts   — scans all sessions, aggregates, searches
ui/server.ts           — HTTP endpoints + static file serving

Each lib file doubles as a standalone CLI:

bash
bun run lib/session-store.ts list --sort recency --limit 10
bun run lib/session-store.ts search "database migration" --since 2025-01-01
bun run lib/session-parser.ts stats path/to/session.jsonl

Use Cases

  • Find the session where you solved a specific problem weeks ago
  • See which projects consume the most tokens
  • Track pending tasks across all sessions and projects
  • Resume a past session with full context
  • Compare how two sessions approached the same problem
  • Export session transcripts for documentation

© davila7, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in cli-tool/components/skills/productivity/claude-code-sessions of davila7/claude-code-templates.

Open the folder on GitHubat commit 4c82aba

Compare with similar skills

Claude Code Sessions next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Claude Code Sessions compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Claude Code Sessions this skilldavila7/claude-code-templates32k—~789Automated safety check: PassMIT
Session History Timelinerohitg00/agentmemory29k—~465Automated safety check: PassApache-2.0
Session History Searchslopus/happy24k—~3.1kAutomated safety check: PassMIT
Session Handoffsickn33/agentic-awesome-skills47k—~1.8kAutomated safety check: NotesMIT
Sessionanthropics/claude-for-legal9.6k3 repos~478Automated safety check: PassApache-2.0
Read Sessionasgeirtj/system_prompts_leaks69k—~2.4kAutomated safety check: PassCC0-1.0

Similar skills

  • Session History Timeline

    rohitg00/agentmemory

    Shows a clean, reverse-chronological timeline of recent sessions on a project, using only the data a memory tool actually returned, never a remembered summary.

    29k GitHub stars~465 tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Searches past Claude Code, Codex and Cursor sessions and summarizes what was worked on, tried or decided, using extraction scripts instead of reading raw logs.

    24k GitHub stars~3.1k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Session Handoff

    sickn33/agentic-awesome-skills

    A skill your agent uses when context approaches capacity, before /clear or /compact, when switching tasks, or when ending a coding session: produces a structured handoff artifact for the next session.

    47k GitHub stars~1.8k tokensUpdated today
    Agent WorkflowsAuto-check: notes
  • Session

    anthropics/claude-for-legal

    Official

    Run a focused N-question study session on a subject — MBE, essay, or flashcards.

    9.6k GitHub starsUsed in 3 repos~478 tokens
    EducationAuto-check passed
  • Read Session

    asgeirtj/system_prompts_leaks

    Locate and read Muse Code's OWN session logs — the current session or a prior one.

    69k GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed
  • Coding Agent Session Finder

    code-yeongyu/oh-my-openagent

    Finds, reads and reconstructs past coding-agent sessions across Codex, Claude, OpenCode, Senpi and many other local agent logs.

    70k GitHub stars~2.8k tokensUpdated today
    Agent WorkflowsAuto-check passed

More from davila7/claude-code-templates

All 477 skills in this repo
  • Perplexity Web Search

    davila7/claude-code-templates

    Runs web-grounded searches through Perplexity's Sonar models over OpenRouter for current events, recent literature and cited facts beyond the model's training cutoff.

    32k GitHub starsUsed in 12 repos~3.5k tokens
    Auto-check: notes
  • Neuropixels Data Analysis

    davila7/claude-code-templates

    Analyzes Neuropixels recordings from SpikeGLX or Open Ephys through preprocessing, drift correction, Kilosort4 spike sorting, quality metrics and curation.

    32k GitHub starsUsed in 10 repos~2.8k tokens
    Auto-check passed
  • Scientific Venue Templates

    davila7/claude-code-templates

    Supplies LaTeX templates and formatting rules for journals, conferences, posters, and grant proposals, then can check a draft against them.

    32k GitHub starsUsed in 9 repos~5.1k tokens
    Auto-check: notes
  • Brand Voice Content Creator

    davila7/claude-code-templates

    Analyzes a brand's existing writing to lock in a consistent voice, then builds SEO blog posts and platform-specific social content around it.

    32k GitHub starsUsed in 2 repos~1.9k tokens
    Auto-check passed
  • CAPA Officer

    davila7/claude-code-templates

    Guides corrective and preventive action (CAPA) work in a quality management system, from initiation and root cause analysis through effectiveness verification.

    32k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • Fda Consultant Specialist

    davila7/claude-code-templates

    Senior FDA consultant and specialist for medical device companies including HIPAA compliance and requirement management.

    32k GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed

Questions about Claude Code Sessions

What does Claude Code Sessions do?

Search, analyze, and manage Claude Code session history. An agent skill from davila7/claude-code-templates. Claude Code Sessions is an agent skill from davila7/claude-code-templates. Search, analyze, and manage Claude Code session history.

When should I use Claude Code Sessions?

Claude Code Sessions fits situations like: the user wants to find past sessions; check token usage; review tool breakdowns; resume previous work.

How do I install Claude Code Sessions in Claude Code?

Run `npx skills add davila7/claude-code-templates --skill claude-code-sessions -a claude-code`. Or copy the skill folder (cli-tool/components/skills/productivity/claude-code-sessions in davila7/claude-code-templates) into .claude/skills/claude-code-sessions in your project. Claude Code loads it when a task matches its description.

How do I install Claude Code Sessions in Codex?

Run `npx skills add davila7/claude-code-templates --skill claude-code-sessions -a codex`. Or copy the skill folder (cli-tool/components/skills/productivity/claude-code-sessions in davila7/claude-code-templates) into .agents/skills/claude-code-sessions in your project. Codex loads it when a task matches its description.

Can I use Claude Code Sessions in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add davila7/claude-code-templates --skill claude-code-sessions -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/claude-code-sessions, .gemini/skills/claude-code-sessions, .github/skills/claude-code-sessions and .opencode/skills/claude-code-sessions in your project.

What does Claude Code Sessions need to run?

Going by SKILL.md and its folder, Claude Code Sessions needs the command-line tools its instructions call (bun).

Does Claude Code Sessions access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Claude Code Sessions safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Claude Code Sessions use?

Claude Code Sessions is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Claude Code Sessions use?

About 789 tokens (SKILL.md is roughly 3.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Claude Code Sessions?

Skills that share tags, products or a category with Claude Code Sessions: Session History Timeline (rohitg00/agentmemory, 29k stars), Session History Search (slopus/happy, 24k stars), Session Handoff (sickn33/agentic-awesome-skills, 47k stars) and Session (anthropics/claude-for-legal, 9.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Claude Code Sessions?

davila7 (a GitHub user) maintains it in davila7/claude-code-templates, which has 32,432 GitHub stars. The repository holds 477 skills in this directory. The repository was last updated on October 7, 2026.

Source: davila7/claude-code-templates on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.