ClaudeMods
☰
JA
● 0 人がオンライン ・閲覧 0 回
スポンサー作品を投稿
GitHub リポジトリ · 投稿者 Skills-transfer-hub

sth-usage

Buddy:コンテキスト、セッションの要約と再開、プロジェクト診断、STH skills、fika ブレイク

Skills-transfer-hub@Skills-transfer-hub

Skills-transfer-hub/sth-claude/tree/main/mods/sth-usage

翻訳済み

この mod について

Buddy · Claude Code

バージョン 0.3.1。Home パネルの下部にもバージョンが表示されます。

Buddy は Claude のコンテキストとクォータ、変更されたファイルとチェック結果を追跡し、プロジェクトに合う STH skills を見つける手助けをします。

ソースコードは MIT ライセンスです。Buddy のアート、アニメーションデータ、STH ブランドは保留されています。LICENSE を参照してください。

よくある使い方

  • Claude の作業中にコンテキストとクォータの使用量を確認し、Context でアクティブなエージェントを調べます。
  • Summary で変更ファイルと観測されたテスト結果を確認し、認識されたチェックを実行して、あとで作業を再開するための下書きを準備します。
  • プロジェクトを STH カタログに接続し、関連する skill をインストールして、更新または削除の前にインストール済みのバージョンを確認します。

mod はセッションとプロジェクトの情報を読み取り、ローカルの Resume 要約を保存します。正確な内容、保持期間、外部 CLI の動作、削除手順は Privacy and data handling を参照してください。ヘルプには GitHub issues を使い、秘密情報や非公開のプロジェクトデータは含めないでください。

GitHub からインストール

Claude Code 2.1.287 以降と Git が必要です。ターミナルで実行します。

claude plugin marketplace add https://github.com/Skills-transfer-hub/sth-claude.git
claude plugin install sth-usage@sth --scope user

プロジェクトで Claude Code を起動し、/sth-usage を実行します。すでに開いているセッションでは、先に /reload-plugins を実行します。user スコープによりすべてのプロジェクトで Buddy が有効になります。STH CLI が必要なのはカタログ、インストール、更新の操作だけで、使用量の追跡には不要です。

更新するには:

claude plugin marketplace update sth
claude plugin update sth-usage@sth

更新後に /reload-plugins を実行するか Claude Code を再起動します。アンインストールするには claude plugin uninstall sth-usage@sth を実行します。

公式の mod インストールガイド とマーケットプレイスガイドを参照してください。

mod を読み込む

Claude Code 2.1.287 以降が必要です。このディレクトリから実行します。

claude --plugin-dir .

mod を読み込んだセッションでは保存するたびにモジュールが再読み込みされます。プラグインなしのデスクトップセッションでは、これらの機能は自動的に有効になりません。

使い方

インターフェースは右パネルにあります。ホーム画面には Buddy があり、その下に STH、Summary、More(Context、Diagnostics、Resume)の 1 行ナビゲーションがあります。STH ページではインストール済みの skills とカタログを管理します。More を開くと 3 つのナビゲーションボタンが展開されます。他の画面には Home ボタンが 1 つあります。ナビゲーションは現在のパネルを置き換え、上に別のパネルを重ねません。mod はメッセージフィールドの上に帯を追加しません。

Usage カードには各指標が 1 回だけ表示されます。クォータとリセット時刻、コンテキスト、観測トークン、コスト、エージェントです。Pill は STH デザインシステムのニュートラルトークンに従い、細いアウトライン、Inter のラベル、JetBrains Mono の SVG 値を使います。ネイティブコントロールは Claude が決めたフォントとサイズを保ち、ターミナルボタンはニュートラルなアウトラインです。赤はエラー専用です。

デスクトップでは pill の詳細がホバーで表示されます。カウントダウンは 30 秒ごとに再描画されますが、新しい使用量データは要求しません。「~」は mod の読み込み後に累積したトークンを示します。それより前の履歴はない場合があります。main のパネルプレビューのソースにはサンプルデータを使ったライト、ダーク、狭いレイアウトがあります。これは Claude のセッションではありません。

| アクセス | 機能 | | --- | --- | | More → Context または /sth-context | コンテキストの内訳:システム、ツール、MCP、メモリ、メッセージ、アクティブなエージェント。 | | /sth-usage | Buddy、統合された使用量メトリクス、他のパネルへのナビゲーション。 | | Summary または /sth-activity | 実際に書き込まれたファイル、ツールエラー、観測されたテスト。ボタンで diff を開き、検証用の下書きを準備し、詳細な要約を表示します。認識されたテストはパネルで明示的に要求されたときだけ実行します。 | | STH または /sth-skills | インストール済みの skills、バージョン、更新。プロジェクトの manifest に基づくカタログのおすすめ。 | | /sth-doctor | スタック、利用可能なバイナリ、テストコマンド、STH 設定、観測された MCP ツールの状態。診断ではテストを実行しません。 | | More → Resume または /sth-resume | 前のセッションの目標、ファイル、チェック、次の手順。下書きに明示的に追加する前に要約を確認してください。自動送信はされません。 |

