AgentSkillsCN

starship

用于配置Starship提示——模块、样式、上下文特定配置,或排查提示问题。

SKILL.md
--- frontmatter
name: starship
description: Use when configuring Starship prompt - modules, styling, context-specific configs, or troubleshooting prompt issues

Starship Prompt

Cross-shell prompt with modules for git, languages, cloud, and more.

Docs: https://starship.rs/config/ Presets: https://starship.rs/presets/

Config Location

PathPurpose
~/.config/starship.tomlDefault config
STARSHIP_CONFIG env varOverride config path

Context-Specific Configs

Current setup: Single config with optional zmx session segment:

toml
[env_var.ZMX_SESSION]
symbol = " "
format = "[$symbol$env_value]($style) "

When to use multiple configs:

  • SSH sessions -> show hostname
  • Work vs personal -> different themes

Quick Reference

TaskCommand
Test configstarship print-config
Explain modulestarship explain git_status
Time promptstarship timings
List presetsstarship preset --list
Apply presetstarship preset bracketed-segments -o ~/.config/starship.toml

TransientPrompt (Fish)

Replaces previous prompts with minimal version (cleaner scrollback):

fish
# In config.fish after starship init
enable_transience

# Optional: customize transient prompt
function starship_transient_prompt_func
    starship module character
end

Troubleshooting

IssueSolution
Slow promptRun starship timings to find slow modules
Module not showingCheck detect_* conditions, run starship explain module_name
Colors wrongVerify terminal supports true color: echo $TERM
Changes not applyingConfig is read on shell start; open new terminal

Theme

Current: Tokyo Night (colors defined in config files).

Files

FilePurpose
starship/starship.tomlMain config

Reference

  • reference/modules.md -- module detection, disabling, conditional formats, custom modules
  • reference/styling.md -- style strings, colors, modifiers, prompt format, Tokyo Night palette