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

cwd-status

一個 Claude Code Mod,在狀態列顯示工作階段正在工作的資料夾,包括 Bash 命令 cd 到的目錄,並將 home 縮短為 ~。

已翻譯

關於這個 mod

cwd-status 是一個小型 Claude Code 外掛,會在模式標籤旁的頁尾加入目前工作資料夾,顯示為 📁 <folder>,並將 home 目錄縮短為 ~。它會跟隨工作階段的工作資料夾,也會反映 Bash 命令中的 cd 或 pushd 目標(例如 cd ../other && make),直到下一個工具執行。它是 choas/claude-mods 市集的一部分,可用 /plugin marketplace add choas/claude-mods 安裝,再執行 /plugin install cwd-status@my-mods,然後 /reload-plugins。配套的 git-status Mod 會顯示分支、未提交項目和未推送提交;它獨立於 cwd-status 運作,使用 git status --porcelain=v2 --branch,並支援選用的 locks off 和 5 s 逾時。開發支援 claude plugin validate/test 和 claude --plugin-dir,專案採用 MIT 授權。

安裝

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

claude plugin marketplace add choas/claude-mods
claude plugin install cwd-status
原文 / README

my-mods

Small Claude Code mods that add live info to the footer, next to the mode labels.

| Mod | Shows | Example | | --- | --- | --- | | cwd-status | The folder Claude is working in, including where a Bash command cds to | 📁 ~/prj/app | | git-status | Branch, uncommitted files and unpushed commits of that folder's repo | ⎇ main ●3 ↑2 |

Together they read like 📁 ~/prj/app ⎇ main ●3 ↑2.

Install

In Claude Code, add this marketplace once:

/plugin marketplace add choas/claude-mods

Then install one or both mods:

/plugin install cwd-status@my-mods
/plugin install git-status@my-mods

Run /reload-plugins (or restart Claude Code) and the labels show up in the footer.

You can also browse and install them interactively with /plugin → Marketplaces → my-mods.

Update

/plugin marketplace update my-mods

Uninstall

/plugin uninstall cwd-status@my-mods
/plugin uninstall git-status@my-mods

cwd-status

Shows 📁 <folder> with your home folder shortened to ~.

  • Follows the session's working folder.
  • When a Bash command cds or pushdes somewhere (cd ../other && make), it shows that folder until the next tool runs.

git-status

Shows the git state of the current folder:

| Part | Meaning | | --- | --- | | ⎇ main | Current branch (short commit hash on a detached HEAD) | | ●3 | Uncommitted entries: modified, staged, renamed, conflicted and untracked | | ↑2 | Commits not pushed yet: ahead of the upstream, or, without an upstream, commits on no remote |

  • ● and ↑ only appear when non-zero; outside a git repo nothing is shown.
  • Refreshes when the session starts, on every prompt (so commits made in another terminal show up), after Bash/Edit/Write tool calls, and when the folder changes.
  • Follows cd inside Bash commands on its own, so it works without cwd-status.
  • Uses git status --porcelain=v2 --branch with optional locks off and a 5 s timeout, so it never blocks your repo.

Requires git on your PATH.

Development

Each mod is a plugin folder with a hooks module (hooks/register.ts), a state contract (types/index.d.ts) and tests:

claude plugin validate git-status
claude plugin test git-status

To try local changes, point Claude Code at the folder: claude --plugin-dir ./git-status.

License

MIT

更多類似作品