Buddy は作業中、権限待ち、エラー、完了したターン、中断を区別します。メインターンが少なくとも 60 秒続くと、Claude に控えめな通知を出します。

ターミナルが画像をサポートするとき、Buddy は元の画像ピクセルを表示しようとします。通常の状態は 384 × 384、Fika は 720 × 720 です。ソース checkout は元の PNG を読み、compact リリースは可逆圧縮されたフレームデータから RGBA ピクセルを復元します。エンコードはピクセル、寸法、フレーム順を保ち、再生も元のタイミングを保ちます。ターミナルが実際に画像を拒否すると、96 × 96 のポーズから生成した色付きの四分割フォールバックを有効にします。これは文字ベースの描画で、細部はパネルのサイズとターミナルフォントに依存します。tmux ではフォールバックを直接使います。パネルはサイズに合わせてアニメーションを調整し、狭い場合は拡大を勧めます。デスクトップでは既存の HD 画像を使います。

コンテキストは Claude の summary モードを使ってローカルで推定します。追跡のために追加のモデルは呼びません。不明なメトリクスは利用できないままです。累積課金トークンからコンテキストウィンドウの埋まり具合は分かりません。

終了コードを観測した場合だけ、テストを成功または失敗として表示します。Bash ツールがそのコードを提供しないバージョンでは、結果は未検証のままです。実行ボタンは認識されたプロジェクトコマンドを使い、実際の結果を表示します。ネイティブ diff には現在のターンより前に行われた変更が含まれる場合があります。

MCP の状態は公開されたツールと観測された呼び出しを反映します。ツールを持たないサーバーが接続されている証拠にはなりません。STH が提供するときは skill のバージョンを表示します。更新ではピン留めされたバージョンを飛ばし、ローカル変更を保護します。更新レポートは新しい STH status チェックから取得し、検証失敗もそのまま表示します。

ローカルの要約はセッションディレクトリの .sth/buddy-session.json に保存されます。短縮した目標、最大 40 個のパス、12 個のチェック結果を含み、トランスクリプトやコマンド出力は含みません。よくある秘密情報はマスクし、機密パスは除外します。書き込みエラーはパネルに表示されます。

STH をインストール

STH のバイナリが見つからない場合、Buddy はプロジェクトを設定する前にインストールガイドを表示します。

macOS または Linux、Homebrew:

brew install skills-transfer-hub/sth/sth
sth version

Windows、Scoop:

scoop bucket add sth https://github.com/Skills-transfer-hub/scoop-sth
scoop install sth
sth version

Windows の代替:winget install STH.STH または choco install sth。

パッケージマネージャーがない場合は、公式リリースを使い、SHA256SUMS を検証してバイナリを PATH に追加します。STH インストールドキュメントを参照してください。

必要ならターミナルを再起動し、Check installation または /sth-doctor を使います。STH が使えるようになれば、/sth-skills でカタログをプロジェクトに接続できます。

mod を検証

claude plugin validate .
claude plugin test .

ターミナルとデスクトップの描画、ボタンと下書き、データ不足、権限、要約と再開、既存の Buddy と Fika のアニメーションをテストします。

compact 配布物を公開

main のソース checkoutを使います。compact リリースではビルドツールとプレビューを省きます。先にソース変更とバージョン更新をコミットしてください。ビルダーには Python 3.12、Pillow 12.3.0、NumPy 2.3.5 が必要です。mod のソースディレクトリから実行します。

sth_release_dir=$(mktemp -d)
sth_source_root=$(git rev-parse --show-toplevel)
sth_source_commit=$(git rev-parse HEAD)
python3 tools/build_directory_bundle.py --source . --output "$sth_release_dir/bundle" --include-tests
claude plugin validate "$sth_release_dir/bundle/sth-usage"
claude plugin test "$sth_release_dir/bundle/sth-usage"
python3 tools/stage_directory_release.py --source-root "$sth_source_root" --bundle "$sth_release_dir/bundle/sth-usage" --output "$sth_release_dir/tree" --source-commit "$sth_source_commit"
python3 tools/publish_directory_release.py --source-root "$sth_source_root" --tree "$sth_release_dir/tree" --publish

パブリッシャーは compact プラグイン、マーケットプレイス、ドキュメント、ライセンス通知を含む codex/directory-release だけを更新します。古いバージョンを拒否し、強制プッシュは決して行いません。--publish を省略すると dry run になります。元のアートと開発ファイルは main に残ります。

