Auto-Pilot / 全自动
更新于 a month ago

terminal-title

Bbluzername
0.0k
bluzername/claude-code-terminal-title/temp_extract/terminal-title
72
Agent 评分

💡 摘要

该技能根据用户的高级任务自动更新终端窗口标题,以帮助管理多个Claude Code会话。

🎯 适合人群

管理多个并发编码任务的开发者运行多个Claude Code终端实例的用户需要监控不同工作流进度的项目负责人经常在代码库不同部分之间切换上下文的开发者

🤖 AI 吐槽:这本质上就是个美化版的echo命令,其用户手册比它要运行的脚本还长。

安全分析中风险

该技能执行外部shell脚本(`scripts/set_title.sh`),如果标题参数未经过适当清理,会引入命令注入风险。缓解措施:在将标题字符串传递给bash命令之前,应验证并清理该字符串(例如,移除shell元字符)。


name: terminal-title description: Automatically updates terminal window title to reflect the current high-level task. Use at the start of every Claude Code session when the user provides their first prompt, and whenever the user switches to a distinctly new high-level task. Helps developers manage multiple Claude Code terminals by providing clear, at-a-glance identification of what each terminal is working on. min_claude_code_version: "1.0.0" version: "1.1.0"

Terminal Title

Overview

Automatically sets descriptive terminal window titles based on the task Claude is working on. Essential for developers running multiple Claude Code instances who need to quickly identify which terminal is handling 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 (e.g., 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/component to a completely different one
  • Starting work on a different part of the system (e.g., 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: Analyze the user's prompt to identify the high-level task
  2. Generate Title: Create a concise, descriptive title (max 40 characters)
  3. Set Title: Execute the scripts/set_title.sh script with the generated title
  4. No Confirmation Needed: This happens automatically 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"

Bad titles:

  • Too long: "Implementing the new authentication system with OAuth2.0 support" (exceeds 40 chars)
  • Too generic: "Working" or "Coding"
  • Too verbose: "The user wants me to help them with..."

Format pattern:

[Action/Category]: [Specific Focus]

Keep titles concise, actionable, and immediately recognizable.

Common Mistakes to Avoid

❌ Too Verbose:

  • Bad: "Working on implementing the user authentication system with JWT tokens"
  • Good: "Build: JWT Auth"

❌ Too Vague:

  • Bad: "Code stuff"
  • Bad: "Working"
  • Good: "Refactor: API Layer"

❌ Including System Information:

  • Bad: "john-macbook-pro: Debug app"
  • Bad: "/Users/john/project: Build feature"
  • Good: "Debug: App Issues"

❌ Using Complete Sentences:

  • Bad: "I am working on the dashboard component"
  • Good: "Build: Dashboard UI"

Implementation

Execute the title script:

bash scripts/set_title.sh "Your Title Here"

Example workflow:

# User asks: "Help me debug the authentication flow in the API" bash scripts/set_title.sh "Debug: Auth API Flow" # User asks: "Create a React component for the user profile page" bash scripts/set_title.sh "Build: User Profile UI" # User asks: "Write tests for the payment processing module" bash scripts/set_title.sh "Test: Payment Module"

Script Details

The scripts/set_title.sh script uses ANSI escape sequences to set the terminal title. It's compatible with:

  • macOS Terminal
  • iTerm2
  • Alacritty
  • Most modern terminal emulators (xterm, rxvt, screen, tmux)

The script accepts a single argument (the title string) and exits silently if no title is provided (fail-safe behavior).

Optional Customization

Users can optionally customize terminal titles with a prefix by setting the CLAUDE_TITLE_PREFIX environment variable:

export CLAUDE_TITLE_PREFIX="🤖 Claude"

This produces titles like: 🤖 Claude | Build: Dashboard UI

Without the prefix, titles remain in the standard format: Build: Dashboard UI

Note: You don't need to check for this variable or modify your behavior. The script handles this automatically.

五维分析
清晰度8/10
创新性4/10
实用性9/10
完整性8/10
可维护性7/10
优缺点分析

优点

  • 对多终端工作流程有明显效用
  • 使用指南和示例文档完善
  • 设计简单、目的单一
  • 包含故障安全行为和可选定制功能

缺点

  • 新颖性有限——基本的终端标题功能
  • 依赖外部shell脚本执行
  • 效果完全取决于准确的任务检测
  • 文档中未明确错误处理或回退机制

相关技能

pytorch

S
toolCode Lib / 代码库
92/ 100

“它是深度学习的瑞士军刀,但祝你好运能从47种安装方法里找到那个不会搞崩你系统的那一个。”

agno

S
toolCode Lib / 代码库
90/ 100

“它承诺成为智能体领域的Kubernetes,但得看开发者有没有耐心学习又一个编排层。”

nuxt-skills

S
toolCo-Pilot / 辅助式
90/ 100

“这本质上是一份组织良好的小抄,能把你的 AI 助手变成一只 Nuxt 框架的复读机。”

免责声明:本内容来源于 GitHub 开源项目,仅供展示和评分分析使用。

版权归原作者所有 bluzername.