{"id":50383457,"url":"https://github.com/thomast8/claude-session-title","last_synced_at":"2026-05-30T13:30:23.783Z","repository":{"id":356454516,"uuid":"1218178130","full_name":"thomast8/claude-session-title","owner":"thomast8","description":"Claude Code plugin: auto-names each session via a Haiku-generated kebab-case title on the first prompt. One-shot, recursion-safe, fallback to a slugified prompt.","archived":false,"fork":false,"pushed_at":"2026-04-22T15:59:25.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-08T06:41:50.588Z","etag":null,"topics":["claude-code","claude-code-plugin","hooks","plugin-marketplace"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thomast8.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-22T15:59:22.000Z","updated_at":"2026-04-22T16:04:02.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/thomast8/claude-session-title","commit_stats":null,"previous_names":["thomast8/claude-session-title"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/thomast8/claude-session-title","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomast8%2Fclaude-session-title","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomast8%2Fclaude-session-title/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomast8%2Fclaude-session-title/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomast8%2Fclaude-session-title/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomast8","download_url":"https://codeload.github.com/thomast8/claude-session-title/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomast8%2Fclaude-session-title/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33694714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["claude-code","claude-code-plugin","hooks","plugin-marketplace"],"created_at":"2026-05-30T13:30:22.213Z","updated_at":"2026-05-30T13:30:23.774Z","avatar_url":"https://github.com/thomast8.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# claude-session-title\n\nA one-plugin Claude Code marketplace that auto-names your sessions.\n\nOn the first prompt of each new session, a `UserPromptSubmit` hook shells out to `claude -p --model haiku` to summarize what you're about to work on, and emits the result as the session title. The pill in the bottom-left (and your `/resume` list, and your session JSON files) rename themselves.\n\nYou pay ~9 seconds of latency on prompt 1. Prompts 2+ are untouched. If Haiku is slow, unavailable, or the call fails, the script falls back to a slugified truncation of your prompt so the title still populates with something reasonable.\n\n## Install\n\n```text\n/plugin marketplace add https://github.com/thomast8/claude-session-title.git\n/plugin install session-title@claude-session-title\n```\n\nThe plugin bundles its hook, so nothing needs to go into your `settings.json`.\n\n## Why\n\nClaude Code sessions default to titles like `untitled-session` or a timestamp. Once you have more than a handful of active sessions (Graphite stacks, parallel investigations, worktrees), \"which one was which?\" becomes a real cost. `/resume` becomes a guessing game.\n\nThe `sessionTitle` field in the `UserPromptSubmit` hook output is honored **only on the hook's first invocation per session** — the harness ignores it after that. So the one viable place to generate a good title is *at the first user prompt*, which is also the earliest moment the session has anything meaningful to summarize. That's what this hook does.\n\n## Examples\n\n### 1. Ad-hoc investigation\n\n```text\nyou: why is the ingestion pipeline dropping chunks 403-417 for Arabic BRDs?\n→ title becomes: debug-arabic-brd-chunk-drops\n```\n\n### 2. Refactor\n\n```text\nyou: extract the LLM retry logic out of AIClient into a standalone decorator\n→ title becomes: extract-llm-retry-decorator\n```\n\n### 3. Fallback when Haiku is slow or offline\n\nIf the `claude -p` call exceeds the 20s internal timeout or fails, the hook slugifies the first 50 characters of your prompt instead. You still get *a* title, just less editorial.\n\n## Prerequisites on the machine\n\n- `claude` — the Claude Code CLI (you already have this if you're installing plugins)\n- `bash`, `jq`, `perl` — standard on macOS and all mainstream Linux distros\n- A working Claude Code auth — the hook calls `claude -p --model haiku --no-session-persistence`, which goes through your usual credentials\n\nThe hook is recursion-safe: the nested `claude -p` call itself fires `UserPromptSubmit`, which re-invokes this hook; the inner invocation short-circuits via the `CLAUDE_TITLE_HOOK_NESTED=1` env var. Once-per-session state lives in a marker file at `$TMPDIR/claude-session-titles/\u003csession-id\u003e.done`.\n\n## Cost and latency\n\n- **Time**: ~9-10s on your first prompt per session. Zero on every subsequent prompt.\n- **API cost**: one Haiku call per session, ~50-100 tokens in / ~10 tokens out. Negligible.\n\nIf the first-prompt latency bothers you, uninstall the plugin and your sessions go back to their default titles.\n\n## Uninstall\n\n```text\n/plugin uninstall session-title@claude-session-title\n/plugin marketplace remove claude-session-title\n```\n\nNothing lingers in your `settings.json`. The `$TMPDIR/claude-session-titles/` marker directory can be deleted by hand; it's rebuilt automatically if you reinstall.\n\n## License\n\nMIT. See [LICENSE](./LICENSE). Use it freely, modify it freely, no warranty.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomast8%2Fclaude-session-title","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomast8%2Fclaude-session-title","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomast8%2Fclaude-session-title/lists"}