К основному содержанию
плагин

claude-telemetry — плагин для Claude Code: что делает и как установить

Выводит в терминале строку состояния с остатком контекста, расходами, таймером лимитов и статусом Git. Пригодится для контроля ресурсов прямо во время диалога.

Установить в Claude Code · Через маркетплейс плагинов Все способы и платформы ↓
/plugin marketplace add anthropics/claude-plugins-community
/plugin install claude-telemetry@claude-community
Открыть на GitHub

Что делает claude-telemetry

Плагин собирает метрики сессии в компактную многострочную панель внизу терминала. Отрисовку выполняет отдельный бинарный файл на Go. Поэтому обновление занимает меньше 10 мс и не тормозит консоль. Шкалы показывают оставшийся запас в стиле батарейки.

Есть три готовых пресета: на одну, две или три строки. Тип авторизации определяется автоматически. Пользователи OAuth видят таймер сброса лимитов, а владельцы API-ключей отслеживают расходы в долларах. Блок Git выводит ветку, отставание коммитов, незакоммиченные правки и воркдеревья.

Для PR-бейджей и шкалы рассуждений нужны версии Claude Code не ниже 2.1.145 и 2.1.141. Без запуска /claude-telemetry:setup бинарник не скачается. Эту команду запускают сразу после установки плагина для выбора оформления.

Какие задачи решает

  • контролировать оставшееся окно контекста до исчерпания лимита
  • следить за таймером сброса квот OAuth или балансом расходов по API
  • проверять статус ветки Git и незакоммиченные файлы без выхода в консоль
  • видеть текущий уровень рассуждений модели и номер открытого PR

Примеры запросов агенту

  • /claude-telemetry:setup
  • /claude-telemetry:config
  • Переключи статусную строку claude-telemetry на пресет compact

Как установить claude-telemetry

Через маркетплейс плагинов

/plugin marketplace add anthropics/claude-plugins-community
/plugin install claude-telemetry@claude-community

По шагам, с командами для каждой платформы: Плагины Claude Code: маркетплейсы, установка и как собрать свой

Вопросы о claude-telemetry

Как установить claude-telemetry в Claude Code?

Выполните в сессии команду /plugin marketplace add anthropics/claude-plugins-community, а затем /plugin install claude-telemetry@claude-community. После этого запустите /claude-telemetry:setup для загрузки бинарного файла.

Что делает claude-telemetry?

Плагин закрепляет внизу терминала статусную строку. Она обновляет данные об остатке контекста, расходах, времени сессии и статусе репозитория Git.

Зачем плагину нужен отдельный бинарный файл на Go?

Скомпилированный файл отрисовывает строку быстрее 10 мс без вызова внешних скриптов. Плагин сам скачивает нужную сборку под текущую систему и проверяет её хеш при запуске сессии.

Исходный текст

SKILL.md · MIT
# claude-telemetry

