---
title: "context-bar"
url: "https://claudemods.dev/zh-cn/builds/context-bar-2503f5"
source: "https://github.com/ziedgithub/claude-code-mods/tree/main/context-bar"
source_type: "github"
repo: "https://github.com/ziedgithub/claude-code-mods/tree/main/context-bar"
author: "ziedgithub"
author_handle: "ziedgithub"
stars: 0
category: "仪表盘与 HUD"
categories: ["hud"]
tags: ["cache", "claude-code", "context-window", "footer", "hud", "plugin", "statusline"]
permission_level: 2
scan_complete: true
install: "claude plugin marketplace add ziedgithub/claude-code-mods\nclaude plugin install context-bar@zied-mods"
added: "2026-10-05T01:48:28.099Z"
updated: "2026-11-19T00:25:59Z"
locale: "zh-cn"
content_locale: "zh-cn"
---

# context-bar

Claude Code 的页脚。在提示符下方提示行右侧的槽位中显示以下内容：

## Description

# context-bar

Claude Code 的页脚。在提示符下方提示行右侧的槽位中显示以下内容：

![context-bar, a rendered preview](../docs/context-bar.png)

- **Cache**：缓存提供了上一条提示的多少内容，以及大约还有多久过期：`99% ~58m`；过期或压缩后会变成 `cold`。
  - 系统会根据请求本身判断你的账号缓存 5 分钟还是 1 小时，并在会话之间记住。
- **Model and effort**：`◆ Opus 5.5 (1M)  ▆ high`，按照模型系列和 effort 级别着色。点击任一项会显示一行选项，可选择其他项；这会替你运行 `/model` 或 `/effort`。
- **Context**：用进度条显示上下文窗口有多满，30% 以下为绿色，60% 以下为橙色，超过后为红色。
  - 压缩或 `/clear` 后，以及新会话中，Claude Code 要等下一次响应才有测量值。期间进度条显示 Claude Code 自己的本地估算值（`/context` 生成的值），并用 `~` 标记。
- **Compact `⇊` and clear `⌫`**：单击后会先询问 `clear context? yes no`。问题会在 5 秒后自行消失，因此误点不会产生作用。

在较窄的终端中标签会缩短；如果一行放不下所有内容，各区块会堆叠。

其他模组放在同一槽位的内容，例如 [warm-compact](../warm-compact/) 的开关选项，会与引擎自身的模式标签一起放在这一行的最右端。

## Install

```sh
claude plugin marketplace add ziedgithub/claude-code-mods && claude plugin install context-bar@zied-mods
```

然后重新启动 Claude Code。

请参阅[repository README](../README.md)，了解如何从克隆目录运行。

## Install

```
claude plugin marketplace add ziedgithub/claude-code-mods
claude plugin install context-bar@zied-mods
```

## Original README

# context-bar

A footer for Claude Code. In the slot right of the hint line under the prompt, it shows:

![context-bar, a rendered preview](../docs/context-bar.png)

- **Cache**: how much of the last prompt the cache served, and roughly how long until it expires: `99% ~58m`, then `cold` once it has lapsed or after a compaction.
  - Whether your account caches for 5 minutes or an hour is worked out from the requests themselves, and remembered between sessions.
- **Model and effort**: `◆ Opus 5.5 (1M)  ▆ high`, colored by model family and by effort level. Click either one to get a row of chips and pick another. This runs `/model` or `/effort` for you.
- **Context**: how full the context window is, in a bar that is green under 30%, orange under 60% and red after that.
  - After a compaction or a `/clear`, and in a fresh session, Claude Code has no measured figure until the next response. Meanwhile the bar shows Claude Code's own local estimate (the one `/context` makes), marked with `~`.
- **Compact `⇊` and clear `⌫`**: one click asks first (`clear context? yes no`). The question goes away by itself after five seconds, so a stray click does nothing.

On a narrow terminal the labels shorten, and when one row can't hold everything the blocks stack.

What other mods put in the same slot, such as [warm-compact](../warm-compact/)'s on/off chip, goes at the right end of the row, along with the engine's own mode labels.

## Install

```sh
claude plugin marketplace add ziedgithub/claude-code-mods && claude plugin install context-bar@zied-mods
```

Then restart Claude Code.

See the [repository README](../README.md) for running it from a clone.