Claude Directory のソースが codex/directory-release を追跡するように設定すると、今後の更新チェックで compact リリースを確認できます。Directory の検証とレビューは GitHub への公開とは別です。マーケットプレイスのユーザーは https://github.com/Skills-transfer-hub/sth-claude.git#codex/directory-release からインストールできます。自動更新は /plugin → Marketplaces → sth で別途有効にします。

プレビューを再構築

main のソース checkoutで、Node 22 以降とローカルで利用できる STH デザインシステムを用意します。

node tools/preview_usage_pills.mjs /path/to/design-system
python3 -m http.server 8768 --bind 127.0.0.1 --directory previews/usage-band

ローカルプレビューを開きます。STH、Summary、More は同じパネルでサンプルビューを開き、Home は使用量の概要に戻って前のビューを閉じます。STH ビューには動作する Installed と Catalog タブがあります。プレビューではインストール、削除、セッション操作、ダッシュボードナビゲーションを無効にしています。

ジェネレーターは mod の SVG レンダラーを使い、元の Buddy 画像とデザインシステムのスタイルをコピーします。元のソースは変更しません。プレビューではデザインシステムの Google Fonts import と、宣言されたローカルフォールバックを使います。mod は実行時にこれらのフォントを取得しません。

インストール

まず作者の README で marketplace とプラグイン名を確認してください。コマンドはリポジトリの構成によって変わる場合があります。

claude plugin marketplace add Skills-transfer-hub/sth-claude
claude plugin install sth-usage
原文 / README

Buddy · Claude Code

Version 0.3.1. The version is also visible at the bottom of the Home panel.

Buddy tracks Claude context and quotas, changed files and checks, then helps you find STH skills that fit your project.

Software source code is MIT-licensed. Buddy artwork, animation data and STH branding are reserved; see LICENSE.

Typical uses

  • Watch context and quota usage while Claude works, then inspect active agents in Context.
  • Review changed files and observed test results in Summary, run a recognized check, and prepare a draft to resume the work later.
  • Connect a project to an STH catalog, install a relevant skill, and check installed versions before updating or removing it.

The mod reads session and project information and saves a local Resume summary. See Privacy and data handling for the exact contents, retention, external CLI behavior and deletion steps. For help, use GitHub issues; do not include secrets or private project data.

Install from GitHub

Requires Claude Code 2.1.287 or later and Git. Run in your terminal:

claude plugin marketplace add https://github.com/Skills-transfer-hub/sth-claude.git
claude plugin install sth-usage@sth --scope user

Start Claude Code in your project, then run /sth-usage. In an already open session, run /reload-plugins first. The user scope enables Buddy across your projects. The STH CLI is only needed for catalog, installation and update actions; usage tracking works without it.

To update:

claude plugin marketplace update sth
claude plugin update sth-usage@sth

Run /reload-plugins or restart Claude Code after updating. To uninstall, run claude plugin uninstall sth-usage@sth.

See the official mod installation guide and marketplace guide.

Load the mod

Claude Code 2.1.287 or later is required. From this directory:

claude --plugin-dir .

The module reloads on every save in a session that has loaded it. Desktop sessions without the plugin do not receive these features automatically.

Usage

The interface lives in the right panel. The home screen keeps Buddy, followed by a single navigation row: STH, Summary and More (Context, Diagnostics and Resume). The STH page manages installed skills and the catalog. More expands three navigation buttons. Other screens provide a single Home button. Navigation replaces the current panel instead of stacking another panel on top. The mod does not add a strip above the message field.

The Usage card shows each metric once: quotas and reset times, context, observed tokens, cost and agents. Pills follow the STH design system's neutral tokens: thin outlines, Inter labels and JetBrains Mono SVG values. Native controls keep the fonts and dimensions imposed by Claude; terminal buttons have neutral outlines. Red is reserved for errors.

Desktop pill details appear on hover. The countdown redraws every 30 seconds without requesting new usage data. “~” marks tokens accumulated since the mod loaded; earlier history may be missing. The panel preview source on main shows light, dark and narrow layouts with sample data; it is not a Claude session.

| Access | Function | | --- | --- | | More → Context or /sth-context | Context breakdown: system, tools, MCP, memory, messages and active agents. | | /sth-usage | Buddy, combined usage metrics and navigation to the other panels. | | Summary or /sth-activity | Files actually written, tool errors and observed tests. Buttons open the diff, prepare a verification draft and show the detailed summary. Recognized tests run only when explicitly requested in the panel. | | STH or /sth-skills | Installed skills, versions and updates; catalog recommendations based on project manifests. | | /sth-doctor | Stack, available binaries, test commands, STH configuration and observed MCP tool status. Diagnostics do not run tests. | | More → Resume or /sth-resume | Goal, files, checks and next step from the previous session. Inspect the summary before explicitly adding it to the draft; it is not sent automatically. |

