mcpField
P
paleo-trim-context

paleo-trim-context

github.com/mocasusAgent workflows2156 installsUpdated 14w ago
Repository

About paleo-trim-context

A context-management skill for agents that keeps sessions focused by retaining current task state and removing stale information. It also compresses long retrieved material before reasoning.

Key features

  1. 01Removes stale outputs and duplicate logs
  2. 02Retains plans, TODOs, IDs, and paths
  3. 03Compresses retrieved context before reasoning
  4. 04Pins effort to task complexity
  5. 05Hands off turn or artifact compression to sibling skills

Use cases

  1. 01Managing context in long sessions
  2. 02Reducing large document dumps before model calls
  3. 03Keeping task state while discarding obsolete results

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/mocasus/paleo --skill paleo-trim-context

After installing, type/paleo-trim-contextin Claude Code to confirm it loaded.

Details

From the project README

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.

Comments

Markdown supported