terminal-title
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.
What this skill does
<!-- 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:**
```json
{
"permissions": {
"allow": [
"Bash(bash *skills/scripts/set_title.sh:*)"
]
}
}
```
**For Windows:**
```json
{
"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
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:
```bash
# 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
bash <skill-base-dir>/scripts/set_title.sh "Project Name" "Topic"
```
**For Windows:**
```bash
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/dotfileRelated in Web Dev
generating-lwc-components
IncludedLightning Web Components with PICKLES methodology and 165-point scoring. Use this skill when the user creates or edits LWC components, builds wire service patterns, or writes Jest tests for LWC. TRIGGER when: user creates/edits LWC components, touches lwc/**/*.js, .html, .css, .js-meta.xml files, or asks about wire service, SLDS, or Jest LWC tests. DO NOT TRIGGER when: Apex classes (use generating-apex), Aura components, or Visualforce.
tanstack-query
IncludedManage server state in React with TanStack Query v5. Set up queries with useQuery, mutations with useMutation, configure QueryClient caching strategies, implement optimistic updates, and handle infinite scroll with useInfiniteQuery. Use when: setting up data fetching in React projects, migrating from v4 to v5, or fixing object syntax required errors, query callbacks removed issues, cacheTime renamed to gcTime, isPending vs isLoading confusion, keepPreviousData removed problems.
document-processor-api
IncludedProcess documents with Nutrient DWS. Use when the user wants to generate PDFs from HTML or URLs, convert Office/images/PDFs, assemble or split packets, OCR scans, extract text/tables/key-value pairs, redact PII, watermark, sign, fill forms, optimize PDFs, or produce compliance outputs like PDF/A or PDF/UA. Triggers include convert to PDF, merge these PDFs, OCR this scan, extract tables, redact PII, sign this PDF, make this PDF/A, or linearize for web delivery.
nutrient-document-processing
IncludedProcess documents with Nutrient DWS. Use when the user wants to generate PDFs from HTML or URLs, convert Office/images/PDFs, assemble or split packets, OCR scans, extract text/tables/key-value pairs, redact PII, watermark, sign, fill forms, optimize PDFs, or produce compliance outputs like PDF/A or PDF/UA. Triggers include convert to PDF, merge these PDFs, OCR this scan, extract tables, redact PII, sign this PDF, make this PDF/A, or linearize for web delivery.
tanstack-query
IncludedManage server state in React with TanStack Query v5. Covers useMutationState, simplified optimistic updates, throwOnError, network mode (offline/PWA), and infiniteQueryOptions. Use when setting up data fetching, fixing v4โv5 migration errors (object syntax, gcTime, isPending, keepPreviousData), or debugging SSR/hydration issues with streaming server components.
accelint-nextjs-best-practices
IncludedNext.js performance optimization and best practices. Use when writing Next.js code (App Router or Pages Router); implementing Server Components, Server Actions, or API routes; optimizing RSC serialization, data fetching, or server-side rendering; reviewing Next.js code for performance issues; fixing authentication in Server Actions; or implementing Suspense boundaries, parallel data fetching, or request deduplication.