Skip to content
Back to search

recall

SkillWorks with Claude CodeGitHub

Search past Claude Code, Codex, pi and Grok sessions. Triggers: /recall, "search old conversations", "find a past session", "recall a previous conversation", "search session history", "what did we discuss", "remember when we"

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/arjunkmrm--recall/badge.svg)](/listings/arjunkmrm--recall)

HTML

<a href="/listings/arjunkmrm--recall"><img src="/api/listings/arjunkmrm--recall/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

npx skills add arjunkmrm/recall

Then use `/recall` in Claude Code (or Codex, pi, or Grok) or ask "find a past session where we talked about foo" (you might need to restart your agent).

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

SKILL.md · Manifest · 115 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. ---
  2. name: recall
  3. description: >
  4. Search past Claude Code, Codex, pi and Grok sessions. Triggers: /recall, "search old conversations",
  5. "find a past session", "recall a previous conversation", "search session history",
  6. "what did we discuss", "remember when we"
  7. metadata:
  8. author: arjunkmrm
  9. version: "0.4.1"
  10. license: MIT
  11. ---
  12. # /recall — Search Past Claude, Codex, pi & Grok Sessions
  13. Search all past Claude Code, Codex, pi and Grok sessions using full-text search with BM25 ranking.
  14. ## Usage
  15. ```bash
  16. python3 ~/.claude/skills/recall/scripts/recall.py [QUERY] [--project PATH] [--days N] [--source claude|codex|pi|grok] [--limit N] [--reindex]
  17. ```
  18. ## Examples
  19. ```bash
  20. # List every session in the last day (no text search)
  21. python3 ~/.claude/skills/recall/scripts/recall.py --days 1
  22. # List every pi session in the last week
  23. python3 ~/.claude/skills/recall/scripts/recall.py --days 7 --source pi
  24. # Simple keyword search
  25. python3 ~/.claude/skills/recall/scripts/recall.py "bufferStore"
  26. # Phrase search (exact match)
  27. python3 ~/.claude/skills/recall/scripts/recall.py '"ACP protocol"'
  28. # Boolean query
  29. python3 ~/.claude/skills/recall/scripts/recall.py "rust AND async"
  30. # Prefix search
  31. python3 ~/.claude/skills/recall/scripts/recall.py "buffer*"
  32. # Filter by project and recency
  33. python3 ~/.claude/skills/recall/scripts/recall.py "state machine" --project ~/my-project --days 7
  34. # Search only Claude Code sessions
  35. python3 ~/.claude/skills/recall/scripts/recall.py "buffer" --source claude
  36. # Search only Codex sessions
  37. python3 ~/.claude/skills/recall/scripts/recall.py "buffer" --source codex
  38. # Search only pi sessions
  39. python3 ~/.claude/skills/recall/scripts/recall.py "buffer" --source pi
  40. # Search only Grok sessions
  41. python3 ~/.claude/skills/recall/scripts/recall.py "buffer" --source grok
  42. # Force reindex
  43. python3 ~/.claude/skills/recall/scripts/recall.py --reindex "test"
  44. ```
  45. ## Query Syntax (FTS5)
  46. - **Words**: `bufferStore` — matches stemmed variants (e.g., "discussing" matches "discuss")
  47. - **Phrases**: `"ACP protocol"` — exact phrase match
  48. - **Boolean**: `rust AND async`, `tauri OR electron`, `NOT deprecated`
  49. - **Prefix**: `buffer*` — matches bufferStore, bufferMap, etc.
  50. - **Combined**: `"state machine" AND test`
  51. - **CJK**: `issue化` — automatically uses trigram matching for Japanese/Chinese/Korean text
  52. ## After Finding a Match
  53. To resume a session, `cd` into the project directory and use the appropriate command:
  54. ```bash
  55. # Claude Code sessions [claude]
  56. cd /path/to/project
  57. claude --resume SESSION_ID
  58. # Codex sessions [codex]
  59. cd /path/to/project
  60. codex resume SESSION_ID
  61. # Grok sessions [grok]
  62. ```bash
  63. grok --resume SESSION_ID
  64. ```
  65. # Pi sessions [pi]
  66. cd /path/to/project
  67. pi --session SESSION_ID # full or partial id; pi resolves prefix matches
  68. ```
  69. Each result includes a `File:` path. Use it to read the raw transcript (auto-detects format):
  70. ```bash
  71. python3 ~/.claude/skills/recall/scripts/read_session.py <File-path-from-result>
  72. ```
  73. If results are missing `File:` paths, run `--reindex` to backfill.
  74. ## Notes
  75. - Index is stored at `~/.recall.db` (SQLite FTS5, auto-migrated from `~/.claude/recall.db`)
  76. - Indexes four sources: `~/.claude/projects/` (Claude Code), `~/.codex/sessions/` (Codex), `~/.pi/agent/sessions/` (pi), and `~/.grok/sessions/**/chat_history.jsonl` (Grok)
  77. - First run indexes all sessions (a few seconds); subsequent runs are incremental
  78. - Only user and assistant messages are indexed (tool calls, thinking blocks, state snapshots skipped)
  79. - Results show `[claude]`, `[codex]`, `[pi]`, or `[grok]` tags to indicate the source
  80. - Dual-table FTS: English queries use Porter stemming, CJK queries use trigram matching
  81. - Omit the query argument for **list mode** — every session in the window, sorted by recency, no FTS
  82. - Provide a query for full-text search; both modes accept `--project`, `--days`, `--source`, `--limit`
  83. - **Upgrading from 0.3.x**: run `--reindex` once to pull in pi sessions
  84. - **Upgrading from 0.4.x**: run `--reindex` once to pull in Grok sessions
  85. - **Upgrading from 0.2.x**: run `--reindex` once to build the CJK index
