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

sc-workspace

Claude Code 的工作区窗格:在一个分页窗格中统一管理 agent、工作树、检查点、笔记和变更

simplecore-inc@simplecore-inc

simplecore-inc/claude-mods/tree/main/mods/workspace

原帖图片1
已翻译

关于这个 mod

SimpleCORE Claude Mods

macOS: 已测试 Linux: 未测试 WSL: 已测试 Windows: 未测试 License: MIT

为 Claude Code 开发的插件,在终端中添加窗格、状态栏和斜线命令:在多个 Claude 账户间切换,监控它们的使用限额和令牌用量,查看并清理 Claude Code 在机器上保存的内容,以及在一个窗格中统一管理 agent、工作树、检查点、diff 和内存文件。只需安装一个插件 sc,就能获得全部功能。

功能介绍

Accounts · /sc:accounts

账户窗格

提示符上方的状态栏

  • 保存多个 Claude 登录信息,一步切换当前会话所用的账户。
  • 查看每个账户的五小时、每周和按模型的使用情况,包括重置时间,以及当 Claude 报告超额时的花费情况。
  • 使用情况:此机器上按天、模型和项目统计的令牌使用量,从 Claude Code 的对话记录中计算。
  • 存储:~/.claude 按类别和项目的占用空间,以及通过输入验证词清理闲置会话。
  • 提示符上方的状态栏:账户、模型和思考力度、任务、上下文和使用情况、分支和 PR、改动行数。按账户名打开账户窗格,或按分支或改动行数打开工作区。
  • 可选 webhook 将状态发送到外部系统。默认关闭;如无需要,请保持关闭状态。

Workspace · /sc:workspace

工作区窗格

  • Agents:会话中的子 agent、每个的最后操作记录和已完成的应答、以及仓库的工作树;停止 agent、打开工作树的变更、移除已合并的项。
  • Checkpoints:工作树在每次提示前的快照;与某个快照比较、查看某次转动的变更、命名并固定某个快照、或还原它。
  • Notes:按项目保存的编号笔记,可选择在每次提示时发送给 Claude;Claude 可标记某条已完成供你确认。
  • Diff:自会话开始或自某个检查点以来至当前或更晚检查点的变更文件;每个文件的 diff、还原单个文件、以及请求提交信息。
  • Memory:Claude Code 读取的内存文件,全局和按项目分开,以 Markdown 格式阅读并逐行搜索。

任何无法撤销的操作会先在对话框中询问;按 Esc 取消。

安装

claude plugin marketplace add simplecore-inc/claude-mods
claude plugin install sc@simplecore-mods

sc 会同时安装 sc-accounts 和 sc-workspace。插件为用户安装,因此在每个会话中都会运行。在已打开的会话中运行 /reload-plugins。

要使用本地克隆,可将其文件夹添加为市场:

git clone https://github.com/simplecore-inc/claude-mods.git
claude plugin marketplace add ./claude-mods
claude plugin install sc@simplecore-mods

更新

claude plugin marketplace update simplecore-mods
claude plugin update sc@simplecore-mods
claude plugin update sc-accounts@simplecore-mods
claude plugin update sc-workspace@simplecore-mods

然后在每个打开的会话中运行 /reload-plugins。对于本地克隆,在克隆中执行 git pull 和 /reload-plugins 即可:从文件夹市场获取的插件从该文件夹读取。

卸载

claude plugin uninstall sc@simplecore-mods
claude plugin prune
claude plugin marketplace remove simplecore-mods

prune 会移除 sc-accounts 和 sc-workspace,这两个是作为 sc 的依赖项安装的;如果你自己安装了它们,请按名称卸载。marketplace remove 仅在你不再从该市场安装时才需要。

这些 mod 会留下一些数据,你可以手动删除:

| 内容 | 位置 | | --- | --- | | 已保存的登录信息 | macOS:服务为 account-switch 的钥匙串项目。其他系统:~/.claude/account-switch/ | | Webhook 令牌 | macOS:服务为 sc-webhook 的钥匙串项目。其他系统:~/.claude/sc-accounts/webhook-token | | Webhook 模板 | ~/.claude/sc-accounts/ | | 设置、账户索引、笔记、检查点列表 | ~/.claude/plugins/store/sc-*.json | | 检查点 | 在每个仓库中:refs/sc/ 下的引用和文件 .git/sc-snapshot-*.index |

~/.claude 是设置 CLAUDE_CONFIG_DIR 时的值。要删除仓库的检查点:

git for-each-ref --format='%(refname)' refs/sc/ | xargs -n 1 git update-ref -d
rm -f "$(git rev-parse --git-dir)"/sc-snapshot-*.index

当前登录的账户会继续登录;只有已保存的副本会被清除。

