ck:context-engineering

Analyze LLM context usage and detect degradation risks.

Updated Apr 2, 2026
One-click install
npx skills add https://github.com/hidonguyen/trade-ops --skill ck-context-engineering-hidonguyen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ck:context-engineering
Source: https://github.com/hidonguyen/trade-ops/tree/main/.opencode/skills/context-engineering
Command: npx skills add https://github.com/hidonguyen/trade-ops --skill ck-context-engineering-hidonguyen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Context Engineering reduces LLM performance loss caused by oversized or poorly structured context. It helps teams detect attention-related failures (lost-in-middle), context poisoning, and quota exhaustion, then recommends targeted compaction and isolation strategies to preserve task continuity and lower token costs.

Core Features & Use Cases

  • Context health analysis: Token utilization, utilization thresholds, attention-distribution heuristics, and poisoning detection.
  • Compression evaluation: Probe-based tests, compression ratio calculation, and quality scoring with recommendations.
  • Multi-agent and memory guidance: Partitioning, sub-agent handoffs, KV-cache and file-based memory patterns.
  • Use Case: Run an analysis on a long-running agent conversation to identify critical items buried in the middle, compute compaction targets, and emit a concise artifact-trail summary for resumption.

Quick Start

Analyze the provided conversation for token utilization, lost-in-middle and poisoning risks, and return compaction thresholds plus actionable next steps.

Frequently Asked Questions about ck:context-engineering

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

FAQPage Schema
What is lost-in-middle context degradation in LLM agents?

Context poisoning happens when erroneous or irrelevant data degrades LLM reasoning over long sessions. This tool detects poisoning indicators and recommends compaction strategies to isolate bad inputs and restore context health.

How do I calculate compaction thresholds for long-running agent conversations?

You calculate compaction thresholds by analyzing token utilization and attention distribution heuristics. This Skill computes those metrics for long-running agent conversations and outputs JSON-compatible targets for automated workflow integration.

When do I need context engineering for multi-agent pipelines?

You need context engineering for multi-agent pipelines when tool outputs exhaust token budgets and disrupt task continuity. It evaluates compression ratios and recommends partitioning or sub-agent handoffs to optimize memory systems.

Does this context analysis tool work with automated JSON-compatible workflows?

Yes, the context analysis tool outputs JSON-compatible recommendations specifically designed for automated workflow integration. It emits utilization metrics, poisoning indicators, and compaction thresholds directly into your pipelines.

What is the best way to evaluate compression quality for LLM context?

The best way to evaluate compression quality is by running probe-based tests to calculate compression ratios and quality scores. This Skill performs those tests and returns actionable recommendations to minimize token use while maximizing reasoning quality.