Context efficiency

From Esposter/Esposter · View interactive version

Context efficiency is an AI agent skill from the GitHub repository Esposter/Esposter. Apply when a task spans many files, when waiting on an external process from the shell, when a check fails in files the change never touched, when deciding what to pull into the session, or before writing file content that holds a backslash. Esposter context and turn efficiency — what the main sessi

How to use this skill

Skill file

Context Efficiency

The main session's context is the scarce resource. These are the habits that stop it being spent on things that carry no judgment. Which command to run and from where is the package-scripts skill; whether work goes to a subagent and on which family is the llm-delegation skill; when a check runs and how the session waits on it is the running-checks skill. This skill is only about what the main session reads, waits on, and re-does.

Keep dumps out of the session

Wait on a condition, never a sleep

This is about waiting on an external process from the shell — a dev server, a build, a deploy. It is not a loosening of the polling ban, which is about code and tests: inside the repo, a wait is an awaited signal, never a retry loop (the testing skill, references/polling.md, and openspec/specs/architecture/no-polling/design.md). Nothing here may be copied into a test. And it is never for a check the session itself started: a backgrounded check announces its own completion, and polling it is the failure running-checks exists to stop.

Wait until the thing you need is actually true — the harness's Monitor tool with an until-condition, since the Bash tool blocks a foreground sleep. A fixed sleep is wrong in both directions — wasted when the work finished early, a false failure when it didn't. This matters most where "done" lies: a server can answer while still building its client bundle, and async UI resolves long after the document reports complete. Poll the state you care about, not a proxy for it.

Diff against a clean tree before chasing an error

The question is never "are there errors" but "does my change add errors" — rebuild stale packages first, and compare against the commit before the change, never HEAD (references/pre-existing-errors.md).

Write backslashes with Write or Edit

A backslash crossing a tool parameter, a shell and an interpreter is eaten or decoded silently — \u, \n and a Windows path's \\ alike — so content holding one is written with Write or Edit and its bytes checked with cat -A, and a Windows path is built with path.win32.join (references/escapes-through-tools.md).

Reference pages

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.