modscode EN

modscode / 図鑑 / status-strip

status-strip

One quiet strip above the prompt: repo, docs, deploy, context and cache, each with its own button. Includes Compress with a confirmation and a cache settings dropdown.

確かめやすいコードターミナル+デスクトップバンドトーストBoxButtonSelectText

何をするか

  • プロンプトの上の帯・トーストを描く
  • /where を足す
  • Bash の呼び出しを見張る(止めることがある)
  • session.end・session.start・turn.complete・turn.startにフックする
  • ターンをまたいで自分の状態を持つ

良いところ

  • TypeScript で書かれている
  • エラーを扱う
  • ファイルを書かない

作り始めるためのコード

2 種類あります。上のデザインから modscode が書いた雛形と、その Mod 自身のコードのうち描いている部分です。

雛形(register.tsx)

register.tsx
import type { Register } from 'claude-code'

// Drawn like status-strip by Liberty-Technical-Solutions (band, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/liberty-technical-solutions-status-strip/
// Written by modscode from that reading, not copied from the mod: use it as you like.
// Each value below stands for one the mod works out at run time; put in your own.
export const register: Register = on => {
  // the band above the prompt; what else goes there is drawn under it
  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
    const { Box, Text, Button, Select } = $.ui.resolve(e)
    const text = '…'
    const text2 = '…'
    const text3 = '…'
    const text4 = '…'
    const text5 = '…'
    const text6 = '…'
    const idleHours = '…'
    const ttlMin = '…'
    const warnMin = '…'
    const showMode = '…'
    const note = '…'
    const missing = '…'
    const msg = '…'
    return (
      <Box flexDirection="column">
        <Box columnGap={2} flexWrap="wrap">
          <Box gap={1}>
            <Text dimColor>
              repo
            </Text>
            <Text>
              {text}
            </Text>
          </Box>
          <Box gap={1}>
            <Text dimColor>
              docs
            </Text>
            <Text>
              {text2}
            </Text>
            <Button label="Fix" variant="primary" />
          </Box>
          <Box gap={1}>
            <Text dimColor>
              deploy
            </Text>
            <Text>
              {text3}
            </Text>
            <Button label="Dismiss" variant="primary" />
          </Box>
          <Box gap={1}>
            <Text dimColor>
              context
            </Text>
            <Text>
              {text4}
            </Text>
            <Button label="Compress…" variant="primary" />
          </Box>
          <Box flexGrow={1} />
          <Box gap={1}>
            <Text dimColor>
              cache
            </Text>
            <Text>
              {text5}
            </Text>
            <Box gap={1}>
              <Button label="Refresh (full price)" variant="primary" />
              <Button label="⚙ ▾" variant="primary" />
            </Box>
          </Box>
        </Box>
        <Box flexDirection="column" borderStyle="round" borderColor="warning" paddingX={1}>
          <Text bold>
            Compress this conversation?
          </Text>
          <Text>
            Claude will replace it with a short summary to free up context (
            {text6}
            {" full now). The full text can no longer be read back, and the cache starts cold."}
          </Text>
          <Box gap={1}>
            <Button label="Yes, compress" variant="primary" />
            <Button label="Cancel" />
          </Box>
        </Box>
        <Box gap={1}>
          <Text bold>
            {"Auto paused: idle for "}
            {idleHours}
            h.
          </Text>
          <Button label="Close out" variant="primary" />
          <Button label={`Resume (${idleHours}h more)`} />
        </Box>
        <Box gap={1}>
          <Text bold>
            Auto paused: a newer session is open in this folder.
          </Text>
          <Button label="Keep Auto here anyway" />
        </Box>
        <Box flexDirection="column" borderStyle="round" paddingX={1}>
          <Text bold>
            Strip settings
          </Text>
          <Box gap={2}>
            <Box width={34}>
              <Text>
                Cache lifetime
              </Text>
            </Box>
            <Select options={[{"value":"5","label":"5 min"},{"value":"60","label":"60 min"}]} value={`${ttlMin}`} />
          </Box>
          <Box gap={2}>
            <Box width={34}>
              <Text>
                Keep alive automatically
              </Text>
            </Box>
            <Select options={[{"value":"off","label":"Off"},{"value":"on","label":"On"}]} value="on" />
          </Box>
          <Box gap={2}>
            <Box width={34}>
              <Text>
                Stop keeping alive after idle
              </Text>
            </Box>
            <Select options={[{"value":"4","label":"4 hours"},{"value":"8","label":"8 hours"},{"value":"12","label":"12 hours"},{"value":"0","label":"Never"}]} value={`${idleHours}`} />
          </Box>
          <Box gap={2}>
            <Box width={34}>
              <Text>
                Warn when this much is left
              </Text>
            </Box>
            <Select options={[{"value":"5","label":"5 min"},{"value":"10","label":"10 min"},{"value":"15","label":"15 min"}]} value={`${warnMin}`} />
          </Box>
          <Box gap={2}>
            <Box width={34}>
              <Text>
                Show the strip
              </Text>
            </Box>
            <Select options={[{"value":"always","label":"Always"},{"value":"needed","label":"Only when something needs you"}]} value={`${showMode}`} />
          </Box>
          <Text dimColor>
            Saved once. Applies to every session on this PC.
          </Text>
        </Box>
        <Text dimColor>
          {"deploy: "}
          {note}
        </Text>
        <Text dimColor>
          {"docs: "}
          {missing}
        </Text>
        <Text dimColor>
          {msg}
        </Text>
        {await next(e)}
      </Box>
    )
  })

  on('session.start', async ($, e, next) => {
    const idleHours = '…'
    await $.ui.toast(`status-strip: Auto paused after ${idleHours}h idle`)
    await $.ui.toast(`status-strip: Auto paused, newer session in this folder`)
    return next(e)
  })
}

