From mst
Installs MST HUD statusline wrapper in Claude Code by backing up and replacing statusLine.command in ~/.claude/settings.json. Invoked via 'HUD 설치', 'statusline 설치', or '/mst:hud-install'.
npx claudepluginhub myrtlepn/gran-maestro --plugin mstThis skill uses the workspace's default tool permissions.
Claude Code status line을 MST HUD 래퍼(`scripts/mst-statusline.sh`)로 교체합니다.
Removes MST HUD statusline wrapper and restores original statusLine.command from ~/.claude/settings.json backup. Invoke with '/mst:hud-uninstall', 'HUD 제거', or 'statusline 복원'.
Installs, uninstalls, or checks status of statusline-tools custom status line in Claude Code settings.json, managing dependencies via bash script.
Installs CWM HUD to Claude Code status line displaying folder, branch, context bar, tools/agents/skills, active plan, and 5h limit. Checks Node.js/jq prerequisites and handles existing configs.
Share bugs, ideas, or general feedback.
Claude Code status line을 MST HUD 래퍼(scripts/mst-statusline.sh)로 교체합니다.
{PLUGIN_ROOT}경로 규칙:{PLUGIN_ROOT}는 이 스킬의 "Base directory"에서skills/{스킬명}/을 제거한 절대경로입니다.
경로 준비
SETTINGS_PATH=~/.claude/settings.jsonBACKUP_PATH=~/.claude/mst-statusline-backup.jsonWRAPPER_PATH={PLUGIN_ROOT}/scripts/mst-statusline.shWRAPPER_COMMAND=bash "{WRAPPER_PATH}"~/.claude/settings.json의 현재 statusLine.command를 백업
{
"statusLine": {
"type": "command",
"command": "..."
}
}
statusLine.command가 MST 래퍼(mst-statusline.sh)이고 백업 파일이 존재하면 백업 갱신은 생략한다.~/.claude/settings.json 업데이트
statusLine.type = "command"statusLine.command = WRAPPER_COMMANDenv, permissions, hooks, enabledPlugins 등)는 모두 보존한다.완료 메시지 출력
MST HUD 설치 완료statusLine.command -> bash "{WRAPPER_PATH}"backup -> ~/.claude/mst-statusline-backup.json[Claude/Opus] MST idle)python3 - <<'PY'
import json
import os
settings_path = os.path.expanduser("~/.claude/settings.json")
backup_path = os.path.expanduser("~/.claude/mst-statusline-backup.json")
plugin_root = "{PLUGIN_ROOT}"
wrapper_path = os.path.join(plugin_root, "scripts", "mst-statusline.sh")
wrapper_command = f'bash "{wrapper_path}"'
default_hud_command = (
"bash -c 'plugin_dir=$(ls -d \"${CLAUDE_CONFIG_DIR:-$HOME/.claude}\"/plugins/cache/claude-hud/claude-hud/*/ 2>/dev/null "
"| sort -t/ -k$(echo \"${CLAUDE_CONFIG_DIR:-$HOME/.claude}/plugins/cache/claude-hud/claude-hud/\" | tr \"/\" \"\\n\" | wc -l)n | tail -1); "
"exec \"/opt/homebrew/bin/node\" \"${plugin_dir}/dist/index.js\"'"
)
try:
with open(settings_path, "r", encoding="utf-8") as f:
settings = json.load(f)
except (FileNotFoundError, json.JSONDecodeError):
settings = {}
if not isinstance(settings, dict):
settings = {}
status_line = settings.get("statusLine")
if not isinstance(status_line, dict):
status_line = {}
current_command = status_line.get("command")
is_wrapper = isinstance(current_command, str) and "mst-statusline.sh" in current_command
backup_exists = os.path.exists(backup_path)
if not (is_wrapper and backup_exists):
backup_command = current_command if isinstance(current_command, str) else ""
if is_wrapper and not backup_exists:
backup_command = default_hud_command
backup = {
"statusLine": {
"type": status_line.get("type", "command"),
"command": backup_command
}
}
tmp_backup = backup_path + ".tmp"
with open(tmp_backup, "w", encoding="utf-8") as f:
json.dump(backup, f, indent=2, ensure_ascii=False)
f.write("\n")
os.replace(tmp_backup, backup_path)
settings["statusLine"] = {"type": "command", "command": wrapper_command}
tmp_settings = settings_path + ".tmp"
with open(tmp_settings, "w", encoding="utf-8") as f:
json.dump(settings, f, indent=2, ensure_ascii=False)
f.write("\n")
os.replace(tmp_settings, settings_path)
print("MST HUD 설치 완료")
print(f"statusLine.command -> {wrapper_command}")
print(f"backup -> {backup_path}")
PY