context-management

Manage LLM context in long-running sessions with selective file reading and handoff protocols.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/george11642/agi --skill context-management-george11642
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: context-management
Source: https://github.com/george11642/agi/tree/main/skills/context-management
Command: npx skills add https://github.com/george11642/agi --skill context-management-george11642

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the degradation of LLM performance in long-running sessions by providing strategies for efficient context management, preventing information loss and maintaining accuracy.

Core Features & Use Cases

  • Context Lean Prevention: Guides on reading files selectively, using grep, and spawning isolated subagents to keep context windows manageable.
  • Context Pressure Detection: Identifies warning signs indicating that the context window is nearing its limit.
  • Handoff Protocol: Defines a structured format for saving session state and critical information to .autopilot/handoff.md for seamless session chaining.
  • Manus Pattern: Recommends periodic task state rewriting to combat context degradation in very long sessions.

Quick Start

Use the context-management skill to write a handoff file for the current session.

Frequently Asked Questions about context-management

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

FAQPage Schema
How do I manage LLM context in long-running sessions to prevent performance degradation?▼

Detecting LLM context pressure involves identifying warning signs that the context window is nearing its limit. This Skill monitors these signals to trigger context management strategies before information recall issues occur.

What is the best way to chain LLM sessions and save state for later use?▼

The best way to chain LLM sessions is using a handoff protocol. This defines a structured format for saving session state and critical information to a handoff file, ensuring seamless continuity across extended operations.

How do I keep LLM context windows manageable when working with large files?▼

You can keep LLM context windows manageable by reading files selectively, using grep to find specific text, and spawning isolated subagents for separate tasks. These techniques prevent context overflow in extended sessions.

Why does my LLM lose information and accuracy during very long sessions?▼

An LLM loses information and accuracy during very long sessions due to context window limitations and context degradation. Applying the Manus pattern to periodically rewrite task state helps combat this recall degradation.

Do I need any specific dependencies to implement context management for LLM memory?▼

No specific dependencies are required to implement LLM context management. The Skill provides standalone strategies for context pressure detection, subagent isolation, and session chaining using standard file outputs.