Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/tb-session/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tb-session"
version = "0.1.0"
version = "0.2.0"
edition = "2024"
description = "Claude Code session search CLI"
authors.workspace = true
Expand Down
22 changes: 22 additions & 0 deletions crates/tb-session/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,28 @@ tb-session resume "auth refactor"
- **Resume accepts names** — `resume "auth refactor"` searches summary/first prompt and resumes the most recent match. UUID prefixes of any length also work.
- **URLs work as search queries** — special characters are sanitized automatically.

## Workflow

When handling a session-related request:

1. **Always use `--json`** on search and list commands — structured output is easier to parse and present accurately.
2. **Pick the right command**:
- User describes content → `tb-session search "<query>" --json`
- User mentions a PR → `tb-session search --pr <N> --json`
- User asks "what have we been working on" → `tb-session list --json`
- User says "resume" → search first, then `tb-session resume <id>`
3. **Always present results with structured fields** — for each session shown, include:
- Session ID (prefix is fine)
- Branch name
- Summary or first prompt
- Last-active timestamp
- Even when matches are weak, show the top 1–2 results so the user can judge relevance.
4. **After presenting results**, offer a concrete next step:
- `tb-session show <id>` to see conversation detail
- `tb-session resume <id>` to continue the session in a new tab
5. **When the user says "resume"**, you MUST call `tb-session resume <id>` after finding the session. Do not just describe it — execute the resume.
6. **Stay efficient** — aim for 1–3 tool calls. One search + one action is usually enough. Only retry with different keywords if the first search returned no relevant results.

## Getting started

Run `tb-session prime` for available commands and index status.
Expand Down