context-engine

Monitor tool call counts and trigger state saving before context compaction.

82|23|Updated Feb 24, 2026
One-click install
npx skills add https://github.com/Rune-kit/rune --skill context-engine-rune-kit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-engine
Source: https://github.com/Rune-kit/rune/tree/main/skills/context-engine
Command: npx skills add https://github.com/Rune-kit/rune --skill context-engine-rune-kit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents the loss of crucial information during long AI sessions by intelligently managing the context window, ensuring important decisions and progress are preserved even when the context limit is approached.

Core Features & Use Cases

  • Context Monitoring: Tracks tool call usage as a proxy for context window fullness.
  • Smart Compaction Triggering: Recommends or initiates context compaction at appropriate boundaries.
  • State Preservation: Coordinates with session-bridge to save critical session state before compaction.
  • Behavioral Mode Injection: Manages different operational modes (dev, research, review) based on session needs.
  • Use Case: In a lengthy coding session, this skill will alert you when the context is getting full and suggest saving your work before it's potentially lost, ensuring your architectural decisions and code progress are retained.

Quick Start

Use the context-engine skill to check the current context health and get recommendations for managing context.

Frequently Asked Questions about context-engine

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

FAQPage Schema
How do I prevent context loss during long AI sessions?

Preventing context loss during long AI sessions requires monitoring tool call counts to trigger state saving protocols before compaction occurs. This ensures critical file states and architectural decisions are preserved across the workflow.

What is context compaction and when does it happen?

Context compaction is the process of summarizing or discarding older session data when the context window fills. It triggers when tool call counts reach a threshold, requiring proactive state preservation to prevent data loss.

How do I save AI session state before compaction?

Saving AI session state before compaction requires coordinating with a session bridge to export critical task progress, file states, and behavioral modes into context files before the context window reaches its limit.

Can I manage different behavioral modes in AI workflows?

Managing different behavioral modes like development, research, and review in AI workflows is achieved by injecting specific context files. This approach dictates the operational mode based on current session requirements.

Does context management work for lengthy coding sessions?

Context management works for lengthy coding sessions by tracking tool call usage as a proxy for context fullness. It alerts you when the context is getting full and suggests saving work before progress is lost.