ClaudeMods
☰
KO
● 0 명 접속 중 · 조회 0 회
후원프로젝트 제출
GitHub 저장소 · 작성자 dukechain2333

starfleet-panel

Claude Code용 LCARS 상태 패널입니다.

dukechain2333@dukechain2333

dukechain2333/starfleet-panel/tree/main/plugin

원본 게시물 이미지1
번역 완료

이 mod 소개

starfleet-panel

Claude Code용 LCARS 상태 패널입니다. 일반적으로 프롬프트 아래에 놓이는 읽기 값(모델, 추론 강도, 컨텍스트 창, 속도 제한, 디렉터리, git 브랜치)을 The Next Generation의 작전 콘솔처럼 그립니다. 양 끝에는 꺾인 부분이 있고, 헤더 바는 읽기 값마다 색상 구간으로 나뉘며 아래에 레이블과 값이 놓입니다. red-alert와 나란히 사용하며 red-alert가 경보음을 내면 함께 RED ALERT가 됩니다.

Claude Code 프롬프트 아래의 starfleet-panel: 브리지 레이아웃, red-alert와 연동한 적색 경보, 컴팩트 레이아웃

  • LCARS 스타일로 한눈에. 모델과 추론 강도, 컨텍스트 창과 5시간 제한의 구간형 미터, 7일 제한, 재설정 카운트다운, git 브랜치, 작업 디렉터리, 우주 날짜를 보여 줍니다.
  • red-alert에 맞춰 설계. red-alert 상태(green, muted, offline)를 표시하고 경보 중에는 프레임 전체를 빨간색으로 다시 칠해 경보음 애니메이션 동안 깜박입니다. 두 mod는 서로의 화면 공간, 키, 명령, 상태를 건드리지 않습니다.
  • 어떤 너비에도 맞습니다. 열이 너비를 나누고, 좁아지면 미터와 덜 중요한 열 순서로 줄어듭니다. 64열 미만에서는 한 줄 띠가 되며 넓은 터미널에는 ENV, ENERGY, CREW가 추가됩니다.
  • 로컬이며 무료. 모델 호출이나 네트워크 요청을 하지 않고 상태 줄과 같은 프로세스 내 데이터에서 수치를 얻습니다.

읽기 값

각 읽기 값에는 Starfleet 이름과 일반 이름이 있습니다. /lcars plain 또는 /lcars starfleet으로 선택하며 /config의 Terminology처럼 저장됩니다. 일반 이름은 날짜, CONTEXT 42% used, 5H LIMIT 72% left, ALERTS ONLINE처럼 표시됩니다.

| Starfleet 이름 | 일반 이름 | 표시 내용 | | --- | --- | --- | | STANDBY / ENGAGED | IDLE / WORKING | 사이드바 위쪽: Claude가 작업 중인지 여부 | | stardate | date(OCT 02) | 사이드바 아래쪽. TNG의 방송식 시간으로 1987년 시작 시 41000이며 매년 천 단위로 늘어납니다 | | HELM | MODEL | OPUS 5.5와 추론 강도: IMPULSE, WARP 5, WARP 7, WARP 9, WARP 9.6 | | CORE | CONTEXT | 컨텍스트 창 사용량 42%와 구간형 미터 | | DILITHIUM | 5H LIMIT | 5시간 제한, 72% left, 미터, T-2H14M 재설정 시간 | | ANTIMATTER | 7D LIMIT | 7일 제한과 재설정 시간 | | COURSE / SECTOR | GIT / DIR | git 브랜치, 작업 디렉터리, 홈의 ~, 저장소 밖의 SECTOR | | ENV | ENV | base가 아닌 conda 환경 또는 virtualenv | | ENERGY | COST | 넓은 터미널에 표시되는 세션 비용 | | CREW | USER | 넓은 터미널에 표시되는 user@host | | CONDITION | ALERTS | red-alert의 GREEN, MUTED, OFFLINE, 경보 또는 red-alert가 없을 때의 SHIP TIME |

사용량 60%에서 노란색, 80%에서 빨간색입니다. 5시간과 7일 제한은 Claude Code가 값을 받은 뒤, Pro 또는 Max의 첫 응답 이후 표시됩니다.

red-alert와 함께

