ClaudeMods
☰
ZH-CN
● 0 人在线 · 浏览 0 次
赞助提交作品
GitHub 仓库 · 发布者 liawzishen

session-status

一个 Claude Code 插件外挂,添加显示工作阶段经过时间、提示次数和工具调用次数的状态列。可通过 CLAUDE_CODE_PLUGIN_DIRS 或 claude --plugin-dir 标志安装。

liawzishen@liawzishen

liawzishen/claude-code-mods/tree/main/session-status

已翻译

关于这个 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

更多类似作品