context-defer

context-defer is a command for Claude Code from gonzalezpazmonica/savia. It costs 25 tokens per session (953 once invoked), scanned A, original, 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 original No closer match found 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 $0.00013 $0.00477
Sonnet 5 $0.00005 $0.00191
Haiku 4.5 $0.00003 $0.00095

Measured 3d ago against content hash 5fc057c2e8d9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 3d 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

Copies of this mod

1 near-identical copy found in the catalogue:

.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.mdactive_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. 3d 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 (50 stars, last pushed today), licensed MIT. It adds 25 tokens to every session and 953 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.

Related

Other commands, from other repositories

deja

Search this machine's past AI coding sessions (deja-vu).

vshulcz/deja-vu · 17 tokens

setup-context

Set up your Skill Memory — a pm-context.md every skill reads so outputs come back tailored to you.

mohitagw15856/pm-claude-skills · 21 tokens

meetings-list

List recent meetings and voice memos. Use when the user asks "what meetings did I have", "show my recent recordings", "any meetings today", "list my voice memos", or wants an overview of their meeting history. Also use when they need to find a specific meeting by browsing rather than searching.

flonat/flonat-research · 63 tokens

vitaecontext-vitaegraph

Create, validate, index, or use a private VitaeGraph.

vitaecontext/vitaecontext · 12 tokens

perf-difficult-conversation

Three-conversations framework rehearsal (Stone/Patton/Heen — Harvard Negotiation Project) for high-stakes conversations — termination, demotion, hard feedback, conflict surfacing. Produces three-conversations breakdown (what-happened / feelings / identity), conversation script with multiple opening choices, SCARF…

frankxai/Starlight-Intelligence-System · 93 tokens

culture-onboarding-90

Design a 90-day onboarding architecture for a role. First day (psychological safety + belonging activation), first week (relationship + role context + early wins), first month (skill ramp + integration + baseline), first quarter (autonomous performance + cultural integration check). Written-first elements for…

frankxai/Starlight-Intelligence-System · 101 tokens