red-alert의 띠를 프롬프트 위에, 이 패널을 아래에 같은 LCARS 팔레트로 표시합니다. online、muted、offline은 각각 CONDITION / GREEN、CONDITION / MUTED、CONDITION / OFFLINE이며 경보 중에는 RED ALERT가 됩니다. 0으로 음소거할 수 있고 설치되지 않았으면 SHIP TIME을 유지합니다. 각 mod는 자신이 소유한 것만 그리며 red-alert는 /alert와 alert 도구를, starfleet-panel은 /lcars와 아래 힌트 줄을 담당합니다. red-alert의 link와 active는 읽기만 하며 followRedAlert를 false로 하면 무시합니다.

설치

git clone https://github.com/dukechain2333/starfleet-panel.git
cd starfleet-panel
./install.sh

mod를 ~/.claude/skills/starfleet-panel에 복사하고 새 Claude Code 세션에서 starfleet-panel@skills-dir로 로드합니다. ./install.sh --link은 체크아웃을 연결하고 ./uninstall.sh는 제거합니다. marketplace 설치는 다음과 같습니다.

claude plugin marketplace add dukechain2333/starfleet-panel
claude plugin install starfleet-panel@starfleet-panel

~/.claude/settings.json의 statusLine은 제거해야 같은 수치가 두 번 그려지지 않습니다. 요구 사항은 mod를 지원하는 Claude Code(function-hook 플러그인; 2.1.288에서 빌드 및 테스트)와 트루 컬러, 블록 요소를 지원하는 고정폭 터미널입니다.

사용

컨텍스트 창과 제한을 2초마다 갱신하고 각 턴 후 및 30초마다 디렉터리, 브랜치, 환경, 설정을 다시 읽습니다. bridge는 세 줄, compact는 한 줄, off는 Claude Code 힌트만 표시하며 64열 미만과 데스크톱 앱에서는 compact로 돌아갑니다. /lcars는 전체 보고서를 출력합니다.

LCARS STATUS REPORT 繚 STARDATE 80753.1 繚 22:32

HELM        (model, effort)      OPUS 5.5 繚 xhigh effort (warp 9)
CORE        (context window)     4% used 繚 43K of 1M tokens
DILITHIUM   (5-hour limit)       95% left 繚 resets in 4h18m
ANTIMATTER  (7-day limit)        63% left 繚 resets in 4h28m
ENERGY      (session cost)       $0.35
SECTOR      (working directory)  ~/starfleet_panel
COURSE      (git branch)         main
ENV         (python env)         none
CONDITION   (red-alert)          condition green

/lcars plain | starfleet는 이름을, /lcars bridge | compact | off는 레이아웃을 전환하고 /lcars reset은 설정으로 돌아갑니다.

설정

/config 또는 claude plugin configure starfleet-panel에서 layout, labels, showCost, showUserHost, followRedAlert, refreshSeconds를 설정합니다. 기본값은 bridge, starfleet, false, true, true, 2입니다.

작동 방식

mod는 Claude Code의 PromptHint 영역을 그려 엔진의 행과 함께 반환합니다. 수치는 $.session.usage()와 $.session.model()에서 가져오며 추론 강도는 관찰 전용 turn.step 훅이 기록합니다.

개발

claude plugin validate plugin     # manifest and hooks, as the engine reads them
claude plugin test plugin         # the tests: layouts, red-alert states, /lcars
claude --plugin-dir plugin        # try it; saving a file reloads it
npx -p typescript tsc -p plugin   # type-check, once a session has loaded the mod
                                  # (it lays the types in plugin/.claude-plugin/types)

레이아웃은 plugin/hooks/register.tsx, plugin/hooks/panel.ts, plugin/hooks/lcars.ts, plugin/hooks/readouts.ts, plugin/types/index.d.ts, plugin/tests/에 있습니다. docs/preview.svg는 실제 세션에서 가져오며 tmux capture-pane -e -p -t <session> > capture.ans와 python3 docs/ansi2svg.py capture.ans docs/preview.svg --rows <first>-<last>로 변환합니다.

크레딧과 라이선스

Michael Okuda가 설계한 LCARS의 외관을 빌린 비공식 팬 프로젝트입니다. Star Trek과 상표는 각 소유자에게 속합니다.

MIT

설치

먼저 작성자의 README에서 marketplace와 플러그인 이름을 확인하세요. 저장소 구조에 따라 명령어가 달라질 수 있습니다.

claude plugin marketplace add dukechain2333/starfleet-panel
claude plugin install starfleet-panel
원문 / README

starfleet-panel

