Automatically update terminal window titles based on your current Claude Code task. Stop playing "which terminal is which?" with multiple AI coding sessions.
When running multiple Claude Code instances, terminal windows all look the same. You waste time clicking between tabs, trying to remember which session is handling what task.
This skill solves that by automatically updating your terminal title to reflect the current high-level task:
API Integration: Auth FlowDebug: Login BugBuild: Dashboard UITest: Payment Module
- ✅ Zero Configuration - Install and forget, works automatically
- 🤖 AI-Powered - Claude extracts task context from your prompts
- 🚀 Lightweight - 2KB package, no dependencies
- 🔄 Automatic Updates - Title changes when you switch tasks
- 🖥️ Cross-Platform - Works with iTerm2, Terminal, Alacritty, and more
- 📦 Easy Distribution - Single .skill file, standard installation
# Clone this repository
git clone https://github.com/bluzername/claude-code-terminal-title.git
cd claude-code-terminal-title
# Run the automated installer
chmod +x install-and-test.sh
./install-and-test.shThe installer will:
- ✅ Check prerequisites
- ✅ Install the skill to
~/.claude/skills/ - ✅ Set proper file permissions
- ✅ Run verification tests
- ✅ Provide next steps
Claude Code CLI:
claude-code install terminal-title.skillManual Install:
mkdir -p ~/.claude/skills
unzip terminal-title.skill -d ~/.claude/skills/
chmod +x ~/.claude/skills/terminal-title/scripts/set_title.shFor clean titles without suffixes, run:
chmod +x setup-zsh.sh
./setup-zsh.shTo remove the skill:
chmod +x uninstall.sh
./uninstall.shThat's it! The skill works automatically when you use Claude Code.
| Your Prompt | Terminal Title |
|---|---|
| "Help me debug the authentication API" | Debug: Auth API Flow |
| "Create a React dashboard component" | Build: Dashboard UI |
| "Write tests for payment processing" | Test: Payment Module |
| "Optimize database queries" | Optimize: DB Queries |
Add a custom prefix to all terminal titles:
# Add to your ~/.bashrc, ~/.zshrc, or shell config:
export CLAUDE_TITLE_PREFIX="🤖 Claude"Result: 🤖 Claude | Build: Dashboard UI
This is perfect for:
- Distinguishing Claude terminals from other work
- Adding personality to your terminal titles
- Team environments where multiple people use Claude Code
- You start Claude Code and give it a prompt
- The skill analyzes your request and extracts the high-level task
- It generates a concise title (max 40 characters)
- Your terminal window title updates automatically
- No interruption to your workflow
- macOS Terminal.app + zsh (with setup-zsh.sh)
- iTerm2 (macOS)
- Alacritty, Kitty
- Linux: GNOME Terminal, Konsole, Terminator
- Windows Terminal + WSL
- Plain bash without precmd support (titles won't persist)
- Windows native terminals (CMD, PowerShell) - limited ANSI support
- Very old terminal emulators
When opening a new terminal within 5 minutes of setting a title, it may initially inherit the previous terminal's title. Once Claude Code runs and sets a new title in that terminal, each maintains its own title independently. This prevents stale titles while preserving active session titles.
terminal-title/
├── SKILL.md # Skill instructions for Claude Code
├── LICENSE # MIT License
├── VERSION # Semantic version number
├── CHANGELOG.md # Version history and changes
└── scripts/
└── set_title.sh # Terminal title update script
The skill automatically activates:
- At the start of every new Claude Code session (first prompt)
- When switching to a substantially different task (e.g., frontend → backend, debugging → new feature)
Triggers on:
- Moving from debugging to new feature development
- Changing from one module to a completely different one
- Starting work on a different part of the system
Does NOT trigger for:
- Follow-up questions on the same task ("Can you add a comment?")
- Small refinements ("Make it blue instead of red")
- Debugging the same feature you just built
- Clarifications or status updates
| Feature | Zsh Config Solution | This Skill |
|---|---|---|
| Installation | Manual shell config | One command |
| Task Detection | N/A | AI-powered |
| Shell Support | Zsh only | Any shell |
| Updates | Manual | Automatic |
| Learning Curve | Medium | None |
Check installation:
ls -la ~/.claude/skills/terminal-title/Test the script directly:
cd ~/.claude/skills/terminal-title/
bash scripts/set_title.sh "Test: It Works!"Verify permissions:
chmod +x ~/.claude/skills/terminal-title/scripts/set_title.sh- Ensure your terminal supports ANSI escape sequences
- Restart Claude Code after installation
- Check Claude Code logs for errors
- Open an issue with details
We need your help! This skill was developed and tested primarily on macOS with zsh.
Platform Testing:
- Linux users: Does it work? Share your setup!
- Windows + WSL: Title persistence working?
- Other terminal emulators: Compatibility reports needed
Shell Support:
- bash users: Can we create setup-bash.sh?
- fish shell: Title persistence implementation?
- Other shells: Testing and documentation
Code Contributions:
- Shell-specific setup scripts
- Cross-platform compatibility fixes
- Better title generation logic
- Configuration options (freshness window, etc.)
- Test and Report: Try it on your setup, document what works/doesn't
- Open Issues: Found a bug or edge case? Report it
- Submit PRs: Especially welcome for shell/platform support
All contributions appreciated, no matter how small!
Recently Added (v1.1.0):
- ✅ Custom title prefixes via
CLAUDE_TITLE_PREFIX - ✅ Enhanced error handling and terminal detection
- ✅ Better documentation with troubleshooting guide
Considering based on community feedback:
- Custom title format templates
- Project-specific auto-detection (from directory name)
- Git branch integration
- Status indicators (🟢/🔴/🟡)
- Title history logging
- macOS notification integration
Vote for features by commenting on issues.
MIT License - see LICENSE file for details.
Free to use, modify, and share. Commercial use allowed.
Built to solve a real productivity pain point. Thanks to:
- Anthropic for creating Claude Code
- The awesome-claude-skills community
- Everyone who provided feedback
- 🐛 Report a bug
- 💡 Request a feature
- 💬 Start a discussion
- ⭐ Star this repo if it helps you!
Made by developers, for developers. If you're using Claude Code in production, this is a small quality-of-life improvement that compounds quickly.