SKILL·39FCE7

terminal-title

bluzername
更新于 4 days ago
2 次查看
141
15
141
在 GitHub 上查看
设计aiautomation

关于

This skill automatically updates terminal window titles to reflect Claude's current task, helping developers identify multiple sessions at a glance. Trigger it at the start of each Claude Code session and whenever switching to a distinctly new high-level task. It's essential for managing parallel development work across different terminals.

快速安装

Claude Code

推荐
主要方式
npx skills add bluzername/claude-code-terminal-title -a claude-code
插件命令备选方式
/plugin add https://github.com/bluzername/claude-code-terminal-title
Git 克隆备选方式
git clone https://github.com/bluzername/claude-code-terminal-title.git ~/.claude/skills/terminal-title

在 Claude Code 中复制并粘贴此命令以安装该技能

技能文档

Terminal Title

Overview

Sets a descriptive terminal window title based on the task Claude is working on. Essential for developers running multiple Claude Code instances who need to identify which terminal handles which task.

When to Use

Always trigger this skill:

  • At the start of every new Claude Code session (after receiving the first user prompt)
  • When switching to a substantially different task (for example from "API Integration" to "Database Migration")

Trigger on task switches like these:

  • Switching from frontend work to backend work
  • Moving from debugging to new feature development
  • Changing from one module or component to a completely different one
  • Starting work on a different part of the system (for example from auth to payments)

Do NOT trigger for:

  • Follow-up questions about the same task ("Can you add a comment to that function?")
  • Small refinements to current work ("Make it blue instead of red")
  • Debugging the same feature you just built
  • Clarifications ("What did you mean by X?")
  • Iterating on the same component or module
  • Mid-task status updates or progress checks

How It Works

  1. Extract task summary: identify the high-level task from the user's prompt
  2. Generate title: create a concise, descriptive title (max 40 characters)
  3. Set title: run set_title.sh with the generated title
  4. No confirmation needed: this happens silently in the background

Title Format Guidelines

Good titles:

  • "API Integration: Auth Flow"
  • "Fix: Login Bug"
  • "DB Migration: Users Table"
  • "Build: Dashboard UI"
  • "Refactor: Payment Module"

Displayed as (the script adds the folder prefix):

  • my-project | API Integration: Auth Flow
  • my-project | Fix: Login Bug

Bad titles:

  • Too long: "Implementing the new authentication system with OAuth2.0 support"
  • Too generic: "Working" or "Coding"
  • Too verbose: "The user wants me to help them with..."
  • Includes system information: "/Users/john/project: Build feature"
  • A full sentence: "I am working on the dashboard component"

Format pattern:

[Action/Category]: [Specific Focus]

Keep titles concise, actionable, and immediately recognizable.

Implementation

Run the script from the installed skill directory. The personal install path is shown; for a project install use .claude/skills/terminal-title/scripts/set_title.sh relative to the project root.

bash ~/.claude/skills/terminal-title/scripts/set_title.sh "Your Title Here"

Example workflow:

# User asks: "Help me debug the authentication flow in the API"
bash ~/.claude/skills/terminal-title/scripts/set_title.sh "Debug: Auth API Flow"

# User asks: "Create a React component for the user profile page"
bash ~/.claude/skills/terminal-title/scripts/set_title.sh "Build: User Profile UI"

# User asks: "Write tests for the payment processing module"
bash ~/.claude/skills/terminal-title/scripts/set_title.sh "Test: Payment Module"

Script Details

scripts/set_title.sh writes the OSC 0 escape sequence to the controlling terminal (/dev/tty), falling back to stdout when no terminal is attached. It also stores the title in ~/.claude/terminal_title so shell hooks can re-apply it after each prompt. It is compatible with macOS Terminal.app, iTerm2, Alacritty, Kitty, and most xterm-compatible emulators (including tmux and screen).

The script takes one argument (the title) and exits silently when none is given.

Automatic Directory Prefix

Every title is prefixed with the current directory name (usually the repo name):

my-project | Build: Dashboard UI
another-repo | Debug: Auth API

Optional Custom Prefix

Users can add a custom prefix through the CLAUDE_TITLE_PREFIX environment variable:

export CLAUDE_TITLE_PREFIX="Claude"

This produces titles like Claude | my-project | Build: Dashboard UI.

Note: You do not need to check these variables or change your behaviour. The script handles them.

Deterministic Alternative

hooks/set-title-hook.sh in this skill directory can be wired as a Claude Code UserPromptSubmit hook. It sets the title from the first line of every prompt without relying on this skill being invoked. See the project README for the settings snippet.

GitHub 仓库

bluzername/claude-code-terminal-title
路径: skill/terminal-title
0
FAQ

常见问题

什么是 terminal-title Skill?

terminal-title 是一个 Claude Skill,作者为 bluzername。Skill 将 Claude 按需加载的说明和资源打包,让 Claude 无需额外提示即可执行与 terminal-title 相关的任务。

如何安装 terminal-title?

使用本页的安装命令:将 terminal-title 作为插件添加到 Claude Code,或将其仓库克隆到 skills 目录,然后重启 Claude 以加载该 Skill。

terminal-title 属于哪个分类?

terminal-title 属于设计分类。

terminal-title 可以免费使用吗?

可以。terminal-title 已收录在 AIMCP,可免费安装。

相关推荐技能

executing-plans
设计

该Skill用于当开发者提供完整实施计划时,以受控批次方式执行代码实现。它会先审阅计划并提出疑问,然后分批次执行任务(默认每批3个任务),并在批次间暂停等待审查。关键特性包括分批次执行、内置检查点和架构师审查机制,确保复杂系统实现的可控性。

查看技能
requesting-code-review
设计

该Skill可在完成任务、实现主要功能或合并代码前自动调度代码审查子代理,确保实现符合需求和计划。它支持通过指定git SHA范围进行精准的代码变更审查,帮助开发者在关键节点及时发现潜在问题。核心原则是"早审查、勤审查",适用于开发流程的各个关键阶段。

查看技能
connect-mcp-server
设计

这个Skill指导开发者如何将MCP服务器连接到Claude Code,支持HTTP、stdio和SSE三种传输协议。它涵盖了从安装配置到认证安全的完整流程,适用于集成GitHub、Notion、数据库等外部服务。当开发者需要添加集成、配置外部工具或提及MCP相关功能时,这个Skill能提供实用的操作指南。

查看技能
web-cli-teleport
设计

该Skill帮助开发者根据任务特性选择Claude Code的Web或CLI界面,并指导如何在两种环境间无缝迁移会话。它能分析任务复杂度、迭代需求等要素,推荐最优工作界面和工作流。关键特性包括会话状态管理、环境切换指导和上下文优化建议。

查看技能