context-chef-middleware

Community

Add transparent AI context compression in minutes.

AuthorMyPrototypeWhat
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill helps you stop AI SDK prompts from growing too large by automatically compressing chat history, truncating oversized tool outputs, and keeping token usage within your configured budget.

Core Features & Use Cases

  • Zero-code-change wrapping: wrap your existing Vercel AI SDK model once and keep using generateText or streamText as before.
  • History compression: use a cheaper model to summarize older messages when the prompt exceeds the token budget.
  • Tool result truncation: preserve head/tail portions of large tool outputs (optionally with storage for retrieval) to reduce hallucination risk and context bloat.
  • Optional prompt enhancements: inject dynamic state and apply a transform hook after compression for RAG or metadata.

Quick Start

Ask the Skill to integrate context-chef middleware into your Vercel AI SDK v6+ project, then reuse your current generateText/streamText calls while wrapping your model with withContextChef using compression and truncation.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: context-chef-middleware
Download link: https://github.com/MyPrototypeWhat/context-chef/archive/main.zip#context-chef-middleware

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.