An LCARS status panel for Claude Code. The readouts that usually sit under the prompt (model, effort, context window, rate limits, directory, git branch) are drawn as an ops console from The Next Generation: elbows at both ends, a header bar cut into one colored segment per readout, the labels under their segments and the values under the labels. It's built to sit beside red-alert. When red-alert sounds the klaxon, the panel goes to RED ALERT with it.

starfleet-panel under the Claude Code prompt: the bridge layout, a red alert with red-alert, and the compact layout

  • Everything at a glance, LCARS style. Model and effort (as a warp factor), segmented meters for the context window and the 5-hour limit, the 7-day limit, countdowns to each reset, the git branch and working directory, and the stardate.
  • Made for red-alert. It shows red-alert's condition (green, muted, offline). While an alert is up, it repaints the whole frame in the alert's reds and blinks with red-alert's klaxon for as long as it animates. The two mods never touch each other's screen space, keys, commands or state.
  • Fits any width. The columns share the width out. As the terminal narrows, the meters shrink first, then the least important columns go, and below 64 columns the frame becomes a one-row strip. Wide terminals gain the ENV, ENERGY and CREW columns.
  • Local and free. It makes no model calls and no network requests. The figures come from the same in-process data the status line uses.

The readouts

Every readout has a Starfleet name and a plain one, and you pick which the panel uses: /lcars plain or /lcars starfleet (saved, like the Terminology row in /config). The plain terms read as an ordinary status line: the date instead of the stardate, CONTEXT 42% used, 5H LIMIT 72% left, ALERTS ONLINE.

| Starfleet term | Plain term | What it shows | | --- | --- | --- | | STANDBY / ENGAGED | IDLE / WORKING | the sidebar's upper block: whether Claude is working | | stardate | date (OCT 02) | the sidebar's lower block; the stardate is TNG's broadcast reckoning: 41000 when the show began in 1987, a thousand units a year | | HELM | MODEL | the model (OPUS 5.5) and reasoning effort as a warp factor: low IMPULSE, medium WARP 5, high WARP 7, xhigh WARP 9, max WARP 9.6 | | CORE | CONTEXT | context window used (42%; plain 42% used), with a segmented meter | | DILITHIUM | 5H LIMIT | the 5-hour limit: how much is left (plain 72% left), a meter, and the time to the reset (T-2H14M; plain reset 2h14m) | | ANTIMATTER | 7D LIMIT | the 7-day limit: how much is left and the time to the reset | | COURSE / SECTOR | GIT / DIR | the git branch (or @<sha> when detached) over the working directory, ~ for home; SECTOR outside a repository | | ENV | ENV | the active conda env (not base) or virtualenv, on wide terminals | | ENERGY | COST | the session's cost, on wide terminals (off by default) | | CREW | USER | user@host, on wide terminals (can be turned off) | | CONDITION | ALERTS | the end block: red-alert's state, GREEN (plain ONLINE), MUTED, OFFLINE or the alert; without red-alert, SHIP TIME (plain TIME) over the clock |

Readings turn yellow at 60% used and red at 80%. These are the thresholds of the classic statusLine script the panel replaces. The 5-hour and 7-day limits appear once Claude Code has a reading for them: on a Pro or Max subscription, after the first response.

With red-alert

Install both and they share one console: red-alert's band above the prompt and this panel below it, in the same LCARS palette.

| red-alert's state | The panel | | --- | --- | | online | the end block reads CONDITION / GREEN | | muted | CONDITION / MUTED | | offline | CONDITION / OFFLINE | | an alert is up | the whole frame turns the alert's reds and the end block reads RED ALERT (or the level's title) | | a red or yellow alert animating | the state block and the end block blink with the klaxon, then hold steady until you silence or dismiss the alert (0, red-alert's key) | | not installed | the end block keeps SHIP TIME; everything else works the same |

The mods don't conflict because each one draws, binds and stores only what it owns:

| | red-alert | starfleet-panel | | --- | --- | --- | | Draws | the band above the prompt, the /alert console, its tool's row | the hint line under the prompt, nothing else | | Command | /alert | /lcars | | Tools and system prompt | the alert tool and a short alert policy | none | | Keys | 0 silences; band items via ctrl+x tab | none: no buttons, no hotkeys | | State | its own | its own; reads red-alert's link and active, never writes them |

The panel learns of a new alert the moment red-alert records it. It does this with an observe-only hook on red-alert's state, which passes every value through exactly as red-alert wrote it. Set followRedAlert to false to ignore red-alert altogether.

Install

git clone https://github.com/dukechain2333/starfleet-panel.git
cd starfleet-panel
./install.sh

