liawzishen/claude-code-mods/tree/main/session-status
session-status
一個 Claude Code 外掛,加入顯示工作階段經過時間、提示次數和工具呼叫次數的狀態列。可透過 CLAUDE_CODE_PLUGIN_DIRS 或 claude --plugin-dir 旗標安裝。
關於這個 mod
session-status 是 claude-code-mods 集合中的一個 Claude Code 外掛,帶有經過驗證的 .claude-plugin/plugin.json,以及註冊 tool.call hook 的 hooks/register.tsx 模組。它會顯示包含工作階段時間、提示次數和工具呼叫次數的狀態列。將其資料夾列在 ~/.claude/settings.json 的 CLAUDE_CODE_PLUGIN_DIRS 環境變數項目中,即可在每個工作階段載入(要即時重新載入,還需設定 CLAUDE_CODE_PLUGIN_DIR_WATCH=1);也可以使用 claude --plugin-dir ./session-status 僅為單一工作階段載入。使用 claude plugin validate 和 claude plugin test 進行驗證和測試。
安裝
請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。
claude plugin marketplace add liawzishen/claude-code-mods claude plugin install session-status
原文 / README
claude-code-mods
Mods that change Claude Code's UI, in the terminal and the desktop app's Code tab. Each folder is one mod: a plugin of function hooks.
| Mod | What it does |
| --- | --- |
| git-diff-timeline | A Git Diff timeline above the prompt. Click one commit to see it or two to compare them, with their commit messages. A Branches tab compares two branches. A GitHub-style "Files changed" panel shows each file's diff. |
| session-status | A status line with the session's time, prompts and tool calls. |
Use them
To load mods in every session, list their folders in the env block of ~/.claude/settings.json. Separate the paths with ; on Windows and : elsewhere:
{
"env": {
"CLAUDE_CODE_PLUGIN_DIRS": "C:\\path\\to\\claude-code-mods\\git-diff-timeline;C:\\path\\to\\claude-code-mods\\session-status",
"CLAUDE_CODE_PLUGIN_DIR_WATCH": "1"
}
}
A session reads this when it starts. With CLAUDE_CODE_PLUGIN_DIR_WATCH=1, open sessions reload a mod when its files change.
To load a mod for one session only: claude --plugin-dir ./git-diff-timeline.
Make a new mod
my-mod/
.claude-plugin/plugin.json { "name": "my-mod", "version": "0.1.0", "description": "..." }
hooks/hooks.json { "modules": ["./register.tsx"] }
hooks/register.tsx export const register: Register = (on, options) => { ... }
See CLAUDE.md for the rules the engine holds mods to.
Check a mod
claude plugin test ./git-diff-timeline
claude plugin validate ./git-diff-timeline
