paleo-trim-context

paleo-trim-context is a skill for Claude Code from mocasus/paleo. It costs 40 tokens per session (440 once invoked), scanned A, original, MIT.

A context-management rule for long coding-agent sessions. Context is the information an agent can use while working.

In plain words
What is it for?
Use it to summarize old tool output, drop resolved errors, and retain the current plan, open tasks, key IDs, and paths.
Why use it?
It removes stale logs and repeated details so the task stays within the available context and uses fewer tokens.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the paleo plugin — 7 skills shipped together

Good fit Use it to summarize old tool output, drop resolved errors, and retain the current plan, open tasks, key IDs, and paths.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mocasus/paleo/paleo-trim-context
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.

Any agent
npx skills add mocasus/paleo --skill paleo-trim-context
Clone the repo
git clone --depth 1 https://github.com/mocasus/paleo

Made for: Claude Code.

Or install paleo, the plugin that ships this one along with the rest of its 7 skills.

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 paleo-trim-context

README.md
[![agentmods](https://agentmods.dev/badge/skills/mocasus/paleo/paleo-trim-context/github.svg)](https://agentmods.dev/skills/mocasus/paleo/paleo-trim-context)
Your own site
<a href="https://agentmods.dev/skills/mocasus/paleo/paleo-trim-context"><img src="https://agentmods.dev/badge/skills/mocasus/paleo/paleo-trim-context/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 paleo-trim-context

Your own site · 80×15
<a href="https://agentmods.dev/skills/mocasus/paleo/paleo-trim-context"><img src="https://agentmods.dev/badge/skills/mocasus/paleo/paleo-trim-context.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 440 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.00040 $0.00440
Opus 5 $0.00020 $0.00220
Sonnet 5 $0.00008 $0.00088
Haiku 4.5 $0.00004 $0.00044

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

Security

Grade A, and why

paleo-trim-context 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 11d 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.

skills/paleo-trim-context/SKILL.md · 38 lines

What it actually says

paleo-trim-context

Keep context small. Drop stale, keep task state.

Rules

  • Summarize old tool output into 1-2 lines; keep only the result that matters.
  • Drop: resolved errors, obsolete file reads, duplicate logs.
  • Keep: current plan, open TODO, key IDs/paths, last decision.
  • Use session_search / notes for history instead of re-pasting.
  • Prefer code/script over long prose explanations in context.
  • Pre-thinking compression (biggest savings): BEFORE the model reasons, compress retrieved docs / RAG context / long file dumps into key facts + a source pointer. Drop full-doc dumps.
  • Effort pinning: trivial task -> signal low effort, no over-think. Reuse a prior conclusion instead of re-reasoning the same thing.

Scope boundary (don't collide with siblings)

  • Context hygiene + effort pinning + pre-thinking compression = THIS skill (runs automatically during the session).
  • paleo-converse = explicit conversation-turn compression + dedup (on-demand, when the user points at history or context is heavy).
  • paleo-summary = one bulky artifact (log / diff / dump / stdout) -> tight intisari.
  • Hand off to those when the target is a specific turn-block or a single artifact; don't re-implement them here.

When

  • Long session (>20 turns), big file dumps, repeated similar output.
  • Before calling an expensive model — shrink first.

Gotchas

  • Don't trim the user's latest instruction.
  • Keep ground truth (file paths, IDs) — summarize derivations only.
  • If unsure what's stale, ask once. Don't guess-drop critical state.
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. 11d ago First seen · 38 lines · 40 tokens per session scan A fb6ba5d9389b

Subscribe to this mod's changes

paleo-trim-context is a skill published in the GitHub repository mocasus/paleo (20 stars, last pushed 1mo ago), licensed MIT. It adds 40 tokens to every session and 440 once invoked, about $0.0002 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-08-30.

Related

Other skills, from other repositories

hermes-context-optimization

Use this when the user asks about Hermes prompt/context size, “hello” startup cost, compression behavior, memory/profile bloat, tool-schema overhead, skill loading, session-store/search-index storage, or multimodal/visual-context approaches such as Snapcompact.

AtlasOmnia/donna-starter · 35 tokens

hermes-mnemosyne

Mnemosyne is Hermes' primary local-first memory engine — SQLite with vector + FTS5 hybrid search, 19+ tools, auto-consolidation, and a standalone CLI. It's a pip-installed plugin (not a built-in toolset) discovered via $HERMESHOME/plugins/mnemosyne/.

AtlasOmnia/donna-starter · 30 tokens

hermes-session-maintenance

Use this skill when the user asks about pruning Hermes sessions, session retention, session DB size, hermes sessions prune, sessions.autoprune, sessions.retentiondays, session export/backup, or whether old conversations should be capped.

AtlasOmnia/donna-starter · 37 tokens

memory-init

Scaffold a project-local memory directory and AGENTS.md guidance for reusable agent knowledge. Use when a user wants to initialize .agents/memories/ or another project memory path so future agents can read and maintain durable project context.

flc1125/skills · 50 tokens

mnemosyne-maintenance

Use when: upgrading Mnemosyne, diagnosing slow/hung consolidation (mnemosynesleep), fixing missing embeddings, or troubleshooting import/version mismatches.

AtlasOmnia/donna-starter · 40 tokens

obsidian-memory-architecture

Use when designing, setting up, or maintaining an Obsidian vault as Hermes Agent's durable knowledge layer. Routes facts, conversation history, documents, procedures, and daily logs to the correct Hermes or vault system without duplicating everything into the prompt.

AtlasOmnia/hermes-custom-pack · 56 tokens