sessiondb
Index Claude Code session JSONL logs into a SQLite + FTS5 database with Japanese-aware tokenization, and search them
Skill by koteitan
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/koteitan-sessiondb
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/sessiondb
What's inside
- Skill name
sessiondb- Description
- Index Claude Code session JSONL logs into a SQLite + FTS5 database with Japanese-aware tokenization, and search them
- License
- MIT
- Instructions
- 63 lines in SKILL.md · view on GitHub
Files (5)
- README-ja.md
- README.md
- SKILL.md
- how-to-create-db-ja.md
- how-to-create-db.md
SKILL.md (first lines)
# sessiondb
Full-text search over past Claude Code sessions stored as JSONL in
`~/.claude/projects/`.
## When to invoke
- User wants to find a past session by topic or keyword
("あの話どこでしたっけ", "find the session about X").
- User asks to (re)build or update the session index.
- User asks aggregate stats about session history that would be slow with grep.
Do **not** invoke for lookups inside the current session — use `Read`/`Grep`.
## Database location
`~/.claude/sessiondb/sessions.db` (override with env var `SESSIONDB_PATH`).
## CLI
```
sessiondb index # incremental rebuild
sessiondb index --full # drop and rebuild from scratch
sessiondb search "<query>" --format=jsonl [--project P] [--role R] [--limit N]
sessiondb search # query 省略 = セッション一覧 (新しい順)
sessiondb stats # content totals (sum of source JSONL bytes)
sessiondb size [--format=json] # on-disk DB usage (.db + WAL/SHM + page stats)
sessiondb show <session_id> [--line L] [--context K]
```
**重要**: エージェントが呼ぶときは必ず `--format=jsonl` を付ける。CLI の
既定は `--format=table` (人間向け TSV) なので、明示しないと下記の
JSON Lines 形式は得られない。
If `bin/sessiondb` is not installed, fall back to invoking `sqlite3` directly:
```sql
SELECT m.session_id,
snippet(messages_fts, 0, '<b>', '</b>', '…', 32) AS snippet,
bm25(messages_fts) AS score,
m.ts, m.role, m.source_path, m.line_no
FROM messages_fts JOIN messages m ON m.id = messages_fts.rowid
WHERE messages_fts MATCH :query
ORDER BY score LIMIT 20;
```
## Response format (search)
JSON Lines, one hit per line, followed by a summary line:
```jsonl
{"session_id":"…","project":"…","ts":"…","role":"…","snippet":"…","score":-4.21,"source_path":"…","line_no":142,"resume":"claude --resume …"}
{"_summary":{"hits":17,"shown":10,"query":"…","ms":34}}
```
`--format=table` (CLI 既定) is TSV for human reading; do not parse from agent.
## Build / schema / ingest details
See [how-to-create-db.md](how-to-create-db.md). Read it only when you need to
implement, modify, or debug the indexer; not on every search.From koteitan/my-skills, MIT.
More from koteitan/my-skills
- 0.587score
heart-beat
koteitan
Keep working autonomously until the proof is complete, with a CronCreate heartbeat that wakes the session whenever it has been idle for X minutes.
SkillAFreshness: A★ 1Claude Code +9 - 0.552score
nostr
koteitan
koteitan's Nostr hub — relay discovery (bootstrap → kind:10002 → kind:3 → fallback), NIP-19 bech32 encode/decode (naddr/nevent/npub, DIY, no nostr-tools), CLI…
SkillBFreshness: B★ 1Claude Code +9 - 0.552score
manim-tts
koteitan
Building narrated explainer videos with manim + VOICEVOX TTS — hard-won pitfalls that produce silently broken output.
SkillBFreshness: B★ 1Claude Code +9 - 0.552score
my-github-md-rule
koteitan
Apply the user's selected README language and navigation-link convention.
SkillBFreshness: B★ 1Claude Code +9 - 0.552score
github-math-check
koteitan
Verify that math in a Markdown file actually renders on GitHub.
SkillBFreshness: B★ 1Claude Code +9 - 0.549score
autonomy-stat
koteitan
Measure a Claude Code agent's autonomy (self-running time) from a session JSONL and render it as an interactive HTML chart.
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
use-bms
koteitan
Build and drive the yaBMS `c/bms` CLI on Linux — expand a Bashicu Matrix by a bracket, check whether a matrix is standard, compare two matrices, and search…
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
webapp-defaults
koteitan
The standing defaults when scaffolding a small vanilla web app (index.html + main.js + style.css) — dark mode ON by default and persisted to localStorage, a…
SkillBFreshness: B★ 1Claude Code +9 - 0.502score
check-usage
koteitan
Report the Claude Code 5-hour and weekly (Max plan) rate-limit state — percent used, reset time, and the exhaustion forecast at the current pace.
SkillCFreshness: C★ 1Claude Code +9 - 0.499score
get-context
koteitan
Report the current Claude Code session's context-window usage percentage, computed locally from the session JSONL usage metadata
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
mermaid
koteitan
Rules for drawing Mermaid diagrams — no node fill colors, no diamond nodes, short captions without parentheses
SkillCFreshness: C★ 1Claude Code +9 - 0.489score
compact-unfreeze
koteitan
Before the user runs /compact from the remote client, arm a one-shot Monitor so its firing flushes the post-compact frozen remote input queue
SkillCFreshness: C★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Jul 6, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/koteitan/my-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from koteitan
- 0.587score
heart-beat
koteitan
Keep working autonomously until the proof is complete, with a CronCreate heartbeat that wakes the session whenever it has been idle for X minutes.
SkillAFreshness: A★ 1Claude Code +9 - 0.552score
manim-tts
koteitan
Building narrated explainer videos with manim + VOICEVOX TTS — hard-won pitfalls that produce silently broken output.
SkillBFreshness: B★ 1Claude Code +9 - 0.552score
my-github-md-rule
koteitan
Apply the user's selected README language and navigation-link convention.
SkillBFreshness: B★ 1Claude Code +9 - 0.552score
github-math-check
koteitan
Verify that math in a Markdown file actually renders on GitHub.
SkillBFreshness: B★ 1Claude Code +9 - 0.552score
nostr
koteitan
koteitan's Nostr hub — relay discovery (bootstrap → kind:10002 → kind:3 → fallback), NIP-19 bech32 encode/decode (naddr/nevent/npub, DIY, no nostr-tools), CLI…
SkillBFreshness: B★ 1Claude Code +9 - 0.549score
autonomy-stat
koteitan
Measure a Claude Code agent's autonomy (self-running time) from a session JSONL and render it as an interactive HTML chart.
SkillBFreshness: B★ 1Claude Code +9
Cite this page
sessiondb skill. Agent Mart. https://agentmart.dev/skills/koteitan-sessiondb (last updated 2026-10-24)