context-mode

Route large command outputs to ctx_execute or ctx_execute_file via PreToolUse.

3|1|Updated Aug 10, 2025
One-click install
npx skills add https://github.com/hckhanh/pulumi-any-terraform --skill context-mode-hckhanh
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: context-mode
Source: https://github.com/hckhanh/pulumi-any-terraform/tree/main/.agents/skills/context-mode
Command: npx skills add https://github.com/hckhanh/pulumi-any-terraform --skill context-mode-hckhanh

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Large command outputs and tool results can overwhelm the AI context, causing slowed responses or truncated analysis. Context-mode provides deterministic routing to specialized tools so the LLM only sees concise, relevant results.

Core Features & Use Cases

  • Automatic routing of large outputs to ctx_execute or ctx_execute_file to keep context lean.
  • Triggered for common tasks like "analyze logs", "summarize output", "parse JSON", "check build output", and other MCP results that exceed typical size limits.
  • Subagent routing is handled automatically via PreToolUse to ensure consistent behavior across tools and sessions.

Quick Start

Enable context-mode and let it automatically route large outputs to ctx_execute or ctx_execute_file for deterministic processing.

Frequently Asked Questions about context-mode

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

FAQPage Schema
How do I prevent large command outputs from flooding the LLM context?▼

Context-mode prevents large command outputs from flooding the LLM context by automatically routing oversized results to ctx_execute or ctx_execute_file. This deterministic routing ensures the LLM only processes concise, relevant summaries instead of raw data.

What is the best way to analyze large build logs without slowing down AI responses?▼

Analyzing large build logs without slowing down AI responses is best handled by context-mode. It intercepts logs exceeding 20 lines via PreToolUse subagent routing, processing them externally so the AI context remains lean and responsive.

When do I need context routing for MCP outputs and API responses?▼

You need context routing for MCP outputs and API responses when structured data exceeds typical size limits or 20 lines. Context-mode triggers automatically for tasks like parsing JSON or summarizing output, enforcing lean context management.

Does context-mode work automatically for log analysis tasks, or do I need manual configuration?▼

Context-mode works automatically for log analysis tasks without manual configuration. Once enabled, it enforces a default routing rule set and uses PreToolUse subagent routing to consistently manage large outputs across tools and sessions.

Can I use context routing to parse JSON and process large structured data from automation tasks?▼

Yes, you can use context routing to parse JSON and process large structured data from automation tasks. Context-mode targets common data processing tasks, automatically routing heavy outputs to ctx_execute_file for deterministic, context-safe extraction.