Prompt indicator
Both styles read CLAUDE_SHIM_ACTIVE_PROFILE, which the shell hook exports — set that up first.
For the indicator inside Claude Code's own status bar (not the shell prompt), see statusLine indicator.
Pick one of the styles below.
Plain PS1
PS1='%n@%m %~ ${CLAUDE_SHIM_ACTIVE_PROFILE:+[$CLAUDE_SHIM_ACTIVE_PROFILE] }%# 'oh-my-posh
Pick a format and inline the segment into your theme:
- YAML — add as a list item under
segments:of the target block. - TOML — paste right after the
[[blocks]]table you want the segment to live in;[[blocks.segments]]attaches to the nearest preceding[[blocks]]. - JSON — add as an object inside the matching
"segments": [ ... ]array (mind the surrounding commas).
Minimal
A bare text segment — no glyphs, no palette entry, no Nerd Font. Drops into any existing OMP theme as-is.
YAML
- type: text
style: plain
template: "{{ if .Env.CLAUDE_SHIM_ACTIVE_PROFILE }}[{{ .Env.CLAUDE_SHIM_ACTIVE_PROFILE }}] {{ end }}"TOML
[[blocks.segments]]
type = "text"
style = "plain"
template = "{{ if .Env.CLAUDE_SHIM_ACTIVE_PROFILE }}[{{ .Env.CLAUDE_SHIM_ACTIVE_PROFILE }}] {{ end }}"JSON
{
"type": "text",
"style": "plain",
"template": "{{ if .Env.CLAUDE_SHIM_ACTIVE_PROFILE }}[{{ .Env.CLAUDE_SHIM_ACTIVE_PROFILE }}] {{ end }}"
}Powerline diamond
A diamond segment with a powerline cap, brand colour, and ✳ glyph.
Requires:
- a Nerd Font for the
\ue0b0powerline cap (✳ is plain Unicode U+2733 and renders with any modern font); - a
claudepalette entry, added to the existing top-levelpaletteblock of your theme.
Pick your format and apply both pieces — the palette entry goes inside your existing palette, the segment goes inside the target segments array.
YAML
Palette entry, added under your existing palette::
claude: "#CC785C"Segment:
- type: text
style: diamond
leading_diamond: "<transparent,background>\ue0b0</>"
trailing_diamond: "<background,transparent>\ue0b0</>"
foreground: p:pure_black
background: p:claude
template: "{{ if .Env.CLAUDE_SHIM_ACTIVE_PROFILE }} ✳ {{ .Env.CLAUDE_SHIM_ACTIVE_PROFILE }} {{ end }}"TOML
Palette entry, added under your existing [palette] table:
claude = "#CC785C"Segment:
[[blocks.segments]]
type = "text"
style = "diamond"
leading_diamond = "<transparent,background>\ue0b0</>"
trailing_diamond = "<background,transparent>\ue0b0</>"
foreground = "p:pure_black"
background = "p:claude"
template = "{{ if .Env.CLAUDE_SHIM_ACTIVE_PROFILE }} ✳ {{ .Env.CLAUDE_SHIM_ACTIVE_PROFILE }} {{ end }}"JSON
Palette entry, added inside your existing "palette" object:
"claude": "#CC785C"Segment:
{
"type": "text",
"style": "diamond",
"leading_diamond": "<transparent,background>\ue0b0</>",
"trailing_diamond": "<background,transparent>\ue0b0</>",
"foreground": "p:pure_black",
"background": "p:claude",
"template": "{{ if .Env.CLAUDE_SHIM_ACTIVE_PROFILE }} ✳ {{ .Env.CLAUDE_SHIM_ACTIVE_PROFILE }} {{ end }}"
}