ctx-bytes-guard

by Fabio Borchardt · ★ 0 · updated 23 Oct 2026

ToastsPromptvalidates

0

Compacta sozinho ao fim do turno quando o payload da conversa passa de 16 MB, inclusive em sessões headless (-p / SDK). Com o synapse-rate-limit instalado, os limites aparecem na linha dos MB.

install ctx-bytes-guard

Install

/plugin marketplace add fabioivan/claude-code-mods
/plugin install ctx-bytes-guard@fabioivan-mods

Then run /reload-plugins or start a new session. Requires Claude Code 2.1.287+.

View source on GitHub

What it hooks into

From an automated scan with claude plugin validate, not a security review. Mods run with your permissions; read the code before installing.

Events
prompt.submitturn.complete
API calls
$.command.run$.session.compact$.session.messages$.session.usage$.state.get$.state.set$.ui.toast
Can see
every prompt
Reach
level 2 of 3 drives Claudereads the transcriptreads mod statedraws

Origin

How it got here
Automated scan of public GitHub repos, via the CC0 dataset awesome-claude-code-mods (scan of ).
Repository
github.com/fabioivan/claude-code-mods
Path in repo
ctx-bytes-guard
Source commit
b328d35 the exact code the scan read
Author
Fabio Borchardt @fabioivan
License
MIT
First published
Last pushed
First listed here

Name and description come from the mod's own manifest. We link to the code; we don't host it, and it stays under its author's license.

More from fabioivan/claude-code-mods

synapse-rate-limit

fabioivan/claude-code-mods

HUD completo (modelo, projeto, git, contexto, uso, ferramentas, agentes, todos, alertas, orçamento, histórico, resumo, painel de detalhes e temas) mais a linha do synapse: clima/previsão, % do contexto, tamanho em MB do contexto/anexos, tokens e gráfico dos últimos turnos.

★ 0PanesBandsReskins

Other mods in Toasts, close to this one by stars.