shell-prompt
Modern shell prompt configuration with Powerlevel10k and Zsh Vi Mode. Use when configuring shell prompts, setting up vi/vim keybindings in zsh, customizing…
от julianobarbosa★ 18 звёзд на GitHub
Установить shell-prompt в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Shell Prompt Skill
Configure high-performance shell prompts with Powerlevel10k and Zsh Vi Mode.
Overview
Modern shell prompts provide:
- Git status with branch, dirty state, and remote tracking
- Environment indicators (Python venv, Node version, K8s context)
- Execution time for long-running commands
- Exit code visualization
- Async updates for responsive experience
- Vi mode indicators and cursor changes
Zsh Vi Mode
Zsh supports vi-style line editing with visual feedback through cursor changes and mode indicators.
Quick Setup (Built-in)
# ~/.zshrc
bindkey -v # Enable vi mode
# Reduce key timeout for faster mode switching (default 400ms)
export KEYTIMEOUT=10 # 100ms - don't go below 10
Cursor Style by Mode
Change cursor shape based on current mode:
# Add to ~/.zshrc
cursor_mode() {
# Beam cursor for insert mode
cursor_beam='\e[6 q'
# Block cursor for normal mode
cursor_block='\e[2 q'
function zle-keymap-select {
if ${KEYMAP} == vicmd ||
$1 = 'block'; then
echo -ne $cursor_block
elif ${KEYMAP} == main ||
${KEYMAP} == viins ||
${KEYMAP} = '' ||
$1 = 'beam'; then
echo -ne $cursor_beam
fi
}
zle-line-init() {
echo -ne $cursor_beam
}
zle -N zle-keymap-select
zle -N zle-line-init
}
cursor_mode
Cursor Escape Codes
| Code | Style |
|---|---|
\e[1 q |
Blinking block |
\e[2 q |
Steady block |
\e[3 q |
Blinking underline |
\e[4 q |
Steady underline |
\e[5 q |
Blinking bar/beam |
\e[6 q |
Steady bar/beam |
Vi Mode Plugins
Oh My Zsh vi-mode Plugin
# ~/.zshrc
plugins=(... vi-mode)
# Configuration (before sourcing oh-my-zsh.sh)
VI_MODE_SET_CURSOR=true
VI_MODE_RESET_PROMPT_ON_MODE_CHANGE=true
# Cursor styles (0-6)
VI_MODE_CURSOR_NORMAL=2 # Solid block
VI_MODE_CURSOR_INSERT=6 # Solid beam
VI_MODE_CURSOR_VISUAL=6 # Solid beam
VI_MODE_CURSOR_OPPEND=0 # Blinking block
# Mode indicators
MODE_INDICATOR="%F{red}<<<NORMAL%f"
INSERT_MODE_INDICATOR="%F{green}<<<INSERT%f"
softmoth/zsh-vim-mode
Full-featured vi mode with text objects and surround bindings.
Installation:
# Clone
git clone https://github.com/softmoth/zsh-vim-mode.git ~/.zsh/zsh-vim-mode
# Source in .zshrc (after other plugins)
source ~/.zsh/zsh-vim-mode/zsh-vim-mode.plugin.zsh
Load order matters: zsh-autosuggestions -> zsh-syntax-highlighting -> zsh-vim-mode
Configuration:
# Cursor styles (supports colors!)
MODE_CURSOR_VIINS="#00ff00 blinking bar"
MODE_CURSOR_VICMD="green block"
MODE_CURSOR_REPLACE="red block"
MODE_CURSOR_SEARCH="#ff00ff steady underline"
MODE_CURSOR_VISUAL="$MODE_CURSOR_VICMD steady bar"
MODE_CURSOR_VLINE="$MODE_CURSOR_VISUAL #00ffff"
# Mode indicators (auto-added to RPS1 if unset)
MODE_INDICATOR_VIINS='%F{15}<%F{8}INSERT>%f'
MODE_INDICATOR_VICMD='%F{10}<%F{2}NORMAL>%f'
MODE_INDICATOR_REPLACE='%F{9}<%F{1}REPLACE>%f'
MODE_INDICATOR_SEARCH='%F{13}<%F{5}SEARCH>%f'
MODE_INDICATOR_VISUAL='%F{12}<%F{4}VISUAL>%f'
MODE_INDICATOR_VLINE='%F{12}<%F{4}V-LINE>%f'
# Other options
VIM_MODE_VICMD_KEY='^[' # Default escape key
VIM_MODE_TRACK_KEYMAP=true # Enable mode tracking
VIM_MODE_INITIAL_KEYMAP=viins # Start in insert mode
Features:
- Text objects:
ci",da(,vi[ - Surround:
cs"'(change surrounding " to ') - Visual mode selection
- Emacs bindings in insert mode (Ctrl-A, Ctrl-E)
jeffreytse/zsh-vi-mode
Modern vi mode with operator-pending mode support.
Installation:
# With zinit
zinit ice depth=1
zinit light jeffreytse/zsh-vi-mode
# Manual
git clone https://github.com/jeffreytse/zsh-vi-mode.git ~/.zsh/zsh-vi-mode
source ~/.zsh/zsh-vi-mode/zsh-vi-mode.plugin.zsh
Configuration:
# Cursor styles
ZVM_NORMAL_MODE_CURSOR=$ZVM_CURSOR_BLOCK
ZVM_INSERT_MODE_CURSOR=$ZVM_CURSOR_BEAM
ZVM_VISUAL_MODE_CURSOR=$ZVM_CURSOR_BLOCK
ZVM_VISUAL_LINE_MODE_CURSOR=$ZVM_CURSOR_BLOCK
ZVM_OPPEND_MODE_CURSOR=$ZVM_CURSOR_UNDERLINE
# Mode indicator in prompt
function zvm_after_select_vi_mode() {
case $ZVM_MODE in
$ZVM_MODE_NORMAL)
# Update prompt for normal mode
;;
$ZVM_MODE_INSERT)
# Update prompt for insert mode
;;
$ZVM_MODE_VISUAL)
# Update prompt for visual mode
;;
esac
}
# Disable cursor style changes (if using another method)
ZVM_CURSOR_STYLE_ENABLED=false
Key Bindings Reference
Mode Switching
| Key | Action |
|---|---|
ESC or Ctrl-[ |
Enter Normal mode |
i |
Insert before cursor |
a |
Append after cursor |
I |
Insert at line start |
A |
Append at line end |
v |
Enter Visual mode |
V |
Enter Visual Line mode |
Navigation (Normal Mode)
| Key | Action |
|---|---|
h/l |
Left/right |
j/k |
Down/up in history |
w/W |
Forward word |
b/B |
Backward word |
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/performance-tuning.md
- references/powerlevel10k-config.md
- references/starship-config.md
- references/troubleshooting.md
- references/zsh-vim-mode.md
- scripts/benchmark-prompt.zsh
FAQ
Что делает скилл shell-prompt?
Modern shell prompt configuration with Powerlevel10k and Zsh Vi Mode. Use when configuring shell prompts, setting up vi/vim keybindings in zsh, customizing cursor styles per mode, adding mode indicators, optimizing prompt performance, or troubleshooting slow prompts. Covers P10k instant prompt, vi mode plugins, and cursor customization.
Как установить скилл shell-prompt?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл shell-prompt запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…