Chuyển đến nội dung
Skillpedia
Khác5.1k · #15042

peon-ping-rename

Skill này làm gì

Skill này đặt tên cho phiên hiện tại để các thông báo peon-ping và tab terminal dễ phân biệt. Skill dành cho người chạy nhiều phiên Claude Code cùng lúc.

Khi nào nên dùng

  • ✓Khi bạn chạy nhiều phiên Claude Code và muốn đặt tên cho từng phiên.
  • ✓Khi bạn muốn một thông báo hiển thị tên phiên rõ ràng.
  • ✓Khi bạn muốn đặt lại tên phiên về chế độ tự động.

Liên kết skill

https://github.com/PeonPing/peon-ping/blob/main/skills/peon-ping-rename/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/PeonPing/peon-ping/blob/main/skills/peon-ping-rename/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Đổi tên phiên này thành Auth Refactor để tôi có thể tìm nó trong các tab terminal.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Một hook lưu tên cho phiên này và cập nhật tiêu đề tab terminal ngay lập tức. Gọi lệnh mà không có tên sẽ đặt lại về tự động.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

peon-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:

  1. Extracts the session ID and name
  2. Writes session_names[session_id] = name to .state.json
  3. Immediately updates the terminal tab title via ANSI escape sequence
  4. 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

Câu hỏi thường gặp

Tên phiên có thể dài bao nhiêu?

Tên được giới hạn ở 50 ký tự.

Những ký tự nào được phép?

Chữ cái, chữ số, khoảng trắng, dấu chấm, dấu gạch ngang và dấu gạch dưới.

Đổi tên có tốn token của mô hình không?

Skill nói rằng hook xử lý lệnh mà không dùng token của mô hình.

Chi tiết

Mô tả gốc của tác giả

Rename the current Claude session for peon-ping notifications and terminal tab title. Use when user wants to give this session a custom name like "/peon-ping-rename Auth Refactor". Call with no argument to reset to auto-detect.

repo: PeonPing/peon-ping

Độ phổ biến

Sao GitHub
5.1k
Vị trí xếp hạng
#15042
Giấy phép
MIT
Cập nhật
19/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự