К основному содержанию
скилл Claude Code CX Codex Cursor GitHub Copilot

context-budget — скилл для Claude Code: что делает и как установить

Показывает, какую команду открыть для проверки текущего контекста в Codex или Claude Code, а по явному запросу проверяет установленную конфигурацию.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add affaan-m/ECC --skill context-budget -a claude-code
Открыть на GitHub

Что делает context-budget

context-budget направляет запросы о текущем окне, остатке контекста и расходе токенов к встроенному счётчику платформы. В Codex это /status, в Claude Code — /context; расширенный просмотр в Claude Code открывается через /context all. Скилл не читает файлы и не запускает инструменты для обычной проверки.

Аудит установки включается только по явному запросу вроде --audit или «проверь установленные компоненты». Он читает названный корень установки и конфигурацию выбранной среды, считает метаданные компонентов, ограничивает инвентаризацию и отделяет оценку статической нагрузки от живого контекста. Для диагностики JSONL-файла путь нужно выбрать явно.

Скилл поддерживает Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI и OpenCode. Ставьте его, если нужно различать показания нативного счётчика и оценку конфигурации; для простого проекта без таких проверок он лишний.

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

  • проверить остаток контекста текущей сессии
  • понять расход токенов в Codex или Claude Code
  • оценить нагрузку от установленных компонентов
  • разобрать выбранный JSONL-файл по типам записей

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

  • Покажи, сколько контекста осталось в этой сессии.
  • Проверь установленные компоненты с `--audit` для Claude Code.
  • Проанализируй выбранный файл `/path/to/selected-session.jsonl`.

Как установить context-budget

1Через Skills CLI (Vercel)

npx skills add affaan-m/ECC --skill context-budget -a claude-code

2Вручную: положить файлы

~/.claude/skills/context-budget/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/context-budget/

Из того же набора146

Весь набор →
video-editing affaan-m Скилл выстраивает пайплайн монтажа реального видео через ИИ. Помогает нарезать сырые записи через FFmpeg, собрать титры в Remotion и добавить озвучку в ElevenLabs. Claude Code CX Codex Cursor +1 6 500установок docker-patterns affaan-m Скилл с проверенными шаблонами Dockerfile и Docker Compose: локальная разработка, сети, тома, безопасность контейнеров. Claude Code CX Codex Cursor +1 6 300установок frontend-patterns affaan-m Скилл подсказывает паттерны для React и Next.js: компоненты, состояние, загрузка данных и производительность. Нужен при разработке и ревью интерфейса. Claude Code CX Codex Cursor +1 5 900установок backend-patterns affaan-m Скилл с паттернами бэкенда для Node.js, Express и Next.js API routes: слои, кэш, транзакции, обработка ошибок. Claude Code CX Codex Cursor +1 5 900установок coding-standards affaan-m Базовые правила кода для проектов: проверяет именование, запрещает мутации объектов и следит за простыми конструкциями. Пригодится на ревью и рефакторинге. Claude Code CX Codex Cursor +1 5 600установок api-design affaan-m Скилл задаёт правила проектирования REST API: именование эндпоинтов, выбор статус-кодов, пагинацию и формат ошибок. Помогает при создании и ревью серверных контрактов. Claude Code CX Codex Cursor +1 5 500установок rust-testing affaan-m Скилл для написания тестов на Rust: юнит-тесты, интеграционные, async, property-based, моки и покрытие. Пригодится, когда ведёшь проект по TDD. Claude Code CX Codex Cursor +1 5 500установок laravel-security affaan-m Скилл помогает проверять безопасность Laravel-приложений: аутентификацию, Eloquent, CSRF, XSS, API и настройки production. Пригодится для ревью и деплоя. Claude Code CX Codex Cursor +1 5 400установок

Похожие

remember rohitg00 Сохраняет решения и выводы в долговременную память agentmemory с тегами понятий, чтобы агент мог найти их в будущих сессиях. Claude Code CX Codex Cursor +1 14 000установок session-history rohitg00 Показывает историю недавних сессий проекта в виде временной шкалы. Нужен, чтобы быстро восстановить прошлую работу. Claude Code CX Codex Cursor +1 13 800установок command-development официальный Anthropic Скилл помогает проектировать слэш-команды Claude Code: задавать аргументы, настраивать YAML-фронтматтер и ссылаться на файлы. Пригодится для повторяемых командных сценариев. Claude Code 6 962установок plugin-settings официальный Anthropic Скилл описывает, как хранить настройки плагина в файле .claude/plugin-name.local.md и читать их из хуков, команд и агентов. Claude Code 6 827установок handoff rohitg00 Возобновляет последнюю сессию агента для текущей папки и сразу показывает незакрытый вопрос. Claude Code CX Codex Cursor +1 13 400установок find-skills vercel-labs Ищет и устанавливает готовые скиллы для ИИ-агентов через каталог skills.sh. Пригодится, когда для рабочей задачи нужен специализированный воркфлоу. Claude Code CX Codex Cursor +1 4 000 000установок grill-me Matt Pocock Скилл проводит жёсткое интервью по плану или дизайну, чтобы найти пробелы и уточнить решения. Подойдёт перед началом разработки. Claude Code 1 424 476установок grill-with-docs Matt Pocock Скилл проводит жёсткое интервью по плану или дизайну и по ходу создаёт ADR и глоссарий. Подойдёт перед началом сложной разработки. Claude Code 1 219 756установок

Вопросы о context-budget

Как установить context-budget в Claude Code?

Выполните npx skills add affaan-m/ECC --skill context-budget -a claude-code. Файл скилла появится по пути ~/.claude/skills/context-budget/SKILL.md.

