From 529751f4d03e4364ba7a6e40bc720c15f06deca9 Mon Sep 17 00:00:00 2001 From: Dario Filipaj Date: Thu, 9 Apr 2026 13:35:17 +0200 Subject: [PATCH 1/2] update(tb-session): add workflow guidance to SKILL.md for better AI agent usage Adds a structured Workflow section that instructs Claude Code how to use tb-session effectively: always use --json, pick the right command per intent, present results with structured fields, offer concrete next steps, and actually execute resume when asked. Co-Authored-By: Claude Opus 4.6 (1M context) --- crates/tb-session/SKILL.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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. From e719bce7e388b8e4b0ce7b25b47c690f9e885c17 Mon Sep 17 00:00:00 2001 From: Dario Filipaj Date: Thu, 9 Apr 2026 13:40:15 +0200 Subject: [PATCH 2/2] tb-session: bump version to 0.2.0 --- Cargo.lock | 2 +- crates/tb-session/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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