context-window-engineer

context-window-engineer is a skill for Cursor from roedyrustam/vibes-plug. It costs 38 tokens per session (5,135 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 Cursor

Written for Cursor: shipped in a Cursor plugin. Also seen: positional $N argument.

Part of the vibes-plug plugin — 179 skills, 9 agents, 2 MCP servers shipped together

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: Cursor.

Or install vibes-plug, the plugin that ships this one along with the rest of its 179 skills, 9 agents, 2 MCP servers.

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 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,135 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.00038 $0.05135
Opus 5.5 $0.00015 $0.02054
Sonnet 5.5 $0.00008 $0.01027
Haiku 4.5 $0.00004 $0.00513

Measured 12d ago against content hash 3571b5bd56f9, 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 12d 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.

.cursor/skills/context-window-engineer/SKILL.md · 331 lines

How it starts

The opening of the file, as written. The whole thing — 331 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

  • Upstream & Orchestration: zero-to-prod-orchestrator (Phase 4 AI integration), brainstorming, session-memory-manager (context zone snapshots & handoff).
  • Prefix Locking & Model Cascading: kv-cache-prefix-optimizer (Zone 1-2 cache boundary alignment), adaptive-model-cascade (overflow routing across model sizes), llm-finops-router (per-zone token cost accounting).
  • Frontier LLMs & Model Boosters: frontier-ai-models-expert (2M+ token recall curves), gemini-agent-booster (Google 2M+ native context caching), vercel-ai-sdk-expert (context streaming & tools).
  • Research & Deep Ingestion: deep-research-analyst (retrieval-augmented injection), vector-db-rag-expert (retrieval vs context stuffing decisions).

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 (Late-2026 Frontier Models)
Model Tier Max Context Effective Recall Zone Cost per 1M Input Tokens Cache Discount
Gemini 4 Argon Medium 2,097,152 ~1.9M (monolithic) $0.80 75% (native context caching)
Gemini 4 Pro High 2,097,152–10M ~1.8M (reliable) $1.25 75% (explicit cache)
Gemini 3.8 Flash (Fallback) Fast/Medium 1,048,576 ~900k $0.10 75% (native context caching)
Claude Opus 5.5 Medium 500,000 ~480k $10.00 90% (prompt cache)
Claude Opus 4.6 (Fallback) Medium 200,000 ~180k $8.00 90% (prompt cache)
Claude Sonnet 5.5 High 500,000 ~480k $3.00 90% (prompt cache)
Claude Fable 5.1 High 500,000 ~480k $2.50 90% (prompt cache)
GPT-5.6 Sol Medium 500,000 ~450k $1.50 50% (prefix cache)
Grok 4.7 High Fast High Fast 256,000 ~240k $0.50 80% (prompt cache)
Composer 2.5 Fast Fast 200,000 ~180k $0.30 80% (AST diff cache)

Read the full file on GitHub · 331 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. 12d ago Changed 3571b5bd56f9
  2. 17d ago Changed · +10 lines bab910607fac
  3. 26d ago Changed · +41 lines · -86 tokens per session 8dec0cb9de86
  4. 1mo ago Changed · -24 lines 74e4790e1448
  5. 1mo ago Changed · +1 lines 9ce580e5c3ee
  6. 1mo ago Changed 05a693d47741
  7. 1mo ago Changed 068750eaef93
  8. 1mo 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 (131 stars, last pushed 5d ago), licensed MIT. It adds 38 tokens to every session and 5,135 once invoked, about $0.0002 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.

Related

context-window-engineer compared with skills from other repositories

context-window-engineer next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
context-window-engineerroedyrustam/vibes-plugSkill1315d agoMITA38Cursor
ai-engineering-toolkitsickn33/agentic-awesome-skillsSkill51kyesterdayMITA47Claude Code
rag-and-memoryDevelopersGlobal/ai-agent-skillsSkill2217d agoMITA36Claude Code, Codex
ai-engineering-toolkitlingxling/awesome-skills-cnSkill3421mo agoMITA47Claude Code
ai-engineering-toolkitmarysatasselshaped667/skills-collection-1Skill11mo agoMITA47Claude Code, Codex
rag-builderAtulPurohit/Antigravity-Awesome-SkillsSkill64mo agononeA25Claude Code, Codex
ai-prompt-regression-testingsickn33/agentic-awesome-skillsSkill51kyesterdayMITA37Claude Code