This copies the mod to ~/.claude/skills/starfleet-panel. Start a new Claude Code session and it loads as starfleet-panel@skills-dir. Use ./install.sh --link to symlink the checkout instead while you work on it, and ./uninstall.sh to remove it.

The repository is also a plugin marketplace:

claude plugin marketplace add dukechain2333/starfleet-panel
claude plugin install starfleet-panel@starfleet-panel

Retire your statusLine command. If ~/.claude/settings.json has a statusLine entry, its line keeps drawing above the panel and you see the same figures twice. Remove the entry to let the panel take over. The panel tells you once, the installer reminds you, and /lcars mentions it while one is set.

Requirements: Claude Code with mod support (function-hook plugins; built and tested on 2.1.288), and a terminal with true color and a monospace font that has the block elements (▄ ▀ ▌ ▗). Any modern terminal font does.

Using it

The panel needs nothing from you. It refreshes the context window and limits every 2 seconds. It re-reads the directory, branch, env and settings after every turn and every 30 seconds.

  • Layouts: bridge, the three-row ops console (the default); compact, one row in the style of red-alert's idle strip; off, only Claude Code's own hint line. Bridge falls back to compact on terminals narrower than 64 columns and in the desktop app.

  • /lcars prints a full status report. It lists every reading beside what its Starfleet name stands for, which makes it a legend too:

    LCARS STATUS REPORT · STARDATE 80753.1 · 22:32
    
    HELM        (model, effort)      OPUS 5.5 · xhigh effort (warp 9)
    CORE        (context window)     4% used · 43K of 1M tokens
    DILITHIUM   (5-hour limit)       95% left · resets in 4h18m
    ANTIMATTER  (7-day limit)        63% left · resets in 4h28m
    ENERGY      (session cost)       $0.35
    SECTOR      (working directory)  ~/starfleet_panel
    COURSE      (git branch)         main
    ENV         (python env)         none
    CONDITION   (red-alert)          condition green
    
  • /lcars plain | starfleet switches the terms, and keeps the choice for new sessions.

  • /lcars bridge | compact | off switches the layout for this session. /lcars reset goes back to the setting.

Settings

Set these in /config (or claude plugin configure starfleet-panel):

| Setting | Default | | | --- | --- | --- | | layout | bridge | bridge, compact or off | | labels (Terminology) | starfleet | starfleet (HELM, CORE, DILITHIUM, stardate…) or plain (MODEL, CONTEXT, 5H LIMIT, date…); /lcars plain and /lcars starfleet set it too | | showCost | false | add the ENERGY column (the session's cost) on wide terminals | | showUserHost | true | add the CREW column (user@host) on wide terminals | | followRedAlert | true | show red-alert's condition and repaint with its alerts | | refreshSeconds | 2 | how often the context window and limits are re-read |

How it works

The mod draws Claude Code's PromptHint site, the hint line under the prompt. It returns its own rows together with the engine's line, so the mode pill (⏵⏵ auto mode on) and hints such as esc to interrupt stay live above the frame. Its figures come from $.session.usage() and $.session.model(), which are free in-process calls. The effort is the one each main-loop request was actually sent with, recorded by an observe-only turn.step hook that leaves the response stream untouched. Before the first request, the effort comes from your settings.

Development

claude plugin validate plugin     # manifest and hooks, as the engine reads them
claude plugin test plugin         # the tests: layouts, red-alert states, /lcars
claude --plugin-dir plugin        # try it; saving a file reloads it
npx -p typescript tsc -p plugin   # type-check, once a session has loaded the mod
                                  # (it lays the types in plugin/.claude-plugin/types)

Layout: plugin/hooks/register.tsx (hooks, sensors, drawing), plugin/hooks/panel.ts (the layouts and the report), plugin/hooks/lcars.ts (palette and row fitting), plugin/hooks/readouts.ts (stardate, warp factor, gauges, cell widths), plugin/types/index.d.ts (the state contract), plugin/tests/.

docs/preview.svg comes from a real session. Capture it with tmux capture-pane -e -p -t <session> > capture.ans, then convert it with python3 docs/ansi2svg.py capture.ans docs/preview.svg --rows <first>-<last>.

Credits

The panel borrows the look of LCARS, the computer interface designed by Michael Okuda for Star Trek: The Next Generation. This is an unofficial fan project. Star Trek and its marks belong to their respective owners.

License

MIT

비슷한 프로젝트