[![version](https://img.shields.io/github/v/release/jeongph/claude-telemetry?label=version&color=blue)](https://github.com/jeongph/claude-telemetry/releases)
[![license](https://img.shields.io/github/license/jeongph/claude-telemetry?color=lightgrey)](LICENSE)

Customizable multi-line status line for [Claude Code](https://claude.com/claude-code).

Displays session, context, usage, and Git information. Choose a preset or configure individual sections.

<p align="center">
  <img width="810" height="616" alt="image" src="https://github.com/user-attachments/assets/3eb1c1a5-a8b0-48ef-8f26-d6b691374a33" />
</p>

## Installation

### Via marketplace (recommended)

1. Add the [jeongph/claude-plugins](https://github.com/jeongph/claude-plugins) marketplace (one-time):

```
/plugin marketplace add jeongph/claude-plugins
```

2. Install:

```
/plugin install claude-telemetry@jeongph-claude-plugins
```

3. Run interactive setup:

```
/claude-telemetry:setup
```

This downloads the Go binary, configures your preset, and sets up the status line.

### Manual setup

1. Download the binary for your platform from [Releases](https://github.com/jeongph/claude-telemetry/releases/latest):

```bash
mkdir -p ~/.claude/statusline/bin
curl -fsSL "https://github.com/jeongph/claude-telemetry/releases/latest/download/claude-telemetry-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/')" \
  -o ~/.claude/statusline/bin/claude-telemetry
chmod +x ~/.claude/statusline/bin/claude-telemetry
```

2. (Optional) Copy the example config:

```bash
cp claude-telemetry/config.example.json ~/.claude/statusline/config.json
```

3. Add to `~/.claude/settings.json`:

```json
"statusLine": {
  "type": "command",
  "command": "bash /path/to/claude-telemetry/scripts/run.sh"
}
```

4. Restart Claude Code

## Features

- **Remaining % display** — all bars show remaining capacity (like a battery), not usage
- **Preset modes** — compact (1 line), normal (2 lines), detailed (3 lines)
- **Auto user detection** — OAuth users see rate limits, API key users see cost
- **Git integration** — folder:branch, ↑push/↓pull, changes (+/-), untracked (?N), stash (≡N), worktrees (⎇N)
- **Effort level** — live reasoning effort (low/medium/high/xhigh/max) shown beside the model name, reflects `/effort` changes (Claude Code ≥ 2.1.141)
- **PR badge** — open PR number and review state for the current branch, no `gh` CLI needed (Claude Code ≥ 2.1.145)
- **Session name** — session title shown as `[name]`, auto-truncated to 20 columns (off by default — Claude Code already shows the title in its UI; enable via `sections` or the detailed preset)
- **User identity** — logged-in email + plan (`Max`/`Pro`/`Team`) on a dedicated line, read from `~/.claude.json` (not in the status line JSON). Off by default for privacy — enable via `sections.user`
- **Rate limit countdown** — remaining time until reset with progress bar
- **Dynamic color thresholds** — green/yellow/red based on remaining %, customizable via config
- **Loading and error states** — loading (···), partial failure (—), error messages instead of silent blank
- **Progress bars** — ▰▱ visualization, color-coded green → yellow → red
- **Adaptive width** — auto-drops lower priority sections on narrow terminals
- **i18n** — English, Korean, Japanese, Chinese (auto-detected)
- **Auto binary sync** — a SessionStart hook keeps the binary matched to the plugin version (pinned download + sha256 verification)
- **Self-cleanup on uninstall** — if you uninstall the plugin, the status line removes its own settings entry and files within a minute (setup-managed installs only)
- **NO_COLOR support** — respects `NO_COLOR` environment variable
- **Go binary** — single binary, no runtime dependencies, sub-10ms rendering
- **v1 fallback** — existing jq-based users keep working until they upgrade

## Sections

| Line | Section | Description |
|------|---------|-------------|
| 1 | Session | `[name]` session title (max 20 cols, detailed preset or opt-in) |
| 1 | Model | Model name with effort level beside it (`Fable 5 · xhigh`), color-coded low→max (toggle via `effort` key) |
| 1 | Elapsed | Session duration (Nh Nm format) |
| 1 | Git | folder:branch ↑push ↓pull +add/-del ?untracked ≡stash ⎇worktrees |
| 1 | PR | Open PR number + review state ✓/●/✗/◌ (shown only when a PR is open) |
| 2 | Context | ◆ Remaining context window % with progress bar |
| 2 | Remaining | ◆ 5h / 7d remaining % with reset countdown (OAuth, auto-detected) |
| 2 | Cost | Session cost in USD (API key, auto-detected) |
| 2 | Lines | Session lines added/removed |
| 2 | API Duration | Time spent waiting for API responses |
| 2 | Tokens | Tokens currently in the context window (in/out) |
| 3 | Agent | Active agent name (shown only when active) |
| 3 | Vim | Vim mode indicator (shown only when active) |
| 3 | Thinking | ✦ extended thinking indicator (shown only when enabled) |
| 4 | User | ◉ logged-in email + plan on a dedicated line (off by default, opt-in) |

Line 3 appears only when agent, vim mode, or thinking indicator is active. Line 4 appears only when the `user` section is enabled.

> **Note:** Since Claude Code 2.1.132, token counts reflect what is currently in the context window, not cumulative session totals.

### Git status symbols

The Git section renders as `folder:branch` followed by status markers. Each marker appears **only when its count is non-zero**, so a clean repo shows just `folder:branch`.

| Symbol | Meaning | Color |
|--------|---------|-------|
| `folder:branch` | Current directory and current branch | white `:` magenta |
| `↑N` | N commits ahead of upstream (waiting to push) | yellow |
| `↓N` | N commits behind upstream (waiting to pull) | cyan |
| `+N/-N` | Lines added / deleted vs. HEAD (staged + unstaged) | green / red |
| `?N` | N untracked files | yellow |
| `≡N` | N stash entries | magenta |
| `⎇N` | N linked worktrees (excludes the main worktree) | cyan |

> Example: `myrepo:main ↑1 +12/-3 ?2 ⎇1` means branch `main` is 1 commit ahead of upstream, has 12 added / 3 deleted lines, 2 untracked files, and 1 linked worktree.

## Setup

Run `/claude-telemetry:setup` in Claude Code for interactive configuration — it detects your language, downloads the binary, and walks you through preset selection.

To adjust the display later — preset, which sections show, and how detailed the bars are — run `/claude-telemetry:config` (an interactive wizard, no JSON editing needed).

Or edit `~/.claude/statusline/config.json` directly:

```json
{
  "preset": "normal",
  "language": "en",
  "colors": true,
  "bar_width": 5,
  "separator": " │ ",
  "user_type": "auto",
  "sections": {},
  "thresholds": {
    "context_warn": 50,
    "context_danger": 20,
    "cost_warn": 1.0,
    "cost_danger": 5.0
  }
}
```

### Presets

| Preset | Lines | Sections |
|--------|-------|----------|
| `compact` | 1 | Model · Effort, Context, Remaining/Cost |
| `normal` | 2 | Model · Effort, Elapsed, Git, PR, Context, Remaining/Cost, Agent, Vim |
| `detailed` | 3 | All sections enabled |

### Bar width

`bar_width` controls the progress bars on Context and Remaining:

| Value | Rendering |
|-------|-----------|
| `0` | `◆ Context 54%` — numbers only, no bar |
| `5` | `◆ Context ▰▰▰▱▱ 54%` — default |
| `10` | `◆ Context ▰▰▰▰▰▱▱▱▱▱ 54%` — most detailed |

Allowed range is `0` or `3`–`10` (`1`–`2` are widened to `3`).

### Section overrides

Use `sections` to override preset defaults:

```json
{
  "preset": "normal",
  "sections": {
    "tokens": true,
    "lines": true
  }
}
```

### User section (email + plan)

The `user` section shows your logged-in email and plan on a dedicated line (e.g. `◉ [email protected] · Max`). It is **off by default** — enable it explicitly:

```json
{
  "sections": {
    "user": true
  }
}
```

- **Source:** this info is not part of the status line JSON. It is read from `~/.claude.json` (`oauthAccount`), an internal Claude Code file, and parsed defensively — if the file or fields are missing, the section is silently skipped.
- **Privacy:** the status line is visible in screenshots and screen shares. Keep it off unless you want your email on screen at all times.
- **Plan labels:** `claude_max` → `Max`, `claude_pro` → `Pro`, `claude_team` → `Team`, `claude_enterprise` → `Enterprise`. Unknown plans are omitted (email only).

### Thresholds

Color changes at these remaining percentages (customizable):

| Remaining | Color |
|-----------|-------|
| > 50% | Green |
| 21–50% | Yellow |
| ≤ 20% | Red |

### Project-level config

Create `.claude-statusline.json` in your project root to override global settings per project:

```json
{
  "preset": "detailed"
}
```

## Removal

```
/claude-telemetry:remove
```

If you uninstall the plugin without running remove first, the status line detects the missing plugin and cleans itself up automatically within about a minute (settings entry removed from the next session). This applies to installs managed by `/claude-telemetry:setup`; manual installs are never touched.

## Upgrading

- **Plugin users (v2.4.0+):** update the plugin (`/plugin` → Update), then restart Claude Code. The SessionStart hook syncs the binary to the plugin version automatically.
- **Plugin users (older):** run `/claude-telemetry:setup` once after updating the plugin — it downloads the matching binary and migrates your settings to the version-independent launcher path.
- **Manual installs:** re-run the curl command from Manual setup; replace the binary to complete the update.

## Upgrading from v1

v2 is backward-compatible. Existing v1 config files work as-is. Run `/claude-telemetry:setup` to download the Go binary — your existing settings are preserved.

If you don't run setup, the v1 jq-based rendering continues to work via the built-in fallback.

## Requirements

- Claude Code
- `git` (optional, for branch/changes display)
- Claude Code ≥ 2.1.141 for Effort, ≥ 2.1.145 for PR badge (older versions simply hide these sections)

## License

MIT

© jeongph · MIT · jeongph/claude-telemetry

Похожие плагины

Все плагины по теме «Настройка агента: память, контекст, субагенты» →
ponytail DietrichGebert Плагин настраивает агента на короткие решения без лишних абстракций. Сгодится, когда нужно использовать возможности уже имеющегося кода и не усложнять задачу. ★ 177 259звёзд репо impeccable pbakaus Даёт агенту словарь дизайнера: 24 команды вроде polish, audit и bolder, чтобы правки интерфейса не сводились к «сделай красиво». ★ 89 321звёзд репо last-30-days-skill mvanhorn Собирает свежие посты, комментарии и транскрипты по любой теме за последний месяц и укладывает их в один отчёт. ★ 65 596звёзд репо claude-hud jarrodwatts Показывает под строкой ввода, сколько контекста занято, какие инструменты работают и как идут задачи. Пригодится, когда сессия длинная и надо видеть расход. ★ 28 914звёзд репо understand-anything Egonex-AI Плагин сканирует проект и строит интерактивный граф файлов, классов и зависимостей с веб-дашбордом. Пригодится при знакомстве с чужим или крупным кодом. ★ 88 429звёзд репо mem0 mem0ai Подключает долговременную память к Claude Code, сохраняя контекст проектов и привычки между сессиями. ★ 67 869звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой