← Commit history
._README.mdadded
⋯ 1 unchanged line ⋯
._SKILL.mdadded
⋯ 1 unchanged line ⋯
._install.shadded
⋯ 1 unchanged line ⋯
._package.jsonadded
⋯ 1 unchanged line ⋯
._statusline.shadded
⋯ 1 unchanged line ⋯
._uninstall.shadded
⋯ 1 unchanged line ⋯
SKILL.mdadded+86
@@ -0,0 +1,86 @@+---+name: adom-statusline+description: Install the Adom-branded status line for Claude Code — model name, a 20-segment context-usage bar, and 5-hour session usage, colored with Adom brand truecolor (teal → yellow → red as usage climbs). Use when the user says "set up the adom statusline", "install the status line", "add the context bar to claude code", or asks for a Claude Code status line showing context/session usage.+---++# Adom Statusline for Claude Code++A single POSIX-sh status line for Claude Code that shows, left to right:++- **Model name** in Adom purple (e.g. `Fable 5`)+- **Context bar** — 20 segments (`━` filled / `╌` empty), one per 5% of context used,+  with the percentage. Teal below 50%, yellow at 50–79%, red at 80%+.+- **5h session usage** — `5h: N%` from the five-hour rate-limit window, blue → yellow → red+  on the same thresholds.++No dependencies beyond `sed`/`grep`/`printf` (no jq). Colors are 24-bit ANSI truecolor+(supported by every modern terminal: Terminal.app, iTerm2, VS Code, Ghostty, Windows Terminal).++## Install++Run the packaged installer from the package root:++```sh+./install.sh+```++It does exactly two things, both idempotent:++1. Copies `statusline.sh` to `~/.claude/statusline.sh` and marks it executable.+   An existing different file is backed up to `~/.claude/statusline.sh.bak` first.+2. Merges into `~/.claude/settings.json` (creating it if absent, preserving every+   other key):++   ```json+   { "statusLine": { "type": "command", "command": "~/.claude/statusline.sh" } }+   ```++Then restart Claude Code (or start a new session) — the status line renders under the+input box on the next status update.++## Manual install (no installer)++1. Save this package's `statusline.sh` as `~/.claude/statusline.sh`; `chmod +x` it.+2. Add the `statusLine` block above to `~/.claude/settings.json`.++## How it works++Claude Code pipes a JSON status payload to the command on stdin. The script pulls+three fields without a JSON parser:++- `model.display_name` — via `sed`+- the first `used_percentage` (context window) — via `grep -o`+- `five_hour.used_percentage` (session window) — via `grep -o` on the `"five_hour":{...}` object++Each field renders only if present, so the line degrades gracefully on older+Claude Code versions that omit a field.++## Customizing++Edit `~/.claude/statusline.sh`:++- **Colors** — the `C_*` variables at the top are `\033[38;2;R;G;Bm` truecolor+  escapes. Defaults are the Adom brand palette: teal `0,184,177`, blue `100,171,255`,+  purple `140,107,247`.+- **Thresholds** — the `-ge 80` / `-ge 50` tests set where the bar turns red/yellow.+- **Bar width** — `filled=$(( ctx_int / 5 ))` and `empty=$(( 20 - filled ))`; change+  both `5` and `20` together (width = 100 / divisor).++## Uninstall++```sh+./uninstall.sh+```++Removes `~/.claude/statusline.sh` and deletes the `statusLine` key from+`~/.claude/settings.json` (other settings untouched).++## Troubleshooting++- **No status line at all** — check `statusLine` is present in `~/.claude/settings.json`+  and the script is executable. Test by hand:+  `echo '{"model":{"display_name":"Test"},"context":{"used_percentage":42}}' | ~/.claude/statusline.sh`+- **Garbled color codes** — the terminal lacks truecolor; swap the `C_*` escapes for+  basic 16-color ones (e.g. `\033[35m` for purple).+- **No `5h:` segment** — the payload only includes rate-limit data on plans with the+  5-hour window; the script correctly omits it otherwise.
docs/._HERO.mdadded
⋯ 1 unchanged line ⋯
docs/._hero.pngadded
⋯ 1 unchanged line ⋯
docs/._states.pngadded
⋯ 1 unchanged line ⋯
docs/HERO.mdadded+1
@@ -0,0 +1 @@+Put a 1200x630 `hero.png` in this folder. It is the billboard reused on the page header, the homepage, and the screensaver. Until it exists, `adom-wiki pkg lint` reports the hero as the one outstanding item.
docs/hero.pngadded
⋯ 1 unchanged line ⋯
docs/states.pngadded
⋯ 1 unchanged line ⋯
install.shadded+39
@@ -0,0 +1,39 @@+#!/bin/sh+# Install the Adom statusline for Claude Code:+#   1. ~/.claude/statusline.sh  (the render script; existing different file -> .bak)+#   2. ~/.claude/settings.json  (merge the statusLine key; all other keys preserved)+set -e++HERE="$(cd "$(dirname "$0")" && pwd)"+CLAUDE_DIR="$HOME/.claude"+DEST="$CLAUDE_DIR/statusline.sh"+SETTINGS="$CLAUDE_DIR/settings.json"++mkdir -p "$CLAUDE_DIR"++if [ -f "$DEST" ] && ! cmp -s "$HERE/statusline.sh" "$DEST"; then+  cp "$DEST" "$DEST.bak"+  echo "backed up existing $DEST -> $DEST.bak"+fi+cp "$HERE/statusline.sh" "$DEST"+chmod +x "$DEST"+echo "installed $DEST"++# Merge (not clobber) settings.json. python3 is present on macOS and every Adom container.+python3 - "$SETTINGS" <<'PY'+import json, os, sys+path = sys.argv[1]+settings = {}+if os.path.exists(path):+    with open(path, encoding="utf-8") as f:+        settings = json.load(f)+settings["statusLine"] = {"type": "command", "command": "~/.claude/statusline.sh"}+tmp = path + ".new"+with open(tmp, "w", encoding="utf-8") as f:+    json.dump(settings, f, indent=2)+    f.write("\n")+os.replace(tmp, path)+print(f"merged statusLine into {path}")+PY++echo "done — restart Claude Code (or start a new session) to see the status line"
package.jsonadded+40
@@ -0,0 +1,40 @@+{+  "slug": "adom-statusline",+  "title": "Adom Statusline for Claude Code",+  "type": "skill",+  "version": "1.0.0",+  "description": "The Adom team's Claude Code status line: model name, a 20-segment context-usage bar, and 5-hour session usage in Adom brand truecolor (teal \u2192 yellow \u2192 red as usage climbs). Pure POSIX sh, no dependencies; one-command install/uninstall that merges settings.json safely.",+  "tags": [+    "skill",+    "claude-code",+    "statusline",+    "terminal",+    "dev-tools"+  ],+  "dependencies": {},+  "discovery_triggers": [+    "set up the adom statusline",+    "install the claude code status line",+    "add a context usage bar to claude code",+    "show model and context usage in my terminal",+    "claude code statusline"+  ],+  "discovery_pitch": "Installs the Adom-branded Claude Code status line: model name, context-window bar, and 5h session usage with teal/yellow/red pressure colors.",+  "sample_prompts": [+    {+      "label": "Install",+      "prompt": "set up the adom statusline in my claude code"+    },+    {+      "label": "Customize",+      "prompt": "make my claude code statusline bar turn red at 70% instead of 80%"+    }+  ],+  "scripts": {+    "install": "./install.sh",+    "uninstall": "./uninstall.sh"+  },+  "hero": {+    "path": "docs/hero.png"+  }+}
statusline.shadded+58
@@ -0,0 +1,58 @@+#!/bin/sh+input=$(cat)+model=$(echo "$input" | sed -n 's/.*"display_name" *: *"\([^"]*\)".*/\1/p')+ctx=$(echo "$input" | grep -o '"used_percentage":[0-9.]*' | head -1 | grep -o '[0-9.]*')+session=$(echo "$input" | grep -o '"five_hour":{[^}]*' | grep -o '"used_percentage":[0-9.]*' | grep -o '[0-9.]*')++# Adom brand colors (truecolor)+C_TEAL=$(printf '\033[38;2;0;184;177m')+C_BLUE=$(printf '\033[38;2;100;171;255m')+C_PURPLE=$(printf '\033[38;2;140;107;247m')+C_RED=$(printf '\033[38;2;255;100;100m')+C_YELLOW=$(printf '\033[38;2;255;193;7m')+C_DIM=$(printf '\033[38;2;120;120;120m')+C_RESET=$(printf '\033[0m')++if [ -n "$model" ]; then+  printf "%s%s%s" "$C_PURPLE" "$model" "$C_RESET"+fi++if [ -n "$ctx" ]; then+  ctx_int=$(printf '%.0f' "$ctx")+  filled=$(( ctx_int / 5 ))+  empty=$(( 20 - filled ))++  if [ "$ctx_int" -ge 80 ]; then+    bar_color="$C_RED"+  elif [ "$ctx_int" -ge 50 ]; then+    bar_color="$C_YELLOW"+  else+    bar_color="$C_TEAL"+  fi++  bar=""+  i=0+  while [ $i -lt $filled ]; do+    bar="${bar}━"+    i=$(( i + 1 ))+  done+  i=0+  while [ $i -lt $empty ]; do+    bar="${bar}╌"+    i=$(( i + 1 ))+  done++  printf " %s[%s %s%%]%s" "$bar_color" "$bar" "$ctx_int" "$C_RESET"+fi++if [ -n "$session" ]; then+  session_int=$(printf '%.0f' "$session")+  if [ "$session_int" -ge 80 ]; then+    s_color="$C_RED"+  elif [ "$session_int" -ge 50 ]; then+    s_color="$C_YELLOW"+  else+    s_color="$C_BLUE"+  fi+  printf " %s%s %s%%%s" "$C_DIM" "5h:" "$s_color$session_int" "$C_RESET"+fi
uninstall.shadded+28
@@ -0,0 +1,28 @@+#!/bin/sh+# Remove the Adom statusline: delete the script and drop the statusLine key+# from ~/.claude/settings.json (every other setting preserved).+set -e++CLAUDE_DIR="$HOME/.claude"+rm -f "$CLAUDE_DIR/statusline.sh"+echo "removed $CLAUDE_DIR/statusline.sh"++SETTINGS="$CLAUDE_DIR/settings.json"+if [ -f "$SETTINGS" ]; then+python3 - "$SETTINGS" <<'PY'+import json, os, sys+path = sys.argv[1]+with open(path, encoding="utf-8") as f:+    settings = json.load(f)+if settings.pop("statusLine", None) is not None:+    tmp = path + ".new"+    with open(tmp, "w", encoding="utf-8") as f:+        json.dump(settings, f, indent=2)+        f.write("\n")+    os.replace(tmp, path)+    print(f"removed statusLine from {path}")+else:+    print("no statusLine key in settings.json — nothing to do")+PY+fi+echo "uninstalled"