context-manager

Budgets tokens and prioritizes content to manage LLM context windows for prompts and workflows.

133|19|Updated May 4, 2026
One-click install
npx skills add https://github.com/Mark393295827/third-brain-v5-skills --skill context-manager-mark393295827
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-manager
Source: https://github.com/Mark393295827/third-brain-v5-skills/tree/main/skills/context-manager
Command: npx skills add https://github.com/Mark393295827/third-brain-v5-skills --skill context-manager-mark393295827

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps manage the LLM context window when prompts, tool outputs, and source material start competing for limited space. It reduces token waste, preserves critical evidence, and prevents long tasks from degrading due to missing or overloaded context.

Core Features & Use Cases

  • Token budgeting: Estimates how much context is available and how to allocate it across instructions, user input, retrieved sources, and reasoning.
  • Prompt assembly: Organizes content into immutable core, task context, and ephemeral layers so prompts stay structured and reusable.
  • Truncation and compaction: Decides what to summarize, trim, deduplicate, or drop while preserving continuity for long-running workflows.
  • Use cases: Managing multi-turn research sessions, preparing large document sets, controlling prompt cost, and resuming long-horizon tasks without losing goal, constraints, or evidence.

Quick Start

Use context-manager to estimate the token budget, decide what to keep, summarize, or drop, and produce a context-safe prompt plan.

Frequently Asked Questions about context-manager

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage LLM context windows when prompts and tool outputs exceed token limits?

To manage LLM context windows, you can apply token budgeting to estimate available space and prioritize content. This approach organizes prompts into immutable core, task context, and ephemeral layers to keep prompts structured and prevent task degradation.

What is the best way to truncate and compact long-running workflow context without losing critical evidence?

Truncation and compaction involve deciding what to summarize, trim, deduplicate, or drop. By categorizing content into structured layers, you preserve continuity and critical evidence for long-running workflows while reducing token waste and controlling prompt cost.

How do I assemble prompts for multi-step LLM workflows to avoid context pressure?

Prompt assembly for multi-step LLM workflows requires allocating token budgets across instructions, user input, and retrieved sources. Structuring content into immutable and ephemeral layers ensures prompts stay reusable and context-safe under cost constraints.

When do I need token budgeting for multi-turn research sessions?

You need token budgeting for multi-turn research sessions when prompts, tool outputs, and source material start competing for limited space. It estimates context availability to prevent task degradation and control prompt cost.

Does context compaction support resuming long-horizon tasks without losing constraints?

Context compaction supports resuming long-horizon tasks by applying keep, summarize, or drop decisions. This ensures you retain goals, constraints, and evidence while maintaining retrieval paths for excluded sources.

Why does my LLM task degrade when processing large document sets?

Your LLM task degrades with large document sets due to missing or overloaded context. Applying cost-aware prompt planning and organizing content into structured layers prevents long tasks from failing under context pressure.