context-engineering-pipeline

Diagnose and repair agent context degradation in long conversations.

10|2|Updated Mar 12, 2026
One-click install
npx skills add https://github.com/viktorbezdek/skillstack --skill context-engineering-pipeline
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-engineering-pipeline
Source: https://github.com/viktorbezdek/skillstack/tree/main/skillstack-workflows/skills/context-engineering-pipeline
Command: npx skills add https://github.com/viktorbezdek/skillstack --skill context-engineering-pipeline

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Agents lose performance when their context degrades, token budgets are exceeded, or instructions are forgotten over long conversations. This skill systematically diagnoses and repairs those issues.

Core Features & Use Cases

  • Diagnostic Phase: Identifies specific context pathologies such as lost‑in‑middle, poisoning, and instruction decay.
  • Optimization Phase: Applies KV‑cache tuning, context partitioning, and observation masking to extend effective capacity.
  • Compression Phase: Summarizes conversation history and anchors key facts while preserving essential information.
  • Filesystem Persistence: Stores plans, scratch pads, and handoff files to maintain context across sessions.
  • Use Case Example: Improve a customer‑support LLM that starts forgetting earlier user preferences after several dialogue turns.

Quick Start

Activate the context-engineering-pipeline skill to diagnose and improve my agent's context.

Frequently Asked Questions about context-engineering-pipeline

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

FAQPage Schema
How do I fix LLM context degradation when an agent forgets instructions during long conversations?

You can fix LLM context degradation by running a diagnostic pipeline that identifies issues like lost-in-the-middle and instruction decay, then applies KV-cache tuning and history compression to restore agent performance.

What causes token bloat and context poisoning in LLM agents?

Token bloat and context poisoning are caused by context degradation over long conversations. A diagnostic phase identifies these specific pathologies so they can be repaired with observation masking and context partitioning.

How do I optimize KV-cache and compress conversation history for long-running agents?

You optimize KV-cache and compress conversation history by applying context partitioning and observation masking to extend capacity, then summarizing history and anchoring key facts to preserve essential information.

Do I need specific prerequisite skills installed to use the context engineering pipeline?

Yes, using the context engineering pipeline requires the context-fundamentals, context-optimization, context-compression, context-degradation, and filesystem-context skills to be installed beforehand.

Can I persist agent context and scratch pads across different sessions using the filesystem?

Yes, you can persist agent context across sessions using filesystem persistence. The pipeline stores plans, scratch pads, and handoff files on the filesystem to maintain continuity between different sessions.