context-management

Tier content into full, summary, and index levels to manage token budgets.

Updated Feb 1, 2026
One-click install
npx skills add https://github.com/twofoldtech-dakota/studio --skill context-management-twofoldtech-dakota
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-management
Source: https://github.com/twofoldtech-dakota/studio/tree/main/playbooks/context-management
Command: npx skills add https://github.com/twofoldtech-dakota/studio --skill context-management-twofoldtech-dakota

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Context windows in AI workflows are bounded and can lead to information loss or inefficient planning if not managed. This skill provides a three-tier content system and a token-budgeted workflow to preserve recent context while summarizing or archiving older data.

Core Features & Use Cases

  • Three-tier content system: Tier 1 Full Content (recent/active), Tier 2 Summary (older), Tier 3 Index (archived).
  • Token budget allocation & context optimization: Distributes memory across plans, learnings, backlog, and external docs with clear thresholds and caching.
  • Summarization & preservation workflow: Uses LLM-powered summaries, caches results, and archives content to maintain session continuity.

Quick Start

  1. Check current status: ./scripts/context-manager.sh status
  2. Scan for optimization opportunities: ./scripts/context-manager.sh scan
  3. Generate a summary for an entry: ./scripts/context-manager.sh summarize studio/learnings/frontend.md 2025-11-15
  4. Apply the generated summaries: follow the tool prompts to replace tier-1 content with summaries
  5. Load tier-1 content at session start to ensure up-to-date context

Frequently Asked Questions about context-management

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

FAQPage Schema
How do I manage context windows to prevent token budget overruns in long-running AI sessions?

Prevent token budget overruns by tiering context window content into full content, summaries, and indexes. This three-tier system preserves recent active context while summarizing or archiving older data to maintain long-running session continuity.

What is the best way to retain learnings and project documentation across days of AI sessions?

Retain learnings and project documentation across days by applying a token-budgeted workflow with tiered storage. It uses LLM-powered summaries, caches results, and archives older content to maintain session continuity over weeks.

How does LLM summarization work for context management and memory allocation?

LLM summarization for context management works by generating summaries for older entries and caching the results. This action replaces tier-1 full content with summaries, optimizing memory allocation across plans, backlog, and external docs.

How do I optimize context window memory allocation for plans, backlog, and external docs?

Optimize context window memory allocation by distributing token budgets across plans, learnings, backlog, and external docs with clear thresholds and caching. This ensures recent active content stays full while older data is indexed or archived.

When should I archive full content to tier-3 indexes instead of keeping it in active context?

Archive full content to tier-3 indexes when it becomes older and is no longer needed for active planning. This happens after exceeding defined token budget thresholds, allowing the context management system to replace it with LLM summaries.