Agent skill

name

Name or rename the current session — saves to statusline and session notes

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/name

SKILL.md

Your task

Name the current session so it appears in the statusline and is saved for future reference.

The argument provided is: {{ args }}

Steps

  1. Get the session name — use the argument if provided, otherwise ask the user with AskUserQuestion: "What name do you want to give this session?"

  2. Find the current session ID — run:

    bash
    ls -t ~/.claude/projects/*/*.jsonl 2>/dev/null | head -1 | xargs basename | sed 's/\.jsonl$//'
    
  3. Save the session name:

    bash
    mkdir -p ~/.claude/session_notes
    echo "<name>" | tee ~/.claude/session_notes/<session_id>
    
  4. Confirm — tell the user the session is named and will appear in the statusline (📌 ) after the next response.

Note

This is separate from Claude Code's built-in /rename command which renames the session in the UI sidebar. Use /name to tag the session so the statusline always reminds you what you're working on. You can use both: /rename for the sidebar, /name for the statusline.

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results