Buddy distinguishes work in progress, pending permission, errors, completed turns and interruptions. A main turn lasting at least 60 seconds triggers a discreet notification in Claude.

Buddy tries to display the original image pixels when the terminal supports images: 384 × 384 for regular states and 720 × 720 for Fika. Source checkouts read the original PNGs; compact releases reconstruct their RGBA pixels from lossless compressed frame data. The encoding preserves the pixels, dimensions and frame sequence, and playback keeps its existing timing. An actual image rejection from the terminal enables a colored quadrant fallback generated from 96 × 96 poses. This remains a character-based drawing: its detail depends on the panel size and terminal font. Under tmux, the fallback is used directly. The panel adapts the animation to its size and suggests enlarging it when space is limited. Desktop keeps the existing HD images.

Context is estimated locally using Claude's summary mode. The mod does not call an additional model for tracking. Unknown metrics remain unavailable; cumulative billed tokens do not indicate how full the context window is.

Tests are marked as passed or failed only when an exit code has been observed. In versions where the Bash tool does not provide that code, the result remains unverified. The run button uses a recognized project command and displays its actual result. The native diff may include changes made before the current turn.

MCP status reflects exposed tools and observed calls. It does not prove that a server with no tools is connected. Skill versions are displayed when STH provides them. Updates skip pinned versions and protect local changes. The update report comes from a fresh STH status check; a failed verification remains visible as such.

The local summary is stored in .sth/buddy-session.json in the session directory. It contains an abbreviated goal, up to 40 paths and 12 check results, without a transcript or command output. Common secrets are masked and sensitive paths are excluded. Write errors appear in the panel.

Install STH

If the STH binary is missing, Buddy shows the installation guide before project setup.

macOS or Linux with Homebrew:

brew install skills-transfer-hub/sth/sth
sth version

Windows with Scoop:

scoop bucket add sth https://github.com/Skills-transfer-hub/scoop-sth
scoop install sth
sth version

Windows alternatives: winget install STH.STH or choco install sth.

Without a package manager, use the official releases, verify SHA256SUMS and add the binary to PATH. See the STH installation documentation.

Restart the terminal if needed, then use Check installation or /sth-doctor. Once STH is available, /sth-skills lets you connect a catalog to the project.

Validate the mod

claude plugin validate .
claude plugin test .

Tests cover terminal and desktop rendering, buttons and drafts, missing data, permissions, summaries and resume, plus the existing Buddy and Fika animations.

Publish a compact distribution

Use a checkout of the source on main; compact releases omit build tools and previews. Commit the source changes and version bump first. The builder needs Python 3.12, Pillow 12.3.0 and NumPy 2.3.5. From the mod's source directory:

sth_release_dir=$(mktemp -d)
sth_source_root=$(git rev-parse --show-toplevel)
sth_source_commit=$(git rev-parse HEAD)
python3 tools/build_directory_bundle.py --source . --output "$sth_release_dir/bundle" --include-tests
claude plugin validate "$sth_release_dir/bundle/sth-usage"
claude plugin test "$sth_release_dir/bundle/sth-usage"
python3 tools/stage_directory_release.py --source-root "$sth_source_root" --bundle "$sth_release_dir/bundle/sth-usage" --output "$sth_release_dir/tree" --source-commit "$sth_source_commit"
python3 tools/publish_directory_release.py --source-root "$sth_source_root" --tree "$sth_release_dir/tree" --publish

The publisher updates only codex/directory-release, which contains the compact plugin, marketplace, documentation and licensing notices. It refuses older versions and never force-pushes. Omitting --publish performs a dry run. Original artwork and development files remain on main.

Configure the Claude Directory source to follow codex/directory-release so future update checks see compact releases. Directory validation and review remain separate from GitHub publication. Marketplace users can install from https://github.com/Skills-transfer-hub/sth-claude.git#codex/directory-release; they enable automatic updates separately in /plugin → Marketplaces → sth.

Rebuild the preview

From the source checkout on main, with Node 22 or later and the STH design system available locally:

node tools/preview_usage_pills.mjs /path/to/design-system
python3 -m http.server 8768 --bind 127.0.0.1 --directory previews/usage-band

Open the local preview. STH, Summary and More open sample views in the same panel; Home returns to the usage overview and closes the previous view. The STH view has working Installed and Catalog tabs. Installation, removal, session actions and dashboard navigation are disabled in the preview.

The generator uses the mod's SVG renderer and copies the original Buddy image and design system styles without modifying their sources. The preview uses the design system's Google Fonts import, with its declared local fallbacks. The mod does not fetch these fonts at runtime.

関連作品