Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/gonzalezpazmonica/saviaWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/gonzalezpazmonica/savia/cache-invalidate)<a href="https://agentmods.dev/commands/gonzalezpazmonica/savia/cache-invalidate"><img src="https://agentmods.dev/badge/commands/gonzalezpazmonica/savia/cache-invalidate.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00016 | $0.00748 |
| Opus 5 | $0.00008 | $0.00374 |
| Sonnet 5 | $0.00003 | $0.00150 |
| Haiku 4.5 | $0.00002 | $0.00075 |
Grade A, and why
cache-invalidate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
1 near-identical copy found in the catalogue:
- cache-invalidate — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/cache-invalidate
🦉 Savia invalida solo la capa que cambió — fino, no brusco.
Cargar perfil de usuario
Grupo: Context Engineering — cargar:
workflow.md— para validar impacto de invalidación
Ver docs/rules/domain/context-map.md.
Parámetros
--layer tools|system|rag|conversation Capa a invalidar (por defecto: todas)
--selective Invalidación granular vs. full flush
--lang es|en Idioma del output
Flujo
Paso 1 — Verificar caché actual
- Leer estado del caché:
$HOME/.pm-workspace/cache-state.json - Mostrar: tamaño total, por capa, timestamp creación, edad fragmentos
Paso 2 — Detectar cambios (para --selective)
Si --selective: detectar qué cambió en .git/index:
- Tools: cambios
docs/rules/→ invalidar TOOLS - System: cambios CLAUDE.md → invalidar SYSTEM
- RAG: cambios
docs/→ invalidar RAG - Conversation: comandos ejecutados → invalidar CONVERSATION
Paso 3 — Proponer invalidación
Sin --layer (auto):
🔄 Invalidación Automática
Layers afectadas:
├─ ✅ TOOLS (cambios reglas) → Invalidar
├─ ✅ SYSTEM (cambios CLAUDE.md) → Invalidar
├─ ✅ RAG (cambios docs) → Invalidar
└─ ⏸️ CONVERSATION (en sesión) → Mantener
¿Proceder? (y/n)
Paso 4 — Crear backup pre-invalidación
- Guardar snapshot:
$HOME/.pm-workspace/cache-backups/cache-{timestamp}.json.bak - Registrar qué se invalidó
- Mostrar ruta del backup
Paso 5 — Ejecutar invalidación
Granular (--selective):
- Marcar fragmentos como "stale" en
cache-state.json - No borrar — dejar que expiren según TTL
- Cuando se acceda → recargar
Full flush (sin --selective):
- Borrar layer completa
- Próximo comando → recarga completa
Mostrar:
✅ Invalidación Completada
Layer TOOLS: 45 ficheros invalidados
Layer SYSTEM: 1 fichero invalidado
Layer RAG: 12 ficheros invalidados
Impacto: próximos comandos +3s latencia
Paso 6 — Registrar rollback
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 122 lines · 16 tokens per session scan A e5a4938f174c
cache-invalidate is a command published in the GitHub repository gonzalezpazmonica/savia (50 stars, last pushed yesterday), licensed MIT. It adds 16 tokens to every session and 748 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-06.
Other commands, from other repositories
handoff
Emit a handoff artifact for this session (optionally specify a slug).
resume-from
Boot this session from a handoff artifact (slug, latest, or path).
context
A project-context command that manages a .context directory containing decision notes, session logs, and history. It helps keep a record of why changes were made across Git branches and commits.
remove-deadcode
Remove unused code from this project with ultrawork mode, LSP-verified safety, atomic commits.
get-unpublished-changes
Compare HEAD with the latest published npm versions and list all unpublished changes by release layer.
bm
Ask basemind anything about the current codebase — outlines, refs, callers, git history, blame, diffs, docs, memory.