Used to set a name for the current Codex thread. This skill should never be called automatically; use it only when the user manually invokes it or explicitly asks to rename the current session.
If the user manually invokes this skill, then even if no additional description is provided, it is considered that they have explicitly asked to rename the current Codex thread; do not ask again "do you want to rename". By default, generate a name directly based on the current context and call the script to set it, without showing candidates or waiting for user confirmation. Only when the user explicitly asks for candidate names or asks to choose among them should you enter the candidate flow.
Workflow
-
Generate a name based on the current task, cwd, repository, or project context.
-
The name format is fixed as
Project: 标题, for exampleprompts: 新增会话命名 skill。 -
The full name length should be about
prompts: 新增 Codex 会话命名 skill, with a target of about 20-30 visible characters and no more than 36 visible characters; compress the wording if it is too long. -
The Project name should be determined by the model based on context; do not mechanically use the cwd basename.
-
When the user has not explicitly asked for candidate names, directly call the script to set the generated name; do not first show the name, seek confirmation, or require a choice.
-
When the user explicitly asks for candidate names or asks to choose among them, draft 3 candidate names, ordered from highest to lowest recommendation, numbered
1、2、3, but do not mark the recommended item in the list items, and then ask the user to enter a number to choose:1. prompts: 新增会话命名 skill 2. prompts: Codex thread 命名脚本 3. prompts: 当前会话标题治理
Please choose 1/2/3. If you confirm directly, the first item will be selected by default.
7. 在候选流程中,如果用户只回复“同意”“可以”“ok”“就这样”等确认语,没有给数字,则选择第 1 个推荐项。
8. 用户选择后,调用脚本设置当前 thread 名称:
```bash
cd /Users/dcjanus/Code/prompts/skills/codex-thread-namer
./scripts/set_current_thread_name.py "Project: 标题"
Script Contract
- The script accepts only 1 positional argument: the full thread name.
- The script is not responsible for generating candidate names, asking the user, or choosing a title.
- If the current environment does not have
CODEX_THREAD_ID, the script will report an error and explain that it cannot determine which Codex session to set.
Known Limitation
- Codex Desktop GUI may not refresh in real time the thread name written by an external app-server; after a successful set, the name has been persisted, but Desktop may need to be restarted to display the new title. When troubleshooting or explaining the background is needed, read codex-desktop-thread-name-refresh.md。