jpskill.com
🛠️ 開発・MCP コミュニティ

terminal-title

会話の文脈や話題の変化に応じて、ターミナルウィンドウのタイトルを絵文字とプロジェクト名、現在のトピックで自動更新するSkill。

📜 元の英語説明(参考)

This skill should be used to update terminal window title with context. Triggers automatically at session start via hook. Also triggers on topic changes during conversation (debugging to docs, frontend to backend). Updates title with emoji + project + current topic.

🇯🇵 日本人クリエイター向け解説

一言でいうと

会話の文脈や話題の変化に応じて、ターミナルウィンドウのタイトルを絵文字とプロジェクト名、現在のトピックで自動更新するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o terminal-title.zip https://jpskill.com/download/6562.zip && unzip -o terminal-title.zip && rm terminal-title.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/6562.zip -OutFile "$d\terminal-title.zip"; Expand-Archive "$d\terminal-title.zip" -DestinationPath $d -Force; ri "$d\terminal-title.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して terminal-title.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → terminal-title フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-17
取得日時
2026-05-17
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

[Skill 名] terminal-title <!-- ABOUTME: ターミナルウィンドウのタイトルを自動更新するターミナルタイトルスキル --> <!-- ABOUTME: 環境からの絵文字 + Claudeのプロジェクト検出 + 現在のトピックを使用します -->

ターミナルタイトルの管理

概要

このスキルは、ターミナルウィンドウのタイトルを更新し、現在のコンテキストを表示します。

  • 仕事/遊びの絵文字($TERMINAL_TITLE_EMOJI 環境変数から取得)
  • プロジェクト名(Claudeがインテリジェントに検出)
  • 現在のトピック(作業中の内容)

形式: 💼 ProjectName - Topic

重要: 呼び出しのタイミング

必須の呼び出し:

  1. セッション開始時: SessionStartフックによって自動的にトリガーされます。Claudeは、デフォルトのトピックとしてタイトルを「Claude Code」に設定して応答する必要があります。
  2. トピック変更時: ユーザーが新しいトピックに移行した際、Claudeはそれを検出し、呼び出す必要があります。

トピック変更のパターン(Claudeが検出する必要があるもの):

  • ✅ 「Xについて話しましょう」 / 「Yについて教えてください」 → 直ちに呼び出す
  • ✅ ユーザーがドメインを切り替える: デバッグ → ドキュメント、フロントエンド → バックエンド、機能 → テスト
  • ✅ ユーザーが継続的な議論の後、別のモジュール/コンポーネントの作業を開始する
  • ✅ ユーザーが現在のトピックに関する3回以上のやり取りの後、全く関係のないトピックについて尋ねる
  • ❌ 同じトピックに関するフォローアップの質問(「その関数にコメントを追加してください」) → 呼び出さない
  • ❌ 現在の作業に対する小さな修正(「それを青くしてください」) → 呼び出さない
  • ❌ 現在のタスクに関する説明 → 呼び出さない

Claudeの責任: 会話の流れを積極的に監視し、トピックが実質的に変更された場合はいつでもこのスキルを呼び出します。明示的な許可を待たないでください。

タイトルの例:

  • 💼 Skills Repository - Terminal Title
  • 🎉 dotfiles - zsh config
  • 💼 OneOnOne - Firebase Config

セットアップ要件

必要な権限:

このスキルは、ターミナルタイトルを更新するためにスクリプトを実行します。Claudeが毎回許可を求めるのを防ぐには、これを~/.claude/settings.jsonに追加してください。

Unix/Linux/macOSの場合:

{
  "permissions": {
    "allow": [
      "Bash(bash *skills/scripts/set_title.sh:*)"
    ]
  }
}

Windowsの場合:

{
  "permissions": {
    "allow": [
      "Bash(pwsh *skills/scripts/set_title.ps1:*)"
    ]
  }
}

この権限が必要な理由: このスキルは、ワークフローを中断することなく、ターミナルエスケープシーケンスをバックグラウンドでサイレントに送信してウィンドウタイトルを更新するスクリプトを実行します。

クロスプラットフォームサポート: このプラグインには、Unix系システム用のbashスクリプト(.sh)とWindows用のPowerShellスクリプト(.ps1)の両方が含まれています。SessionStartフックは、OSを自動的に検出し、適切なスクリプトを使用します。

プロジェクト検出戦略

主要な方法: Claudeのインテリジェンス

