Guía de ClaudeNivel 5 · Cuando se te va de las manosLevel 5 · When it gets out of hand
Mods que avisanMods that warn you
Cambios en la interfaz de Claude Code que me frenan antes de gastar de más.Changes to Claude Code's interface that stop me before I overspend.
Escribir en un archivo “el tope es de 150 k” no alcanza. Lo escribí, lo leí y lo pasé de largo varias veces. Lo que funciona es que algo me lo diga en el momento, en la pantalla, cuando la sesión está llegando.
Claude Code permite hacer mods: cambios en su propia interfaz y comportamiento, como una banda sobre el cuadro de texto, un aviso, un comando propio o un gancho que se ejecuta antes de una acción. Hay una skill, plugin-authoring, que ayuda a armarlos. Yo la usé para convertir mis reglas de economía de tokens en avisos.
El primero: el aviso a 150 k
Empezó con una sola cosa: un aviso cuando la sesión llega a los 150 k de contexto, que es el tope que me puse. Después le pedí los ocho mods más útiles para mi forma de trabajar. Me propuso una lista, le dije “todo salvo el 8” y quedaron siete.
Los siete
- Medidor de sesión. Muestra los turnos (x de 80) y el contexto (x de 150 k), y avisa al 80 % y al 100 %.
- Aviso de Opus. Si llevo varias acciones mecánicas seguidas en Opus (editar en lote, correr scripts), me sugiere pasar a Sonnet.
- Guardia de lecturas. Bloquea leer enteros los PDF y los archivos de Office, y los archivos de más de 20 KB. Hay que usar Grep o leer un fragmento.
- Semáforo de SEO. No deja mergear un cambio del sitio si antes no corrió el chequeo de SEO y vista previa.
- Banda de proyecto. Muestra cuál es el proyecto activo, para no estar trabajando en la carpeta equivocada.
/traspaso. Arma el cierre de la sesión: actualiza el estado del proyecto y deja anotado qué sigue./strategos. Abre el panel de estado general de mis proyectos.
Lo que aprendí
- Proponer y elegir. Que Claude proponga una lista y yo tache fue más rápido que dictarle los mods uno por uno.
- Hot reload. Para que carguen hay que aceptar el aviso de recarga en caliente de la sesión (o abrir Claude Code con la carpeta del mod). Si no, uno cree que están andando y no.
- Las guardias fallan abiertas. Si el chequeo se rompe, dejan pasar. Está bien que sea así (una guardia que traba todo termina desactivada), pero quiere decir que pueden dejar de cuidarte sin avisar. El semáforo de SEO, por ejemplo, se pone verde si el script encuentra fallas pero termina sin error.
- Casi sin tests. De los siete, solo la guardia de lecturas tiene pruebas, y ninguno se probó todavía en una sesión real, que es donde se ve si un aviso ayuda o molesta. Lo anoto como pendiente, no como logro.
- Pedir aclaración. En otra sesión escribí “8 top mods” y Claude entendió “los 8 proyectos que sobreviven”. Desde entonces conviene que repita qué entendió antes de armar nada (dramatizo, pero poco).
Cuándo conviene
Un mod vale la pena cuando la regla ya existe, la violás seguido y no depende de criterio. Eso es lo que digo en todo el resto de la guía: lo que se repite y tiene reglas claras va en código, no en una instrucción que dependa de que te acuerdes. Si la regla pide juicio, un mod no la resuelve.
Los números que alimentan estos avisos salen de Medir el gasto, y el contexto de por qué elegí 80 turnos está en Hábitos. Si querés empezar, hacé solo el primero.
El prompt
Quiero un mod para Claude Code que me avise cuando una sesión llega a los 150 k de contexto. Usá la skill plugin-authoring. Antes de escribir nada, repetime qué entendiste. Después proponeme una lista de ocho mods más que apliquen mis reglas de economía de tokens (medidores, avisos, guardias de lectura, comandos de cierre) y dejame elegir cuáles. Las guardias deben fallar abiertas: si se rompen, que dejen pasar y avisen. Mostrame el código antes de instalarlo y no guardes nada sin mi aprobación.
Writing “the cap is 150k” in a file isn't enough. I wrote it, I read it and I walked right past it several times. What works is having something tell me at the moment, on screen, as the session is getting there.
Claude Code lets you make mods: changes to its own interface and behavior, like a band above the text box, an alert, a custom command or a hook that runs before an action. There's a skill, plugin-authoring, that helps you build them. I used it to turn my token-economy rules into alerts.
The first one: the 150k alert
It started with a single thing: a warning when the session reaches 150k of context, which is the cap I set for myself. Then I asked it for the eight most useful mods for the way I work. It proposed a list, I said “all except number 8” and that left seven.
The seven
- Session meter. Shows the turns (x of 80) and the context (x of 150k), and warns at 80% and 100%.
- Opus alert. If I've done several mechanical actions in a row in Opus (batch edits, running scripts), it suggests switching to Sonnet.
- Reading guard. Blocks reading whole PDFs and Office files, and files over 20 KB. You have to use Grep or read a fragment.
- SEO traffic light. Won't let me merge a site change unless the SEO and preview check ran first.
- Project band. Shows which project is active, so I'm not working in the wrong folder.
/traspaso. Builds the session closing: updates the project's status and writes down what's next./strategos. Opens the overall status panel for my projects.
What I learned
- Propose and choose. Having Claude propose a list and me crossing things out was faster than dictating the mods one by one.
- Hot reload. For them to load, you have to accept the session's hot reload prompt (or open Claude Code with the mod's folder). Otherwise you think they're running and they're not.
- Guards fail open. If the check breaks, they let things through. That's fine (a guard that blocks everything ends up disabled), but it means they can stop protecting you without telling you. The SEO traffic light, for example, turns green if the script finds failures but exits without an error.
- Almost no tests. Of the seven, only the reading guard has tests, and none has been tried yet in a real session, which is where you see whether an alert helps or annoys. I'm noting it as pending, not as an achievement.
- Ask for clarification. In another session I wrote “8 top mods” and Claude understood “the 8 projects that survive.” Since then it pays to have it repeat what it understood before building anything (I'm dramatizing, but only a little).
When it's worth it
A mod is worth it when the rule already exists, you break it often and it doesn't depend on judgment. That's what I say throughout the rest of the guide: what repeats and has clear rules goes in code, not in an instruction that depends on you remembering. If the rule calls for judgment, a mod won't solve it.
The numbers that feed these alerts come from Measuring spend, and the context for why I picked 80 turns is in Habits. If you want to start, just do the first one.
The prompt
I want a mod for Claude Code that warns me when a session reaches 150k of context. Use the plugin-authoring skill. Before writing anything, repeat back what you understood. Then propose a list of eight more mods that apply my token-economy rules (meters, alerts, reading guards, closing commands) and let me choose which ones. The guards must fail open: if they break, they let things through and warn. Show me the code before installing it and don't save anything without my approval.