⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

v0.3.1

session-index

lee-fuhr@lee-fuhr⭐ 31 stars· last commit 9mo ago· 2 open issues

Search, analyze, and synthesize across all your Claude Code sessions. Ask "what did I try last time?" and get answers with resume links.

Choose how to use this skill

You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.

1. Native installer

This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.

Do not guess an installer command or replace an existing version without reviewing the diff.

2. Complete package recommended

Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.

No complete ProSkills package is published for this listing yet.

3. Prompt-only

Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.

Need only the instruction file?

Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.

No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.

—/10

// RATINGS

⭐GitHub Stars
⭐⭐ 31 on GitHubGitHub ↗

Growing

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// README

Claude session index

Every Claude Code session you've ever had, searchable in under a second.

You've built things across hundreds of sessions. Solved problems, hit walls, found workarounds. But sessions disappear into ~/.claude/projects/ as unlabeled JSONL files — thousands of them, unsearchable, forgettable. This tool indexes them all into a fast SQLite database with full-text search, conversation retrieval, analytics, and cross-session synthesis.

Ask "what did I try last time I debugged webhooks?" and get an actual answer.


Quick start

pip install claude-session-index

Then install the Claude Code skill:

npx skills add lee-fuhr/claude-session-index

Or copy it manually:

cp skills/session-index/SKILL.md .claude/skills/session-index.md

That's it. The first time you ask a question, it auto-indexes all your existing sessions. After that, queries return in milliseconds.


How it works (for you)

The interface is your Claude Code conversation. You ask questions naturally, Claude translates them into searches, and gives you conversational answers.

"Didn't we discuss browser control recently?"

Claude searches your sessions, finds the matches, and tells you:

You discussed browser control in 3 sessions last week. The most relevant was on Jan 18 where you figured out that synthetic MouseEvent dispatch bypasses the framework's event handling. The key insight was that the submit button was a <div>, not a <button>.

→ claude --resume a5b111c6-dca0-4ee9-b237-74b75baf13cd

"What have I tried for form automation? What actually worked?"

Claude searches across sessions, extracts the relevant conversations, and synthesizes:

Approaches tried: element.click() → failed (framework intercepts). Coordinate-based clicking → failed (dynamic elements). Synthetic MouseEvent dispatch → success.

What worked: Native OS-level clicking for all button interaction. Persistent browser profiles for session continuity.

What failed: All JavaScript-based clicking — the framework intercepts and blocks it.

Sources: 5 sessions spanning Jan 10–Feb 1 → claude --resume abc123... → claude --resume def456...

"How did I spend my week?"

89 sessions this week. 302 hours total.

Windmill Labs: 2 sessions, 47h GridSync: 2 sessions, 17h NovaTech: 4 sessions, 7h

Top tools: Bash (3,214), Read (2,126), Edit (1,718) Task agent usage up 142% from last week.

Every answer includes claude --resume links so you can jump straight back into any session.


What it does under the hood

  1. Indexes all your Claude Code sessions into SQLite with FTS5 full-text search
  2. Searches by content, client, project, tool, agent, tag, or date — results in milliseconds
  3. Retrieves context — actual conversation exchanges (user + assistant), not just metadata
  4. Analyzes your usage — time per client, tool trends, session frequency, topic patterns
  5. Synthesizes across sessions — "What approaches have I tried for X?" via in-session Haiku subagent (no extra API cost)
  6. Tracks topics live during sessions via Claude Code hooks

The CLI

The skill handles the conversational interface. But if you want direct access from a terminal, everything goes through sessions:

# Search — just type what you're looking for
sessions "webhook debugging"
sessions "webhook" --context              # with conversation excerpts

# Browse a conversation
sessions context <id> "term"              # exchanges matching a term
sessions context <id>                     # all exchanges

# Analytics
sessions analytics                        # overall stats
sessions analytics --client "Acme"        # per-client
sessions analytics --week                 # this week
sessions analytics --month                # this month

# Synthesis (requires anthropic package + API key for standalone use)
sessions synthesize "topic"               # cross-session intelligence

# Browse & filter
sessions recent 20                        # last N sessions
sessions find --client "Acme"             # filter by client
sessions find --tool Task --week          # filter by tool + date
sessions topics <session_id>              # topic timeline
sessions tools                            # top tools across sessions
sessions stats                            # database overview

# Indexing
sessions index                            # index new/modified sessions
sessions index --backfill                 # re-index everything

Plain text defaults to search — sessions "webhook debugging" just works, no subcommand needed.

CLI output

Search results look like this:

🔍 3 results for "silent failure"

  ◆ a5b111c6 · (unnamed)
    2026-01-18 · my-project · 51 exchanges
    "...This was a silent failure - appeared to work but didn't..."
    → claude --resume a5b111c6-dca0-4ee9-b237-74b75baf13cd

  ◆ 7b22239e · (unnamed)
    2026-01-18 · my-project · 50 exchanges
    "...The phrase 'silent failure, which is the ultimate sin'
    captures the core requirement: systems must fail loudly..."
    → claude --resume 7b22239e-9f90-466f-ad92-849840b2a6fd

Conversation context shows the actual chat:

╭─── Build automation debugging ─────────────────
│ 2026-01-20 · my-project · 96 exchanges · 7min
│ → claude --resume a5b111c6-dca0-4ee9-b237-74b75baf13cd
╰────────────────────────────────────────────────

  ┌─ Jan 20, 19:14 ──────────────────────────────
  │
  │  🧑 Breakthrough session. Successfully submitted forms #32 and #33
  │     using synthetic MouseEvent dispatch to bypass the framework's
  │     event handling.
  │
  │  🤖 I'll process these findings. Let me search for existing patterns...
  │     [Grep: framework|zone\.js|MouseEvent|click]
  │     [Read: /path/to/automation/docs.md]
  │
  └────────────────────────────────────────────────

