context-engine

Monitor context pressure and preserve session state before compaction.

1|Updated May 18, 2026
One-click install
npx skills add https://github.com/linenoize/topia --skill context-engine-linenoize
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-engine
Source: https://github.com/linenoize/topia/tree/main/skills/context-engine
Command: npx skills add https://github.com/linenoize/topia --skill context-engine-linenoize

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Context-engine prevents long AI coding sessions from losing critical decisions, progress, and behavioral mode context when the window fills up or compaction becomes necessary.

Core Features & Use Cases

  • Context health monitoring: Tracks tool-call pressure and classifies sessions as green, yellow, orange, or red.
  • Safe compaction support: Preserves task state, file history, decisions, and continuation points before context is compacted.
  • Behavioral mode injection: Loads dev, research, or review guidance from context files so orchestrators can shift session behavior without rewriting rules.
  • Output control and preview gating: Activates terse output when needed and estimates bundle cost before expensive multi-file dispatches.
  • Use Case: A long implementation session reaches its limit, so the skill saves state, recommends compaction at the next boundary, and keeps the work resumable.

Quick Start

Use the context-engine skill to assess current session pressure, preserve state if compaction is needed, and recommend the safest next boundary for continuing work.

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 coding sessions?

Safe compaction preserves critical decisions, file history, and continuation points before context is cleared. Saving this state at phase boundaries ensures long implementation sessions remain fully recoverable and resumable.

What is context pressure monitoring and how does it work?

Context pressure monitoring tracks tool-call counts and budgeting constraints to classify session health as green, yellow, orange, or red. This classification triggers behavioral mode injection and state handoff to prevent context overflow.

How do I safely compact context without losing behavioral mode instructions?

Compacting context safely requires preserving behavioral mode guidance alongside task state. Loading dev, research, or review rules from context files and performing a state handoff ensures orchestrators can shift session behavior without rewriting rules.

Can I use context management for multi-skill orchestration and phase transitions?

Context management supports multi-skill orchestration by tracking tool-call classification and applying preview gating. It estimates bundle cost before expensive multi-file dispatches and applies terse output control to maintain continuity across phase transitions.

When should I trigger state preservation before a session compaction?

Trigger state preservation when context health monitoring classifies session pressure as orange or red. Recommending compaction at the next safe boundary ensures task state, file history, and continuation points are saved before context loss occurs.