simplecore-inc/claude-mods/tree/main/mods/workspace
關於這個 mod
SimpleCORE Claude Mods
為 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 涵蓋版面配置、引擎強制的規則、檢查和發布方式。
授權條款
安裝
請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。
claude plugin marketplace add simplecore-inc/claude-mods claude plugin install sc-workspace
原文 / README
SimpleCORE Claude Mods
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
- 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
~/.claudeholds 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
- 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.
