context-sweet-spot

Installation
SKILL.md

Find the Context Size Where Your Sessions Stop Paying

This skill answers one question with the user's own data: at what context size do their coding-agent sessions become a bad deal? Long context is not free even when it fits the window: every cache rebuild re-bills the whole context at write rates, compactions burn turns, and models degrade before their window ends. The sweet spot is where those costs start outrunning the value of the carried context. It is read-only on the platform. Locally it writes a trace export while it works and deletes it again, and leaves one report file behind.

Step 1: Set up the LangWatch CLI

Use the langwatch CLI for everything: documentation (langwatch docs ..., langwatch scenario-docs ...) and platform operations (prompts, scenarios, evaluators, datasets, monitors, traces, analytics). Install it once with npm install -g langwatch, then run the langwatch binary directly; an unpinned npx langwatch re-resolves the package from the registry on every run.

Coding-agent sessions live in the user's personal LangWatch workspace by default. On a laptop langwatch login --device signs this machine in. A project key in LANGWATCH_API_KEY stands in for that login only for its own project: it refuses --project for any other, so reaching a team project still needs langwatch login --device. Add --project <slug> on the read commands when the sessions live in a team project instead.

Use langwatch docs <path> to read documentation as Markdown. Some useful entry points:

langwatch docs                                    # Docs index
langwatch docs integration/python/guide           # Python integration
langwatch docs integration/typescript/guide       # TypeScript integration
langwatch docs prompt-management/cli              # Prompts CLI
langwatch scenario-docs                           # Scenario docs index
Installs
19
GitHub Stars
3
First Seen
Sep 3, 2026