---
title: "branch-band"
url: "https://claudemods.dev/zh-tw/builds/branch-band-357a65"
source: "https://github.com/BeLazy167/claude-mods-skill/tree/main/examples/branch-band"
source_type: "github"
repo: "https://github.com/BeLazy167/claude-mods-skill/tree/main/examples/branch-band"
author: "BeLazy167"
author_handle: "BeLazy167"
stars: 9
category: "儀表板與 HUD"
categories: ["hud"]
tags: ["git-branch", "hooks", "process-run", "state", "statusline"]
permission_level: 2
scan_complete: true
install: "claude plugin marketplace add BeLazy167/claude-mods-skill\nclaude plugin install branch-band@claude-mods-skill"
added: "2026-10-12T04:02:11.567Z"
updated: "2026-10-06T05:05:14Z"
locale: "zh-tw"
content_locale: "zh-tw"
---

# branch-band

範例 Claude Code 外掛模組，在提示字元上方顯示當前 git 分支與工作樹狀態，透過 $.process.run 定時重新整理並保存在 $.state 中。

## Description

branch-band 是 claude-mods-skill 儲存庫中隨附的範例 Claude Code 外掛模組。它在提示字元上方顯示一個橫幅，包含當前 git 分支與工作樹狀態，使用 $.process.run 定時重新整理並儲存在 $.state 中。它從在 Claude Code 內載入的 TypeScript 函式掛鉤模組中執行 git branch --show-current 和 git status --porcelain（需要 2.1.287 或更新版本；已在 2.1.290 上測試）。該儲存庫提供透過 /plugin install claude-mods-skill --marketplace BeLazy167/claude-mods-skill 或 claude plugin marketplace add 加上 claude plugin install 進行安裝，並且可以使用 claude --plugin-dir examples/branch-band 在工作階段中試用該範例。每個範例都通過 claude plugin validate、claude plugin test 和 tsc，並且 scripts/check.sh 輔助指令碼會在 Claude Code 更新後重新驗證所有範例。

## Install

```
claude plugin marketplace add BeLazy167/claude-mods-skill
claude plugin install branch-band@claude-mods-skill
```

## Original README

# claude-mods-skill

A Claude Code skill that teaches an agent how to build **Claude Mods**:
plugins whose behaviour is a TypeScript function-hook module that runs
inside Claude Code. It ships five small example mods that the agent copies.
Each example passes `claude plugin validate`, `claude plugin test` and `tsc`.

Tested with Claude Code **2.1.290**. Mods need 2.1.287 or later and are on
by default. The old `CLAUDE_CODE_ENABLE_FUNCTION_HOOKS` flag is ignored;
remove it from your settings.

Claude Code also has a built-in `plugin-authoring` skill. That one knows
your exact build. This skill sits on top of it: tested examples, traps seen
on real builds, and how to prove and ship a mod.

## Install

At the Claude Code prompt:

```
/plugin install claude-mods-skill --marketplace BeLazy167/claude-mods-skill
```

Or from your shell:

```sh
claude plugin marketplace add BeLazy167/claude-mods-skill
claude plugin install claude-mods-skill@claude-mods-skill
```

Then ask Claude to build a mod. The `creating-mods` skill loads on its own.

## What is inside

- `skills/creating-mods/SKILL.md`: the workflow, which example to copy, quick reference, loader rules, sharing.
- `skills/creating-mods/references/gotchas.md`: version-tagged traps from real builds.
- `skills/creating-mods/references/examples.md`: Anthropic and community mods worth reading.
- `examples/`:

| Example | Shows |
|---|---|
| `hello-mod` | Block a tool call; fail-closed `.catch`; `smoke.sh` proves the deny |
| `redact-output` | Rewrite Bash output before the model reads it |
| `branch-band` | Git branch above the prompt; `$.process.run` on a timer; `$.state` |
| `notes-pane` | `/note` and `/notes`; a pane with a Button; `$.store` |
| `dice-tool` | A tool the model can call |

Try one for a session: `claude --plugin-dir examples/notes-pane`.

## Keeping it current

The mods API changes between releases. After a Claude Code update, run:

```sh
scripts/check.sh
```

It validates, tests and type-checks every example against your build.

## Links

- Docs: https://code.claude.com/docs/en/plugins/mods/overview
- Built-in mods source: https://github.com/anthropics/claude-code/tree/main/mods
- Design thread: https://github.com/anthropics/claude-code/issues/91870
- Community catalogue: https://github.com/karanb192/awesome-claude-code-mods
