ClaudeMods
☰
ZH-TW
● 0 人在線上 · 瀏覽 0 次
贊助提交作品
GitHub 儲存庫 · 發布者 justinjdev

shire-status

一個 Claude Code mod,透過狀態列顯示 shire 索引的新鮮度與警告,只在變更時顯示通知,並提供含重建按鈕的 /shire 面板。

justinjdev@justinjdev

justinjdev/shire/tree/main/contrib/claude-mod/shire-status

已翻譯

關於這個 mod

shire-status 是一個 Claude Code mod,會讀取 shire status --json,在 Claude Code 中顯示 shire 索引的健康狀態(不會自行重建或寫入)。

功能:

  • 狀態列:顯示 shire ● 412 pkgs · 38.2k syms · 4m ago;建置執行時使用 ⟳,出現警告(建置失敗、建置中斷、檔案走訪達到上限或不完整、等待重新檢查、索引建置後 HEAD 移動)時使用 ▲,索引遺失或無法讀取時使用 ✗。每 15 s 輪詢一次,編輯後 3 s 再輪詢。
  • 只在發生變更時顯示通知:符號或檔案數量變動、新的建置失敗、建置中斷、500k 檔案上限,或 watch daemon 停止。沒有任何變化的按需重建保持安靜。
  • /shire 開啟含詳細資訊與 Rebuild / Force rebuild 按鈕的面板;/shire rebuild [--force] 在提示中執行相同操作。watch daemon 正在執行並監聽時使用它重建,否則使用 shire build。

需求:PATH 中有帶有 status 子指令的 shire binary。

安裝:shire init --mod(將 mod 寫入 ~/.claude/shire-mod/shire-status/,並在 ~/.claude/settings.json 的 env.CLAUDE_CODE_PLUGIN_DIRS 中列出它),或在 checkout 中使用 claude --plugin-dir /path/to/shire/contrib/claude-mod/shire-status 執行。使用 claude plugin validate 與 claude plugin test 驗證及測試。

注意:mod API 處於早期存取階段,可能會隨 Claude Code 版本變動。

安裝

請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。

claude plugin marketplace add justinjdev/shire
claude plugin install shire-status
原文 / README

shire-status: a Claude Code mod

Shows shire's index health inside Claude Code. It reads shire status --json, which never rebuilds or writes.

  • Status line: shire ● 412 pkgs · 38.2k syms · 4m ago, with ⟳ while a build runs, ▲ for warnings (build failures, an interrupted build, a capped or partial file walk, pending re-checks, HEAD moved since the index was built) and ✗ when the index is missing or unreadable. Polled every 15 s and 3 s after any edit.
  • Toasts only when something changed: symbol/file counts moved, new build failures, an interrupted build, the 500k file cap, the watch daemon stopping. An on-demand rebuild (serve --root) that changed nothing stays quiet.
  • /shire opens a pane with the details and Rebuild / Force rebuild buttons. Rebuild goes through the watch daemon when it is running and listening, otherwise runs shire build. /shire rebuild [--force] does the same from the prompt.

Requirements

A shire on PATH that has the status subcommand.

The files here are compiled into the shire binary (src/claude_mod.rs), so changing one changes what shire init --mod installs.

Install

shire init --mod          # or answer yes to the prompt in `shire init`

This writes the mod, compiled into the shire binary so it always matches its shire status, to ~/.claude/shire-mod/shire-status/ and lists that folder in env.CLAUDE_CODE_PLUGIN_DIRS in ~/.claude/settings.json. shire install refreshes its files after an upgrade (without re-listing a folder you took out of the settings to switch it off), and shire uninstall removes it.

To run this folder straight from a checkout instead:

claude --plugin-dir /path/to/shire/contrib/claude-mod/shire-status

Develop

claude plugin validate contrib/claude-mod/shire-status
claude plugin test contrib/claude-mod/shire-status

Claude Code lays the API's type declarations into .claude-plugin/types/ when it loads the folder (git-ignored); after that tsc -p contrib/claude-mod/shire-status type-checks it. The mod API is early access and may change between Claude Code releases.

更多類似作品