oh-my-claude (ssenart) — Prompt Excerpts
This framework contains no AI prompt files — it is a terminal status line tool, not an AI agent framework. The "prompts" it uses are shell scripts and a JSON theme configuration.
Excerpt 1: statusline.sh (src/statusline.sh) — Primary Script
Technique: Shell script consuming Claude Code's JSON input, outputting oh-my-posh environment variables
#!/bin/bash
# Status line command for Claude Code with oh-my-posh integration
source "$(dirname "${BASH_SOURCE[0]}")/common.sh"
# Read JSON input from stdin
input=$(cat)
# Extract values using jq
model=$(echo "$input" | jq -r '.model.display_name')
cwd=$(echo "$input" | jq -r '.workspace.current_dir')
# Calculate context percentage
usage=$(echo "$input" | jq '.context_window.current_usage')
if [ "$usage" != "null" ]; then
input_tokens=$(echo "$usage" | jq '.input_tokens // 0')
cache_creation=$(echo "$usage" | jq '.cache_creation_input_tokens // 0')
cache_read=$(echo "$usage" | jq '.cache_read_input_tokens // 0')
size=$(echo "$input" | jq '.context_window.context_window_size // 1')
current=$(awk "BEGIN {print $input_tokens + $cache_creation + $cache_read}")
if [ "$size" != "0" ]; then
pct=$(awk "BEGIN {printf \"%.0f\", $current * 100 / $size}")
else
pct=0
fi
context_pct="${pct}%"
fi
# Fetch usage data with automatic updates from ccusage
cache_file="$script_dir/.usage_cache"
cache_timeout=60
if [ -f "$cache_file" ]; then
cache_age=$(($(date +%s) - $(get_file_mtime "$cache_file")))
[ "$cache_age" -ge "$cache_timeout" ] && bash "$update_script" &>/dev/null &
cache_json=$(cat "$cache_file" 2>/dev/null)
session_tokens=$(echo "$cache_json" | jq -r '.code.session_tokens // 0')
pro_five_hour_usage=$(echo "$cache_json" | jq -r '.pro.five_hour_pct // empty')
fi
Analysis: Pure bash pipeline. No AI prompting — this is a data extraction and display script. The pattern is: read Claude Code's JSON stdin → parse fields → read JSON cache → render via oh-my-posh.
Excerpt 2: oh-my-posh Theme (src/claude-statusline.omp.json) — Theme Configuration
Technique: oh-my-posh JSON theme defining segment colors, icons, and layout
Not a prompt file but included here as the "configuration language" of this framework. The claude-statusline.omp.json file defines 7 powerline segments with colors (orange, yellow, teal, cyan, pink, purple, blue) and Nerd Font icons for path, git, context, code tokens, Pro usage, reset timer, and model display.
Note: This is the only framework in the batch where the primary "configuration" is a terminal prompt theme rather than markdown AI instructions or YAML hooks.