$npx -y skills add lee-fuhr/claude-session-index --skill session-indexSearch, analyze, and synthesize across all your Claude Code sessions. Ask "what did I try last time?" and get answers with resume links.
| 1 | # Session index skill |
| 2 | |
| 3 | 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. |
| 4 | |
| 5 | **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. |
| 6 | |
| 7 | ## How to handle session queries |
| 8 | |
| 9 | ### 1. Extract keywords from the question |
| 10 | |
| 11 | The user says: "Didn't we discuss browser control recently?" |
| 12 | You search: `sessions "browser control"` |
| 13 | |
| 14 | The user says: "What approaches have I tried for form automation?" |
| 15 | You search: `sessions "form automation"` |
| 16 | |
| 17 | The user says: "How much time did I spend on Acme this week?" |
| 18 | You run: `sessions analytics --client "Acme" --week` |
| 19 | |
| 20 | ### 2. Run the right command via Bash |
| 21 | |
| 22 | **Search** — find sessions by topic: |
| 23 | ```bash |
| 24 | sessions "relevant keywords" |
| 25 | sessions "relevant keywords" --context # includes conversation excerpts |
| 26 | ``` |
| 27 | |
| 28 | **Context** — read the actual conversation from a session: |
| 29 | ```bash |
| 30 | sessions context <session_id> "search term" # exchanges matching a term |
| 31 | sessions context <session_id> # all exchanges |
| 32 | ``` |
| 33 | |
| 34 | **Analytics** — effort, time, tool usage: |
| 35 | ```bash |
| 36 | sessions analytics # overall |
| 37 | sessions analytics --client "Acme" # per client |
| 38 | sessions analytics --week # this week |
| 39 | sessions analytics --month # this month |
| 40 | ``` |
| 41 | |
| 42 | **Filter** — find sessions by metadata: |
| 43 | ```bash |
| 44 | sessions find --client "Acme" # by client |
| 45 | sessions find --tool Task --week # by tool + date |
| 46 | sessions find --project myapp # by project |
| 47 | sessions recent 20 # last N sessions |
| 48 | ``` |
| 49 | |
| 50 | ### 3. For synthesis ("what worked?", "what have I tried?") |
| 51 | |
| 52 | This is the most valuable capability. When the user asks a question that spans multiple sessions: |
| 53 | |
| 54 | 1. Search: `sessions "topic" -n 10` |
| 55 | 2. For the top 3-5 results, extract context: `sessions context <id> "topic" -n 3` |
| 56 | 3. Spawn a Task with `model="haiku"` to synthesize: |
| 57 | - What approaches were tried? |
| 58 | - What worked / what failed? |
| 59 | - Recurring patterns? |
| 60 | - Current state? |
| 61 | 4. Present the synthesis conversationally with `claude --resume <id>` links for each source session |
| 62 | |
| 63 | This uses an in-session Haiku subagent — no external API key needed. |
| 64 | |
| 65 | ### 4. Present results conversationally |
| 66 | |
| 67 | Don't dump raw CLI output. Summarize: |
| 68 | - "You discussed browser control in 3 sessions last week..." |
| 69 | - "The main approach that worked was..." |
| 70 | - Include `claude --resume <session_id>` links so they can jump back in |
| 71 | - If context is relevant, quote key exchanges |
| 72 | |
| 73 | ## Installation |
| 74 | |
| 75 | ```bash |
| 76 | pip install claude-session-index |
| 77 | ``` |
| 78 | |
| 79 | First run of any command auto-indexes all existing sessions. |
| 80 | |
| 81 | ## Data location |
| 82 | |
| 83 | - **Database:** `~/.session-index/sessions.db` |
| 84 | - **Topics:** `~/.claude/session-topics/` |
| 85 | - **Config:** `~/.session-index/config.json` (optional) |