context-window-engineer

context-window-engineer is a skill for Claude Code, Codex from roedyrustam/vibes-plug. It costs 124 tokens per session (3,747 once invoked), scanned A, original, MIT.

A guide to organizing very large amounts of text and data supplied to an AI model. It covers dividing context, retrieving relevant information, and managing token use across long requests.

In plain words
What is it for?
Use it to design long-context AI agents and retrieval-augmented generation systems, where relevant information is fetched and added to a model request.
Why use it?
Pasting too much unstructured information can make an AI miss important details, waste tokens, or produce more incorrect answers. It helps address the problem of information being overlooked in the middle of a long context.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it to design long-context AI agents and retrieval-augmented generation systems, where relevant information is fetched and added to a model request.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/roedyrustam/vibes-plug/context-window-engineer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add roedyrustam/vibes-plug --skill context-window-engineer
Clone the repo
git clone --depth 1 https://github.com/roedyrustam/vibes-plug

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for context-window-engineer

README.md
[![agentmods](https://agentmods.dev/badge/skills/roedyrustam/vibes-plug/context-window-engineer/github.svg)](https://agentmods.dev/skills/roedyrustam/vibes-plug/context-window-engineer)
Your own site
<a href="https://agentmods.dev/skills/roedyrustam/vibes-plug/context-window-engineer"><img src="https://agentmods.dev/badge/skills/roedyrustam/vibes-plug/context-window-engineer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for context-window-engineer

Your own site · 80×15
<a href="https://agentmods.dev/skills/roedyrustam/vibes-plug/context-window-engineer"><img src="https://agentmods.dev/badge/skills/roedyrustam/vibes-plug/context-window-engineer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 124 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,747 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00124 $0.03747
Opus 5.5 $0.00050 $0.01499
Sonnet 5.5 $0.00025 $0.00749
Haiku 4.5 $0.00012 $0.00375

Measured 8d ago against content hash 068750eaef93, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

context-window-engineer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/context-window-engineer/SKILL.md · 303 lines

How it starts

The opening of the file, as written. The whole thing — 303 lines — stays where its author put it; the contents beside it link to each section on GitHub.

context-window-engineer — vibes-plug Skill

English | Bahasa Indonesia


English

Orchestration & Integration

Connects and orchestrates with kv-cache-prefix-optimizer, llm-finops-router, frontier-ai-models-expert, gemini-agent-booster, ai-llm-integration-expert, vercel-ai-sdk-expert, adaptive-model-cascade, session-memory-manager, and deep-research-analyst to ensure context windows are utilized efficiently across all AI-powered workflows.

Description

Production guide for engineering, partitioning, and optimizing ultra-large context windows (128k → 2M+ tokens) across frontier models. Prevents the most common failure mode in 2026 AI applications: dumping raw data into context without structure, causing degraded recall, wasted tokens, and hallucination amplification in the "lost in the middle" zone.

Trigger Conditions

Activate this skill when:

  • Building AI agents or applications that consume >50k tokens of context per request.
  • Experiencing degraded model recall, "lost in the middle" failures, or hallucinations in long-context scenarios.
  • Architecting Retrieval-Augmented Generation (RAG) systems that need to decide between retrieval vs. long-context stuffing.
  • Optimizing token costs for applications with large system prompts, tool registries, or codebase context maps.
  • Designing multi-turn agentic loops where context accumulates across dozens of turns.

Core Concepts & Patterns

1. Context Window Capacity Map (October 2026)
Model Max Context Effective Recall Zone Cost per 1M Input Tokens Cache Discount
Gemini 4 Pro 2,097,152 ~1.8M (reliable) $1.25 75% (explicit cache)
Gemini 4 Flash 1,048,576 ~900k $0.075 75%
Claude 5.5 Opus 500,000 ~450k $15.00 90% (prompt cache)
Claude 5.5 Sonnet 200,000 ~180k $3.00 90%
GPT Astra 6 256,000 ~220k $5.00 50% (prefix cache)

Read the full file on GitHub · 303 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago Changed 068750eaef93
  2. 13d ago First seen · 303 lines · 124 tokens per session scan A 72c6a284d4f2

Subscribe to this mod's changes

context-window-engineer is a skill published in the GitHub repository roedyrustam/vibes-plug (75 stars, last pushed yesterday), licensed MIT. It adds 124 tokens to every session and 3,747 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-04.