语言

Mod 显示英文,当 Claude Code 的 language 设置为韩文时显示韩文;其他任何语言都会回退到英文。没有该设置时,按此顺序使用 LC_ALL、LC_MESSAGES 和 LANG。

开发

开发 mod 涵盖布局、引擎强制的规则、检查和发布方式。

许可证

MIT

安装

请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。

claude plugin marketplace add simplecore-inc/claude-mods
claude plugin install sc-workspace
原文 / README

SimpleCORE Claude Mods

macOS: tested Linux: untested WSL: tested Windows: untested License: MIT

Plugins for Claude Code that add panes, a status band and slash commands to the terminal: switch between several Claude accounts, watch their usage limits and token use, see and clean up what Claude Code keeps on the machine, and keep agents, worktrees, checkpoints, diffs and memory files in one pane. Install one plugin, sc, and you get them all.

What's inside

Accounts · /sc:accounts

The accounts pane

The status band above the prompt

  • Keep several Claude logins and switch every running session to another in one step.
  • See each account's five-hour, weekly and per-model usage, with reset times, and what it spent past its plan when Claude reports it.
  • Usage: the tokens used on this machine by day, model and project, counted from Claude Code's transcripts.
  • Storage: what ~/.claude holds by kind and project, and a cleanup of idle sessions confirmed by typing a word.
  • A status band above the prompt: account, model and effort, task, context and usage, branch and PR, lines changed. Press the account's name to open the accounts pane, or the branch or the lines changed to open the workspace.
  • An optional webhook sends the status to an external system. It is off by default; leave it off if you have nothing to send to.

Workspace · /sc:workspace

The workspace pane

  • Agents: the session's subagents, what each did last and the answers of those that finished, and the repository's worktrees; stop an agent, open a worktree's changes, remove a merged one.
  • Checkpoints: a snapshot of the working tree before every prompt; compare with one, see one turn's changes, name and pin one, or restore it.
  • Notes: numbered notes kept per project, optionally sent to Claude with every prompt; Claude can mark one done for you to confirm.
  • Diff: the files changed since the session started or since a checkpoint, up to now or a later checkpoint; each file's diff, restoring one file, and a request for a commit message.
  • Memory: the memory files Claude Code reads, global and project apart, to read as Markdown and search line by line.

Anything that cannot be taken back asks in a dialog first; Esc cancels.

Install

claude plugin marketplace add simplecore-inc/claude-mods
claude plugin install sc@simplecore-mods

sc installs sc-accounts and sc-workspace with it. The plugins are installed for your user, so they run in every session. Run /reload-plugins in a session that was already open.

To use a local clone instead, add its folder as the marketplace:

git clone https://github.com/simplecore-inc/claude-mods.git
claude plugin marketplace add ./claude-mods
claude plugin install sc@simplecore-mods

Update

claude plugin marketplace update simplecore-mods
claude plugin update sc@simplecore-mods
claude plugin update sc-accounts@simplecore-mods
claude plugin update sc-workspace@simplecore-mods

Then run /reload-plugins in each open session. With a local clone, git pull in the clone and /reload-plugins are enough: a plugin from a folder marketplace is read from that folder.

Uninstall

claude plugin uninstall sc@simplecore-mods
claude plugin prune
claude plugin marketplace remove simplecore-mods

prune removes sc-accounts and sc-workspace, which were installed as dependencies of sc; uninstall them by name instead if you installed them yourself. marketplace remove is only needed when you will not install from it again.

The mods leave some data behind, which you can delete by hand:

| What | Where | | --- | --- | | Saved logins | macOS: keychain items of the service account-switch. Elsewhere: ~/.claude/account-switch/ | | Webhook token | macOS: the keychain item of the service sc-webhook. Elsewhere: ~/.claude/sc-accounts/webhook-token | | Webhook template | ~/.claude/sc-accounts/ | | Settings, account index, notes, checkpoint lists | ~/.claude/plugins/store/sc-*.json | | Checkpoints | in each repository: the refs under refs/sc/ and the files .git/sc-snapshot-*.index |

~/.claude is CLAUDE_CONFIG_DIR when that is set. To delete a repository's checkpoints:

git for-each-ref --format='%(refname)' refs/sc/ | xargs -n 1 git update-ref -d
rm -f "$(git rev-parse --git-dir)"/sc-snapshot-*.index

The account you are logged in with stays logged in; only the saved copies go.

Language

The mods show English, and Korean where Claude Code's language setting is Korean; any other language falls back to English. Without that setting, LC_ALL, LC_MESSAGES and LANG decide, in that order.

Developing

Developing a mod covers the layout, the rules the engine enforces, the checks and how to release.

License

MIT

更多类似作品