context-age

context-age is a command for Claude Code from gonzalezpazmonica/pm-workspace. It costs 22 tokens per session (628 once invoked), scanned A, a copy of context-age, MIT.

A tool that reviews old entries in a decision log and proposes shorter summaries or archiving. A decision log records the reasoning and choices made during a project.

In plain words
What is it for?
Use it to find decisions older than 30 or 90 days, compress them into brief records, or move recurring decisions into domain rules.
Why use it?
It reduces the amount of historical detail that must be loaded while keeping important decisions available.

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 find decisions older than 30 or 90 days, compress them into brief records, or move recurring decisions into domain rules.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/gonzalezpazmonica/pm-workspace/context-age
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/pm-workspace

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-age

README.md
[![agentmods](https://agentmods.dev/badge/commands/gonzalezpazmonica/pm-workspace/context-age.svg)](https://agentmods.dev/commands/gonzalezpazmonica/pm-workspace/context-age)
Your own site
<a href="https://agentmods.dev/commands/gonzalezpazmonica/pm-workspace/context-age"><img src="https://agentmods.dev/badge/commands/gonzalezpazmonica/pm-workspace/context-age.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 628 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.00022 $0.00628
Opus 5 $0.00011 $0.00314
Sonnet 5 $0.00004 $0.00126
Haiku 4.5 $0.00002 $0.00063

Measured 4d ago against content hash d1e3fa9855ae, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

context-age 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 4d 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-age — 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-age.md · 95 lines

How it starts

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

/context-age

🦉 Las decisiones envejecen. Savia las comprime para que el contexto respire.


Cargar perfil de usuario

Grupo: Memory & Context — cargar:

  • identity.md — slug (para aislar datos por usuario)

Concepto

Inspirado en la semantización neuronal: los recuerdos episódicos (detallados) se comprimen con el tiempo en recuerdos semánticos (esenciales). Aplicamos lo mismo al decision-log.md:

Edad Estado Formato
< 30 días Episódico Completo (fecha, contexto, decisión, alternativas)
30-90 días Comprimido Una línea (fecha + decisión)
> 90 días Archivable Migrar a regla de dominio o archivar

Flujo

Paso 1 — Analizar

Ejecutar bash scripts/context-aging.sh analyze para contar entradas por categoría.

Mostrar resumen:

🦉 Context Aging — decision-log.md
  Episódicas (<30d): {N}
  Comprimibles (30-90d): {N}
  Archivables (>90d): {N}

Paso 2 — Proponer

Si hay entradas comprimibles o archivables:

  1. Listar cada entrada con su edad y acción propuesta
  2. Para archivables: sugerir si migrar a regla de dominio (si es patrón recurrente) o archivar
  3. Mostrar tokens estimados que se liberarían

Paso 3 — Ejecutar (con confirmación)

  1. Pedir confirmación explícita antes de modificar decision-log.md
  2. Comprimir entradas de 30-90 días in-place
  3. Mover entradas >90 días a .decision-archive/decisions-{fecha}.md
  4. Registrar la acción en el context-tracker

Subcomandos

  • /context-age — análisis + propuesta (no modifica nada)
  • /context-age apply — ejecutar compresión y archivado tras confirmación
  • /context-age status — solo conteo rápido por categoría

Modo agente (role: "Agent")

status: ok
action: context_age
fresh: 12
compressible: 5
archivable: 3
tokens_saveable: 850

Restricciones

  • NUNCA modificar decision-log.md sin confirmación explícita
  • SIEMPRE crear backup antes de comprimir (.decision-archive/)
  • NUNCA eliminar decisiones — solo comprimir o archivar
  • Si una decisión archivable es recurrente → sugerir migración a regla, NO archivar

Read the full file on GitHub · 95 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. 4d ago First seen · 95 lines · 22 tokens per session scan A d1e3fa9855ae

Subscribe to this mod's changes

context-age is a command published in the GitHub repository gonzalezpazmonica/pm-workspace (49 stars, last pushed 2d ago), licensed MIT. It adds 22 tokens to every session and 628 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to context-age, differing in 0 lines, and is treated as a copy.