Tool calls get collapsed into readable one-liners — [Read: path], [Edit: path], [Bash: command], [Task: "description" → agent] — so you can follow the conversation without drowning in JSON.


Live topic tracking

Capture what you're working on during sessions via Claude Code hooks. Topics get indexed for search.

Add to ~/.claude/settings.json (or merge with your existing hooks):

{
  "hooks": {
    "UserPromptSubmit": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "session-topic-capture UserPromptSubmit"
          }
        ]
      }
    ],
    "PreCompact": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "session-topic-capture PreCompact"
          }
        ]
      }
    ],
    "SessionEnd": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "session-topic-capture SessionEnd"
          }
        ]
      }
    ]
  }
}

Topics are captured every 10 exchanges, before compaction, and at session end.

Background indexing (macOS)

Keep the index fresh automatically:

cp launchagent/com.session-indexer.plist ~/Library/LaunchAgents/
# Edit the plist to point to your Python path
launchctl load ~/Library/LaunchAgents/com.session-indexer.plist

Runs session-index --incremental every 30 minutes. Only processes new or modified sessions.


Configuration

Works out of the box with sensible defaults. All paths are configurable.

Priority order

  1. CLI flags (--db-path, --projects-dir)
  2. Environment variables (SESSION_INDEX_DB, SESSION_INDEX_PROJECTS, SESSION_INDEX_TOPICS)
  3. Config file (~/.session-index/config.json)
  4. Defaults

Default paths

WhatDefault location
Database~/.session-index/sessions.db
Sessions~/.claude/projects/
Topics~/.claude/session-topics/
Config~/.session-index/config.json

Optional config file

`

// HOW IT'S BUILT

// FILES

2 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.

  • skills/session-index/SKILL.md3.3 KBupstream ↗
    ---
    name: session-index
    description: Search, analyze, and synthesize across all your Claude Code sessions. Ask "what did I try last time?" and get answers with resume links.
    version: 0.3.1
    author: Lee Fuhr
    tags:
      - session-search
      - session-history
      - analytics
      - memory
      - productivity
    requires:
      - python3
      - pip
    ---
    
    # Session index skill
    
    You have access to a session index — a SQLite database with FTS5 full-text search across all Claude Code sessions. Use it whenever the user asks about past sessions, previous conversations, or wants to know what they've tried before.
    
    **The user's interface is this conversation.** They ask naturally ("Didn't we discuss browser control recently?"), you translate to CLI commands, and present results conversationally. They should never need to know the CLI syntax.
    
    ## How to handle session queries
    
    ### 1. Extract keywords from the question
    
    The user says: "Didn't we discuss browser control recently?"
    You search: `sessions "browser control"`
    
    The user says: "What approaches have I tried for form automation?"
    You search: `sessions "form automation"`
    
    The user says: "How much time did I spend on Acme this week?"
    You run: `sessions analytics --client "Acme" --week`
    
    ### 2. Run the right command via Bash
    
    **Search** — find sessions by topic:
    ```bash
    sessions "relevant keywords"
    sessions "relevant keywords" --context    # includes conversation excerpts
    ```
    
    **Context** — read the actual conversation from a session:
    ```bash
    sessions context <session_id> "search term"   # exchanges matching a term
    sessions context <session_id>                 # all exchanges
    ```
    
    **Analytics** — effort, time, tool usage:
    ```bash
    sessions analytics                    # overall
    sessions analytics --client "Acme"    # per client
    sessions analytics --week             # this week
    sessions analytics --month            # this month
    ```
    
    **Filter** — find sessions by metadata:
    ```bash
    sessions find --client "Acme"              # by client
    sessions find --tool Task --week           # by tool + date
    sessions find --project myapp              # by project
    sessions recent 20                         # last N sessions
    ```
    
    ### 3. For synthesis ("what worked?", "what have I tried?")
    
    This is the most valuable capability. When the user asks a question that spans multiple sessions:
    
    1. Search: `sessions "topic" -n 10`
    2. For the top 3-5 results, extract context: `sessions context <id> "topic" -n 3`
    3. Spawn a Task with `model="haiku"` to synthesize:
       - What approaches were tried?
       - What worked / what failed?
       - Recurring patterns?
       - Current state?
    4. Present the synthesis conversationally with `claude --resume <id>` links for each source session
    
    This uses an in-session Haiku subagent — no external API key needed.
    
    ### 4. Present results conversationally
    
    Don't dump raw CLI output. Summarize:
    - "You discussed browser control in 3 sessions last week..."
    - "The main approach that worked was..."
    - Include `claude --resume <session_id>` links so they can jump back in
    - If context is relevant, quote key exchanges
    
    ## Installation
    
    ```bash
    pip install claude-session-index
    ```
    
    First run of any command auto-indexes all existing sessions.
    
    ## Data location
    
    - **Database:** `~/.session-index/sessions.db`
    - **Topics:** `~/.claude/session-topics/`
    - **Config:** `~/.session-index/config.json` (optional)
    
  • README.mdupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

Plain-text copy, no login: /skill-bundles/lee-fuhr-claude-session-index-skills-session-index.md

// REPO STATS

31 stars
2 open issues
Last commit: 9mo ago