Что делает context-budget?

Скилл направляет живые проверки контекста к /status в Codex и /context в Claude Code. Оценку установленной конфигурации он запускает только после явного запроса аудита.

Можно ли с его помощью проверить текущий контекст в Cursor или Gemini CLI?

Скилл устанавливается в Cursor и Gemini CLI, но живой счётчик описан для Codex и Claude Code. Для остальных сред он просит указать активную оболочку, если подтверждённой команды нет.

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

SKILL.md · MIT
---
name: context-budget
description: Routes live context checks to the native Codex or Claude Code meter without scanning files, and performs a bounded static component audit only when explicitly requested. Use for context-budget requests about remaining capacity or installed context overhead.
metadata:
  origin: ECC
---

# Context Budget

Use the provider's native meter for live session usage. Keep the separate,
estimated installation audit behind an explicit opt-in.

## Default: Live Context

Treat an invocation with no audit request as a live-context request. This
includes requests for the current window, remaining capacity, headroom, token
usage, or a context breakdown.

For this default path:

- Do not call or use tools.
- Do not scan or read files.
- Do not run shell commands, provider CLIs, debug logging, or MCP discovery.
- Reply with only the native command and one short explanation.

Route by the active harness:

| Harness | Native command | Guidance |
| --- | --- | --- |
| Codex CLI | `/status` | Shows current token usage and remaining context capacity. Use `/statusline` and enable **Context stats** plus **Token counters** for a persistent footer meter. |
| Codex app | `/status` | Shows current thread context usage and rate limits. |
| Claude Code | `/context` | Shows the live context breakdown. Use `/context all` for expanded items. |
| Other or unknown | None verified | State that ECC cannot read live provider state and ask which harness is active. |

These commands are documented in the [Codex command reference](https://developers.openai.com/codex/cli/slash-commands) and [Claude Code command reference](https://code.claude.com/docs/en/commands).

A skill cannot invoke a TUI slash command on the user's behalf. Never replace
the native command with an estimated scan and never infer an audit request from
phrases such as “context is heavy” or “how much is left.”

## Explicit Static Audit

Run an installation/configuration audit only when the user explicitly says
`--audit`, “audit installed components,” or equivalent unambiguous wording.
`--verbose` changes report detail; it does not opt into an audit by itself.

If the audit scope is ambiguous, ask for the harness and installation root
before reading anything. Keep every audit bounded and read-only:

1. Inspect only the named plugin/install root and the named harness's known
   configuration files.
2. Never recursively enumerate the workspace root, home directory, provider
   cache, transcripts, debug logs, or unrelated worktrees.
3. Never launch a provider CLI, MCP server, or debug session to count tools.
4. Cap inventory output at 50 entries per component class. Summarize the rest.
5. Do not write temporary logs or copy configuration content into the report.

Audit only the component metadata relevant to eager discovery:

- agent and skill descriptions;
- command descriptions when the harness discovers them eagerly;
- always-loaded instruction files in the explicitly named scope;
- configured MCP tool schemas when an existing bounded manifest exposes them.

Full skill, agent, command, and rule bodies are generally on-demand content.
Report their disk size separately from estimated eager overhead instead of
adding every body to the session baseline.

## Audit Output

Return a compact report containing:

- harness and exact paths inspected;
- estimated eager/discovery overhead by component class;
- installed counts and the heaviest metadata entries;
- assumptions, unavailable measurements, and up to three optimizations.

Every calculated token number is an estimate of static configuration overhead,
not live session context. Do not claim that an estimate is provider-reported,
current, exact, or evidence of realized savings. Direct the user back to the
native live-context command for current usage.

## Optional Selected-Record Diagnostic

Inspect a persisted record only when the user explicitly selects that file for this diagnostic. This is separate from the default live-context request and the installation audit.

For a local file diagnostic, explicitly select a stable, regular JSONL file or a snapshot you
intend to inspect. Replace the example path below; this does not find or reconnect a session.
The snippet prints aggregate byte counts only. It reads one line at a time, so memory use depends
on the largest record; avoid very large records and actively growing files.

```sh
python3 - "/path/to/selected-session.jsonl" <<'EOF'
import json
import sys

total = attachment = other = unclassified = 0
try:
    with open(sys.argv[1], "rb") as source:
        for raw in source:
            size = len(raw)
            total += size
            try:
                record = json.loads(raw.decode("utf-8"))
            except (UnicodeDecodeError, json.JSONDecodeError):
                unclassified += size
                continue
            record_type = record.get("type") if isinstance(record, dict) else None
            if not isinstance(record_type, str):
                unclassified += size
            elif record_type == "attachment":
                attachment += size
            else:
                other += size
except OSError:
    print("Cannot read selected JSONL file.", file=sys.stderr)
    raise SystemExit(1)

pct = attachment * 100.0 / total if total else 0.0
print(f"persisted {total}B | attachment records {attachment}B ({pct:.1f}%) | "
      f"other records {other}B | unclassified {unclassified}B")
EOF
```

The three categories add up to the original file bytes, including line endings and blank lines.
`attachment` is an exact record-type filter, not a guarantee about a harness's current internal
schema. Other records have a different string `type`; malformed JSON, invalid UTF-8, nonobject
values, missing or non-string types, and blank lines are unclassified. Neither category means
"conversation," and the percentage is only a share of persisted bytes.

These counts do not establish active context, remaining room, token usage, billing, or what a
reconnect loads. For current harness-reported context and usage, use the version-appropriate
[`/context` and `/usage` commands (`/cost` is an alias)](https://code.claude.com/docs/en/commands).

© affaan-m · MIT · affaan-m/ECC

Смотрите также

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

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