context-mode: keep big outputs out of the context window

Every line a command prints goes into the conversation and uses up context. A single long test run can crowd out everything else. context-mode keeps the raw output aside and gives Claude only what it needs.

What’s inside: skills, hooks, MCP server. Published by: a third party, mksglu/context-mode.

How it works

Its MCP server adds tools such as ctx_execute and ctx_batch_execute. They run commands or code in a subprocess, index the full output in a local full-text search database, and return only what Claude prints or searches for.

Hooks before tool calls nudge Claude toward these tools when an output would be large, and a session-start hook explains the rules. ctx_search can pull snippets back out of the index later.

Install

/plugin marketplace add mksglu/context-mode
/plugin install context-mode@context-mode
claude plugin marketplace add mksglu/context-mode
claude plugin install context-mode@context-mode

Skip the first line if you already added the context-mode marketplace. Reload the VS Code window or restart claude afterwards. New to plugins? See the install guide in this series.

How to use it

It runs in the background. Type one of its keywords to check on it.

  • ctx stats
  • ctx doctor
  • ctx upgrade
  • ctx purge
  • Run the whole test suite and tell me what failed
  • Summarise the errors in this build log
  • ctx stats

Good use cases

  • Long test runs and build output
  • Searching large codebases or log files
  • Long sessions that would otherwise hit the context limit

When not to use it

Short outputs and file edits, where plain commands and the normal editing tools are simpler.

How we use it on Zykit