Problem Statement
Custom slash commands (skills) know exactly what they're doing at invocation time, but have no way to name the session they're running in. /rename is a built-in CLI command that only works when typed manually by the user — it's not available as a tool, via Bash, or through any programmatic interface.
This means a command like /daily (a daily planning check-in) can't auto-name itself daily — Wed Mar 11 even though the context is obvious from the first moment.
Use Case
I have a /daily slash command that runs a structured daily check-in. Every time I use it, I want the session named daily — [date] so I can find it later in claude --resume. Today I have to manually type /rename daily — Wed Mar 11 after the command starts, which defeats the purpose of automation.
Proposed Solution
Any of these would work:
- Expose
/rename as a tool that Claude can call programmatically (e.g. SessionRename tool)
- Allow frontmatter in command
.md files to specify a session name template:
---
name: daily
session-name: "daily — {{date}}"
---
- Expose a Bash-callable interface like
claude session rename "daily — Wed Mar 11"
Option 1 is the most flexible since it works for any skill at any point in the conversation.
Related Issues
Problem Statement
Custom slash commands (skills) know exactly what they're doing at invocation time, but have no way to name the session they're running in.
/renameis a built-in CLI command that only works when typed manually by the user — it's not available as a tool, via Bash, or through any programmatic interface.This means a command like
/daily(a daily planning check-in) can't auto-name itselfdaily — Wed Mar 11even though the context is obvious from the first moment.Use Case
I have a
/dailyslash command that runs a structured daily check-in. Every time I use it, I want the session nameddaily — [date]so I can find it later inclaude --resume. Today I have to manually type/rename daily — Wed Mar 11after the command starts, which defeats the purpose of automation.Proposed Solution
Any of these would work:
/renameas a tool that Claude can call programmatically (e.g.SessionRenametool).mdfiles to specify a session name template:claude session rename "daily — Wed Mar 11"Option 1 is the most flexible since it works for any skill at any point in the conversation.
Related Issues
plan#32434 — Auto-naming during plan mode