README.md · README · 64 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # recall
  2. Ever lost a conversation session with Claude Code, Codex, pi or Grok and wish you could resume it? This skill lets your agents search across all your past conversations with full-text search. Builds a SQLite FTS5 index over `~/.claude/projects/`, `~/.codex/sessions/`, `~/.pi/agent/sessions/`, and `~/.grok/sessions/` with BM25 ranking, Porter stemming, CJK support, and incremental updates.
  3. ## Install
  4. ```bash
  5. npx skills add arjunkmrm/recall
  6. ```
  7. Then use `/recall` in Claude Code (or Codex, pi, or Grok) or ask "find a past session where we talked about foo" (you might need to restart your agent).
  8. ## How it works
  9. ### Index
  10. ```
  11. ~/.claude/projects/**/*.jsonl ──┐
  12. │
  13. ~/.codex/sessions/**/*.jsonl ───┼─▶ Index ──▶ ~/.recall.db (SQLite FTS5)
  14. │ [incremental - mtime-based]
  15. ~/.pi/agent/sessions/**/*.jsonl │
  16. ~/.grok/sessions/**/chat_history.jsonl ┘
  17. ```
  18. ### Query
  19. ```
  20. Query ──▶ Detect CJK? ──▶ FTS5 Match ──▶ BM25 rank ──▶ Recency boost ──▶ Results
  21. │ [half-life: 30 days]
  22. │
  23. ┌─────┴──────┐
  24. │ │
  25. No CJK Has CJK
  26. porter trigram
  27. unicode61 table
  28. │ │
  29. └─────┬──────┘
  30. ▼
  31. snippet extraction
  32. highlighted excerpts
  33. ```
  34. - Indexes user/assistant messages into a SQLite FTS5 database at `~/.recall.db`
  35. - First run indexes all sessions (a few seconds); subsequent runs only process new/modified files
  36. - Dual-table FTS: Porter stemming for English, trigram tokenizer for CJK (Japanese, Chinese, Korean)
  37. - CJK messages are selectively indexed into the trigram table; query routing is automatic
  38. - Skips tool_use, tool_result, thinking, and image blocks
  39. - Results ranked by BM25 with a slight recency bias (recent sessions get up to a 20% boost, decaying with a 30-day half-life)
  40. - Results tagged `[claude]`, `[codex]`, `[pi]`, or `[grok]` with highlighted excerpts
  41. - No dependencies — Python 3.9+ stdlib only (sqlite3, json, argparse)
  42. ## Tests
  43. ```bash
  44. python3 -m unittest discover tests -v
  45. ```
  46. Stdlib `unittest` only — no test deps. Synthetic JSONL fixtures generated
  47. in `tmpdir` from the suite itself (no fixture files committed). An
  48. integration test runs against any real pi sessions in `~/.pi/agent/sessions/`
  49. on the host and is skipped if none are present.
  50. ## Contributing
  51. Found a bug or have an idea? [Open an issue](https://github.com/arjunkmrm/recall/issues) or submit a pull request — contributions are welcome!

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.