context-defer

context-defer is a command for Claude Code from gonzalezpazmonica/savia. It costs 25 tokens per session (953 once invoked), scanned A, a copy of context-defer, MIT.

A lazy-loading manager for project commands and rules: it loads them only when needed instead of all at once.

In plain words
What is it for?
Use it to scan a context map, identify candidates for delayed loading, apply the changes, or check which items are delayed.
Why use it?
It reduces the input overhead caused by instructions that are loaded even when the current task does not use them.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: agent in frontmatter.

Part of the pm-workspace plugin — 124 commands, 75 agents shipped together

Good fit Use it to scan a context map, identify candidates for delayed loading, apply the changes, or check which items are delayed.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/gonzalezpazmonica/savia/context-defer
Install

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.

Clone the repo
git clone --depth 1 https://github.com/gonzalezpazmonica/savia

Made for: Claude Code.

Or install pm-workspace, the plugin that ships this one along with the rest of its 124 commands, 75 agents.

Wrote 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.

agentmods badge for context-defer

README.md
[![agentmods](https://agentmods.dev/badge/commands/gonzalezpazmonica/savia/context-defer/github.svg)](https://agentmods.dev/commands/gonzalezpazmonica/savia/context-defer)
Your own site
<a href="https://agentmods.dev/commands/gonzalezpazmonica/savia/context-defer"><img src="https://agentmods.dev/badge/commands/gonzalezpazmonica/savia/context-defer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for context-defer

Your own site · 80×15
<a href="https://agentmods.dev/commands/gonzalezpazmonica/savia/context-defer"><img src="https://agentmods.dev/badge/commands/gonzalezpazmonica/savia/context-defer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 953 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00025 $0.00953
Opus 5.5 $0.00010 $0.00381
Sonnet 5.5 $0.00005 $0.00191
Haiku 4.5 $0.00003 $0.00095

Measured 2mo ago against content hash 5fc057c2e8d9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

context-defer 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 2mo ago.

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.

Origin

This is a copy

100% identical to context-defer — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/commands/context-defer.md · 130 lines

How it starts

The opening of the file, as written. The whole thing — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Comando: context-defer

Sinopsis

Implementar y gestionar un sistema de carga diferida (lazy loading) de comandos y reglas en pm-workspace. Convertir cargas eager en deferred. Reducir overhead de contexto un 85% cargando solo lo necesario cuando se invoca.

Sintaxis

/context-defer [--scan] [--apply] [--status] [--lang es|en]

Flags:

  • --scan — analizar .claude/profiles/context-map.md e identificar candidatos para deferred loading
  • --apply — aplicar conversión de eager → deferred en el context-map
  • --status — mostrar estado actual de deferred loading (qué está defer, qué eager)
  • --lang es|en — idioma del output

Comportamiento

1. Cargar perfil (si está activo)

Leer .claude/profiles/active-user.md → active_slug. Si hay perfil, cargar identity.md para contexto.

2. Escanear context-map (con --scan)

Leer .claude/profiles/context-map.md. Para cada grupo de comandos:

Análisis por grupo:

Grupo: Sprint & Daily
  Comandos: 10
  Tokens si cargados: ~500
  Frecuencia estimada: 5/7 días (diario)
  Recomendación: EAGER ✅ (necesarios frecuentemente)

Grupo: Governance & Compliance
  Comandos: 8
  Tokens si cargados: ~400
  Frecuencia estimada: 1/30 días (mensuales)
  Recomendación: DEFERRED 💤 (raramente usados)

Salida: tabla con grupos, recomendación defer/eager, tokens ahorrados si se aplica.

3. Aplicar conversión (con --apply)

Para cada grupo recomendado como DEFERRED:

  1. Extraer del context-map los comandos
  2. Crear fichero defer_{grupo}.md con registro de comandos
  3. Reemplazar en context-map con referencia: @defer:grupo-nombre
  4. Verificar sintaxis resultante

Ejemplo conversión:

Antes:

### Grupo: Governance & Compliance

**Comandos:** `/governance-audit`, `/governance-report`, ...

Después:

### Grupo: Governance & Compliance (⏱️ Deferred)

📋 Este grupo se carga bajo demanda al ejecutar un comando.
**Referencia:** `@defer:governance-compliance`

Fichero creado: .claude/profiles/defer_governance-compliance.md

Read the full file on GitHub · 130 lines

Changes

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.

  1. 2mo ago First seen · 130 lines · 25 tokens per session scan A 5fc057c2e8d9

Subscribe to this mod's changes

context-defer is a command published in the GitHub repository gonzalezpazmonica/savia (49 stars, last pushed yesterday), licensed MIT. It adds 25 tokens to every session and 953 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to context-defer, differing in 0 lines, and is treated as a copy.

Related

context-defer compared with commands from other repositories

context-defer next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
context-defergonzalezpazmonica/saviaCommand49yesterdayMITA25Claude Code
setup-contextmohitagw15856/pm-claude-skillsCommand1.5kyesterdayMITA21Claude Code
startstriderZA/OpenCodeGameStudiosCommand114yesterdayMITA8Claude Code
vitaecontext-vitaegraphvitaecontext/vitaecontextCommand883d agoMITA12Claude Code
culture-onboarding-90frankxai/Starlight-Intelligence-SystemCommand10yesterdayMITA101Claude Code
reclaim-knowledgefrankxai/Starlight-Intelligence-SystemCommand10yesterdayMITA58Claude Code
orchestrate-brainfrankxai/Starlight-Intelligence-SystemCommand10yesterdayMITA49Claude Code