Claudeは、現在のコンテキストを分析してプロジェクト名を決定します。

  • 現在の作業ディレクトリと最近の会話
  • セッション中に読み取られたファイル
  • Gitリポジトリ情報
  • パッケージメタデータ(package.json、README.mdなど)
  • プロジェクトが何を表しているかについての全体的な理解

重要な原則: 機械的なファイル解析だけでなく、インテリジェントな理解を使用します。

検出例:

  • /Users/dylanr/work/2389/skills → "Skills Repository"(単なる"skills"ではない)
  • /Users/dylanr/work/2389/oneonone/hosting → "OneOnOne"
  • /Users/dylanr/dotfiles → "dotfiles"
  • /Users/dylanr/projects/my-app → "My App"(ディレクトリから人間が読める形に)

Claudeが確認する補足情報:

  1. GitリモートURLまたはリポジトリディレクトリ名
  2. package.jsonnameフィールド(Node.jsプロジェクト)
  3. README.mdの最初の見出し
  4. ディレクトリのベース名(最終手段)

フォールバック: Claudeがコンテキストを判断できない場合は、現在のディレクトリ名を使用します。

常にプロジェクト名を含める - Claudeは常に意味のあるものを判断できます。

タイトルフォーマット

標準フォーマット:

$emoji ProjectName - Topic

コンポーネントの詳細:

1. 絵文字(環境から取得):

  • $TERMINAL_TITLE_EMOJI 環境変数から読み取られます
  • ディレクトリコンテキストに基づいてzshテーマによって設定されます
  • 一般的な値: 💼 (仕事), 🎉 (遊び/個人)
  • フォールバック: 変数が設定されていない場合は 🎉 を使用

2. プロジェクト名(Claudeの検出から):

  • スラッグ形式ではなく、人間が読める名前
  • 適切な大文字小文字(例: "oneonone"ではなく"OneOnOne")
  • 常に存在します(最低限、ディレクトリ名を使用)

3. トピック(呼び出しコンテキストから):

  • 現在の作業の短い説明(2〜4語)
  • スキルが呼び出されたときに提供されます
  • 例: "Terminal Title", "Firebase Config", "CSS Refactor"

スクリプトの使用法:

bash scripts/set_title.sh "ProjectName" "Topic"

注: スクリプトは環境から絵文字を自動的に読み取り、ターミナルエスケープシーケンスを処理します。

エッジケース:

  • $TERMINAL_TITLE_EMOJIがない場合: デフォルトで 🎉 を使用
  • 非常に長いプロジェクト/トピック: ターミナルに自然な切り捨てを任せる
  • 空のトピック: デフォルトで「Claude Code」を使用

ワークフロー

Claudeがトピックの変更(またはセッション開始)を検出したら、直ちにこのワークフローを呼び出します。

ターミナルタイトルを更新するには、以下の手順に従ってください。

ステップ1: プロジェクト名を決定する

現在のコードベースとコンテキストに対するClaudeの理解を使用して、プロジェクト名を決定します。以下を確認します。

  • 会話やファイルからこのプロジェクトについて知っていること
  • Gitリポジトリ名/リモートURL
  • package.jsonのnameフィールド(Node.jsプロジェクトの場合)
  • README.mdの最初の見出し
  • ディレクトリのベース名(最低限のフォールバック)

人間が読める名前を生成します(例: "skills"ではなく"Skills Repository")。

ステップ2: コンテキストからトピックを取得する

トピックは以下から取得する必要があります。

  • 呼び出しパラメータ(明示的に提供された場合)
  • 現在の会話コンテキスト(ユーザーが作業している内容)
  • セッション開始時はデフォルトで「Claude Code」

ステップ3: オペレーティングシステムを検出する

スクリプトを実行する前に、オペレーティングシステムを検出します。

# Windowsで実行されているか確認する(一般的なWindowsの指標をチェック)
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" || "$OSTYPE" == "cygwin" ]]; then
    OS="windows"
else
    OS="unix"
fi

ステップ4: タイトル更新スクリプトを実行する(クロスプラットフォーム)

スキルベースディレクトリ(スキル読み込みメッセージで利用可能)を見つけ、OSに基づいて適切なスクリプトを実行します。

Unix/Linux/macOSの場合:


bash <skill

