context-chef-core

Compile AI agent state into provider-ready LLM payloads for TypeScript and JavaScript loops.

28|2|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/MyPrototypeWhat/context-chef --skill context-chef-core
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-chef-core
Source: https://github.com/MyPrototypeWhat/context-chef/tree/main/skills/context-chef-core
Command: npx skills add https://github.com/MyPrototypeWhat/context-chef --skill context-chef-core

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

ContextChef helps you stop AI agent context from drifting and overflowing by compiling your system prompt, compressed history, dynamic state, and (optionally) memory and tool handling into a provider-ready payload for each LLM call.

Core Features & Use Cases

  • History compression (Janitor): keeps conversations within the model’s context window via token-aware preservation and LLM-based summarization when needed.
  • Tool management (Pruner): reduces hallucinated or irrelevant tool calls by filtering tool sets for the current task.
  • Dynamic state with Zod (XML injection): prevents state drift by validating user/task state and injecting it efficiently for recency bias.
  • Provider-adapter compilation: produces correctly formatted payloads for OpenAI, Anthropic, or Gemini without rewriting prompts per provider.
  • Optional memory + VFS offloading: persist key facts across turns and truncate/offload oversized tool results to keep responses usable.

Quick Start

Ask the AI to integrate @context-chef/core into your existing TypeScript/JavaScript agent loop by detecting your provider, installing the package, wiring compile() per turn, and enabling history compression plus dynamic Zod state injection.

Frequently Asked Questions about context-chef-core

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

FAQPage Schema
How do I prevent context overflow and state drift in a TypeScript AI agent loop?

To prevent context overflow and state drift, compile your AI agent state into provider-ready LLM payloads using history compression, tool pruning, and dynamic Zod state validation before each model call.

How does history compression work for multi-provider LLM payloads?

History compression reduces multi-provider LLM payload size by applying token-aware preservation and LLM-based summarization to keep conversations within the model's context window without losing critical state.

Can I compile OpenAI, Anthropic, and Gemini payloads without rewriting agent prompts?

Yes, you can compile OpenAI, Anthropic, and Gemini payloads without rewriting prompts by using provider-adapter compilation to automatically format your system prompt and compressed history for each target LLM.

What is the best way to reduce hallucinated tool calls in an AI agent?

The best way to reduce hallucinated tool calls is to apply tool pruning, which filters the available tool set for the current task so the LLM only sees relevant operational functions.

How do I inject dynamic task state into an LLM payload using Zod?

You can inject dynamic task state into an LLM payload using Zod by validating user and task state, then efficiently injecting the verified state as XML to enforce recency bias and prevent state drift.

Do I need to manually truncate oversized tool results to prevent context overflow?

No, you do not need to manually truncate oversized tool results because optional VFS offloading can automatically truncate and offload large tool outputs to keep LLM responses usable within the context window.