diff --git a/Cargo.lock b/Cargo.lock index b8d58f4..676e025 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2113,7 +2113,7 @@ dependencies = [ [[package]] name = "tb-session" -version = "0.1.0" +version = "0.2.0" dependencies = [ "assert_cmd", "chrono", diff --git a/crates/tb-session/Cargo.toml b/crates/tb-session/Cargo.toml index 6f3bb47..6808b5c 100644 --- a/crates/tb-session/Cargo.toml +++ b/crates/tb-session/Cargo.toml @@ -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 diff --git a/crates/tb-session/SKILL.md b/crates/tb-session/SKILL.md index 8241e6a..5e5038b 100644 --- a/crates/tb-session/SKILL.md +++ b/crates/tb-session/SKILL.md @@ -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 "" --json` + - User mentions a PR → `tb-session search --pr --json` + - User asks "what have we been working on" → `tb-session list --json` + - User says "resume" → search first, then `tb-session resume ` +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 ` to see conversation detail + - `tb-session resume ` to continue the session in a new tab +5. **When the user says "resume"**, you MUST call `tb-session resume ` 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.