(原文がここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

<!-- ABOUTME: Terminal title skill that automatically updates terminal window title --> <!-- ABOUTME: Uses emoji from environment + Claude's project detection + current topic -->

Terminal Title Management

Overview

This skill updates the terminal window title to show current context:

  • Work/fun emoji (from $TERMINAL_TITLE_EMOJI environment variable)
  • Project name (intelligently detected by Claude)
  • Current topic (what you're working on)

Format: 💼 ProjectName - Topic

CRITICAL: When to Invoke

MANDATORY invocations:

  1. Session start: Automatically triggered by SessionStart hook. Claude must respond by setting title to "Claude Code" as default topic.
  2. Topic changes: Claude MUST detect and invoke when user shifts to new topic.

Topic change patterns (Claude must detect these):

  • ✅ "let's talk about X" / "can you tell me about Y" → invoke immediately
  • ✅ User switches domains: debugging → documentation, frontend → backend, feature → tests
  • ✅ User starts working on different module/component after sustained discussion
  • ✅ User asks about completely unrelated topic after 3+ exchanges on current topic
  • ❌ Follow-up questions on same topic ("add a comment to that function") → do NOT invoke
  • ❌ Small refinements to current work ("make it blue") → do NOT invoke
  • ❌ Clarifications about current task → do NOT invoke

Claude's responsibility: Actively monitor conversation flow and invoke this skill whenever topic materially shifts. Do not wait for explicit permission.

Example titles:

  • 💼 Skills Repository - Terminal Title
  • 🎉 dotfiles - zsh config
  • 💼 OneOnOne - Firebase Config

Setup Requirements

Required Permission:

This skill runs scripts to update the terminal title. To prevent Claude from prompting for permission every time, add this to your ~/.claude/settings.json:

For Unix/Linux/macOS:

{
  "permissions": {
    "allow": [
      "Bash(bash *skills/scripts/set_title.sh:*)"
    ]
  }
}

For Windows:

{
  "permissions": {
    "allow": [
      "Bash(pwsh *skills/scripts/set_title.ps1:*)"
    ]
  }
}

Why this permission is needed: The skill executes a script that sends terminal escape sequences silently in the background to update your window title without interrupting your workflow.

Cross-platform support: The plugin includes both bash scripts (.sh) for Unix-like systems and PowerShell scripts (.ps1) for Windows. The SessionStart hook automatically detects your OS and uses the appropriate script.

Project Detection Strategy

Primary method: Claude's intelligence

Claude analyzes the current context to determine the project name:

  • Current working directory and recent conversation
  • Files read during the session
  • Git repository information
  • Package metadata (package.json, README.md, etc.)
  • Overall understanding of what the project represents

Key principle: Use intelligent understanding, not just mechanical file parsing.

Detection examples:

  • /Users/dylanr/work/2389/skills → "Skills Repository" (not just "skills")
  • /Users/dylanr/work/2389/oneonone/hosting → "OneOnOne"
  • /Users/dylanr/dotfiles → "dotfiles"
  • /Users/dylanr/projects/my-app → "My App" (humanized from directory)

Supporting evidence Claude checks:

  1. Git remote URL or repository directory name
  2. package.json name field (Node.js projects)
  3. First heading in README.md
  4. Directory basename (last resort)

Fallback: If Claude cannot determine context, use current directory name.

Always include project name - Claude can always determine something meaningful.

Title Formatting

Standard format:

$emoji ProjectName - Topic

Component details:

1. Emoji (from environment):

  • Read from $TERMINAL_TITLE_EMOJI environment variable
  • Set by zsh theme based on directory context
  • Common values: 💼 (work), 🎉 (fun/personal)
  • Fallback: Use 🎉 if variable not set

2. Project Name (from Claude's detection):

  • Human-friendly name, not slug format
  • Proper capitalization (e.g., "OneOnOne" not "oneonone")
  • Always present (use directory name as minimum)

3. Topic (from invocation context):

  • Short description of current work (2-4 words)
  • Provided when skill is invoked
  • Examples: "Terminal Title", "Firebase Config", "CSS Refactor"

Script usage:

bash scripts/set_title.sh "ProjectName" "Topic"

Note: The script automatically reads emoji from environment and handles terminal escape sequences.

Edge cases:

  • No $TERMINAL_TITLE_EMOJI: Use 🎉 as default
  • Very long project/topic: Let terminal handle truncation naturally
  • Empty topic: Use "Claude Code" as default

Workflow

When Claude detects a topic change (or session start), immediately invoke this workflow:

Follow these steps to update the terminal title:

Step 1: Determine project name

Use Claude's understanding of the current codebase and context to determine the project name. Check:

  • What you know about this project from conversation and files
  • Git repository name/remote URL
  • package.json name field (if Node.js project)
  • README.md first heading
  • Directory basename (minimum fallback)

Generate a human-friendly name (e.g., "Skills Repository" not "skills").

Step 2: Get topic from context

The topic should come from:

  • Invocation parameter (if provided explicitly)
  • Current conversation context (what user is working on)
  • Default to "Claude Code" for session start

Step 3: Detect operating system

Before executing the script, detect the operating system:

# Check if running on Windows (check for common Windows indicators)
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" || "$OSTYPE" == "cygwin" ]]; then
    OS="windows"
else
    OS="unix"
fi

Step 4: Execute title update script (cross-platform)

Find the skill base directory (available in the skill loading message) and execute the appropriate script based on OS:

For Unix/Linux/macOS:

bash <skill-base-dir>/scripts/set_title.sh "Project Name" "Topic"

For Windows:

pwsh -NoProfile -ExecutionPolicy Bypass -File <skill-base-dir>/scripts/set_title.ps1 "Project Name" "Topic"

The scripts handle:

  • Reading emoji from $TERMINAL_TITLE_EMOJI (Unix) or $env:TERMINAL_TITLE_EMOJI (Windows)
  • Sanitizing inputs
  • Formatting and sending terminal escape sequences

Execute this command silently using the Bash tool (pre-approved via permissions).

Step 5: Done

Title updated silently. Continue responding to user without mentioning the title update unless they ask about it.

Examples

Example 1: Session Start in Skills Repository

Context: User starts Claude Code in /Users/dylanr/work/2389/skills

Environment: TERMINAL_TITLE_EMOJI=💼

Execution:

  1. Project: "Skills Repository" (Claude's knowledge)
  2. Topic: "Claude Code" (session start default)
  3. Command: bash /Users/dylanr/work/2389/claude-plugins/terminal-title/skills/scripts/set_title.sh "Skills Repository" "Claude Code"

Result: Terminal title shows 💼 Skills Repository - Claude Code (script reads emoji from environment)


Example 2: Topic Change Detection

Context: Conversation shifts from "terminal title implementation" to "rare VWs"

Claude's detection: User asked "can you tell me about rare vws?" - this is a clear topic shift

Environment: TERMINAL_TITLE_EMOJI=🎉

Claude's action:

  1. Detect topic change (from terminal implementation to VWs)
  2. Invoke terminal-title skill workflow
  3. Project: "Home" (current directory basename)
  4. Topic: "Rare VWs" (from new conversation direction)
  5. Command: bash <skill-base-dir>/scripts/set_title.sh "Home" "Rare VWs"
  6. Continue answering user's question about rare VWs

Result: Terminal title silently updates to 🎉 Home - Rare VWs (script reads emoji from environment)


Example 3: Personal Project Without Environment Variable

Context: User working in ~/projects/dotfiles directory

Environment: TERMINAL_TITLE_EMOJI not set

Execution:

  1. Project: "dotfiles" (from directory)
  2. Topic: "zsh config" (from conversation)
  3. Command: bash <skill-base-dir>/scripts/set_title.sh "dotfiles" "zsh config"

Result: Terminal title shows 🎉 dotfiles - zsh config (script uses 🎉 as fallback when TERMINAL_TITLE_EMOJI not set)


Example 4: Different Project Context

Context: User working in /Users/dylanr/work/2389/oneonone/hosting

Environment: TERMINAL_TITLE_EMOJI=💼

Execution:

  1. Project: "OneOnOne" (Claude knows this project name)
  2. Topic: "Firebase Config" (from conversation)
  3. Command: bash <skill-base-dir>/scripts/set_title.sh "OneOnOne" "Firebase Config"

Result: Terminal title shows 💼 OneOnOne - Firebase Config (script reads emoji from environment)


Example 5: Windows User Session Start

Context: Windows user starts Claude Code in C:\Users\Nat\projects\my-app

Environment: $env:TERMINAL_TITLE_EMOJI=💻 (Windows environment variable)

OS Detection: Claude detects Windows via $OSTYPE check

Execution:

  1. Project: "My App" (from directory name, humanized)
  2. Topic: "Claude Code" (session start default)
  3. Command: pwsh -NoProfile -ExecutionPolicy Bypass -File <skill-base-dir>/scripts/set_title.ps1 "My App" "Claude Code"

Result: Terminal title shows 💻 My App - Claude Code (PowerShell script reads emoji from $env:TERMINAL_TITLE_EMOJI)

Note: The SessionStart hook automatically detected Windows and invoked the PowerShell version of the script instead of the bash version.