choas/claude-mods/tree/main/cwd-status
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 orpushdes 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
cdinside Bash commands on its own, so it works without cwd-status. - Uses
git status --porcelain=v2 --branchwith 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