Mod 自身のコード

読んだコミットにライセンスの全文が見つからなかったため、ソースの場所へのリンクだけにしています。

コードが呼ぶもの

通信プログラム起動ファイル読み取りClaude を動かすツール呼び出し保存

コードから読み取ったデザイン

読み取ったコミットのソースから描いたもので、動かした結果ではありません。一覧は 3 回描き、条件はデスクトップアプリで描く最初の分岐を取り、動かしたときにだけ決まる値は仮の例(点線の下線)にするか省きます。色と書体はこのサイトのものです。

コードから読めること

2026-10-06 に読んだコミット f0cac8159bd6 のソースから。最初のまとまりが載せる条件で、残りは自分で判断するための材料です。後のコミットは、次に読むまで見ていません。

載せる条件: 確かめやすいコード
入口を読んだhooks/hooks.json が名指すモジュールをすべて読んだ。plugins/status-strip/hooks/register.tsx
解析できるすべてのファイルが TypeScript か JavaScript として解析できる。2 ファイルを解析
コードが Mod の中で完結import は Mod 自身のファイルかエンジンのモジュールだけ。パッケージも require もない。コードはすべて Mod の中
読める圧縮した行・eval・new Function・計算した道の import()・符号化した塊がない。圧縮・eval・符号化した塊なし
呼び出しが見える通信とプログラム起動はその場で $.http.fetch・$.process.run と書き、他へ渡さない。外への呼び出しはすべてその場の $ で
入れる前に自分で判断する材料
描く場所コードから読んだ、描く先。ターミナル・デスクトップアプリ・両方・何も描かない(フックだけ: 見張りやプロンプトの書き換え)のどれか。出すだけで、外す理由にはしない。ターミナルとデスクトップアプリに同じように描く
入れる手順リポジトリ自身の .claude-plugin/marketplace.json にこの Mod が載っていて、ページに書いた手順でそのマーケットプレイスから入れられるか。リポジトリの .claude-plugin/marketplace.json に載っており、そこから入れられる
Windows のプログラム$.process で起動するプログラムが Windows にあるか(tail・date・open・osascript・/usr/… などは無い)。Windows にないプログラムを使わない
通信fetch の送り先(https のホスト)がコードに書いてあるか。plugins/status-strip/hooks/register.tsx:171 fetch(cfg.healthUrl); plugins/status-strip/hooks/register.tsx:329 fetch(`http://localhost:${p}/`)
プログラム起動するプログラムの名前がコードに書いてあり、シェル・インタプリタ・通信用の道具でないか。plugins/status-strip/hooks/register.tsx:82 実行時に決まるプログラム
読んで送るファイルや環境変数を読み、かつ通信するか。読んだうえで通信する
ソースの鍵ソースに API キーや秘密鍵らしきものがあるか。ソースに鍵なし
ライセンスオープンなライセンス(MIT・Apache-2.0・BSD・ISC・Unlicense・0BSD・CC0)で全文があれば、modscode にコードを載せる。違えばリンクだけ。ライセンスなし

コードの文面を読んだだけで、安全の審査ではありません。動かしてはおらず、起動するプログラムの中で何が起きるかも見えません。入れる前の確認はあなたの役目です。 載せる条件

入れる

入れる前に、必ず自分で確かめてください。Mod はサンドボックスなしで、あなたの権限で動きます。modscode はこのコードの安全を保証しません。下のコードを読み(またはフォルダーで claude plugin validate .)、触るものを見て、読んだコミットを入れてください。

リポジトリがそのままマーケットプレイスです。このマーケットプレイスを足し(ターミナルでは次のコマンド、デスクトップアプリではプラグインの設定)、そこから Mod を入れます。

/plugin marketplace add Liberty-Technical-Solutions/claude-workflow-mods
/plugin install status-strip@workflow-mods

入るのはマーケットプレイスの最新のコミットで、ここで読んだもの(f0cac8159bd6)と違うことがあります。入れる前に見比べてください。

Claude に聞く

modscode のコネクタを入れると、Claude がこのデザイン・コードが触るもの・コードを読んで、それをもとに作れます。たとえば:

modscode のデザイン「liberty-technical-solutions-status-strip」をコードごと読んで、同じようなペインを作って

Claude から探す: MCP コネクタ

似たデザイン