About peon-ping-rename
peon-ping-rename is a skill for assigning a custom name to the current session. It updates the terminal tab title and the name used in desktop notification titles, with independent names for sessions in the same repository.
Key features
- 01Rename the current session
- 02Update the terminal tab title
- 03Use the name in notification titles
- 04Keep names independent across tabs
- 05Reset to automatic naming
Use cases
- 01Label a session for an API task
- 02Distinguish multiple sessions in one repository
- 03Restore automatic project-based naming
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ peonping/ peon-ping --skill peon-ping-renameAfter installing, type/peon-ping-renamein Claude Code to confirm it loaded.
Details
From the project READMEpeon-ping-rename
Give the current session a custom name shown in desktop notification titles and the terminal tab title.
How it works
When the user types /peon-ping-rename <name>, a UserPromptSubmit hook intercepts the command before it reaches the model:
- Extracts the session ID and name
- Writes
session_names[session_id] = nameto.state.json - Immediately updates the terminal tab title via ANSI escape sequence
- Returns confirmation (zero tokens used)
On every subsequent hook event, peon.sh reads session_names[session_id] as the highest-priority project name. Multiple tabs in the same repo each get independent names.
Usage
/peon-ping-rename Auth Refactor
/peon-ping-rename API: payments
/peon-ping-rename ← reset to auto-detect
Names are capped at 50 characters. Allowed: letters, numbers, spaces, dots, hyphens, underscores.
Manual fallback (if hook fails)
1. Get the session ID
echo "$CLAUDE_SESSION_ID"
2. Write name to state
python3 -c "
import json, os, time
state_path = os.path.expanduser('~/.claude/hooks/peon-ping/.state.json')
try:
state = json.load(open(state_path))
except:
state = {}
state.setdefault('session_names', {})['SESSION_ID_HERE'] = 'My Session Name'
json.dump(state, open(state_path, 'w'), indent=2)
"
3. Trigger a hook event to refresh the tab title
Submit any prompt — peon.sh will pick up the new name on the next UserPromptSubmit or Stop event.
Reset
/peon-ping-rename
Or remove the session ID from session_names in .state.json directly.
Priority
/peon-ping-rename > CLAUDE_SESSION_NAME env var > .peon-label file > notification_title_script > project_name_map > notification_title_override > git repo name > folder name