What do you want to do?
5 use cases
-
Keep large tool output out of Claude Code's context
Install the Claude Code plugin so sandbox tools handle big outputs instead of the chat window.
View prompt
In the context-mode repo, install the Claude Code plugin with the two /plugin commands in the README, then run /context-mode:ctx-doctor. Report whether every check shows [x]. Then run /context-mode:ctx-stats and report the savings ratio for the session.
-
Count or summarize code with one script, not many reads
Have the agent write a short script that prints only the result, using ctx_execute.
- REPO
mksglu/context-mode - Claude Code
- Software and DevOps
- Intermediate
View prompt
Using the context-mode ctx_execute tool, write a javascript script that lists each .ts file in <target-directory> with its line count and prints only those lines. Return the printed output and confirm the count for one file by reading it directly.
- REPO
-
Pick up a coding task after the chat compacts
Keep edits, tasks, and decisions in SQLite so the agent can recover them after compaction.
- REPO
mksglu/context-mode - Claude Code
- Software and DevOps
- Intermediate
View prompt
After a context compaction in the <project-name> repo, use context-mode to search the session events for the last edited files and open tasks. List them and ask me to confirm before continuing the work.
- REPO
-
Index a local docs folder and search it from the chat
Add a local file or folder to the FTS5 knowledge base and query it later.
- REPO
mksglu/context-mode - Claude Code
- Software and DevOps
- Intermediate
View prompt
Index the folder <docs-path> with the context-mode ctx-index command, then search it with ctx-search for <question>. Return the matching passages with their source file names and confirm that each passage appears in the original file.
- REPO
-
Add Context Mode to Gemini CLI with one settings file
Install the npm package and register the MCP server and four hooks in settings.json.
- REPO
mksglu/context-mode - Gemini CLI
- Software and DevOps
- Intermediate
View prompt
Install context-mode globally with npm, add the Gemini CLI settings from the context-mode README to ~/.gemini/settings.json, then run /mcp list in Gemini CLI. Report whether context-mode shows as Connected and list the four hooks that are registered.
- REPO
What people are building with Context Mode
-
Hands-onHacker News
Runs an agent on Hetzner with context-mode as one of its most useful skills
The author set up an agent on a Hetzner server with its own email account and installed a few skills, finding last30days and context-mode the most useful so far.
By piotraleksander on Hacker News
-
Hands-onReddit
Runs three coding agents almost around the clock with Context Mode and never hits Codex limits
For large backend, frontend and AWS infrastructure work, the author uses the Context Mode MCP server to keep MCP tool output out of the context window. On a Pro Lite plan they report never hitting the limit or needing a banked reset.
By u/Entire_Quote on Reddit
-
TutorialReddit
Wired Context Mode into Google Antigravity as an MCP server to keep tool output out of context
The post walks through installing context-mode from npm, adding it to Antigravity's MCP config, checking it with ctx stats and adding a GEMINI.md routing file so the agent sends noisy tool output through it.
Context Mode on GitHubTry it: Add Context Mode to Gemini CLI with one settings file
By u/SuperDaveWho on Reddit
Real builds shared on X, Hacker News, Reddit, DEV and GitHub, summed up by Deduped from each post and its links; each card links to the original post. See what people are building with other repos
Quick start with Context Mode
- Check you have what it needs: Claude Code v1.0.33+ for the plugin install, or Node.js >= 22.5 (or Bun) for the Gemini CLI setup; An existing AI coding agent session in a project you want to work on.
- Open mksglu/context-mode on GitHub and read the README and license.
- Run
/plugin marketplace add mksglu/context-modein Claude Code. - Run
/plugin install context-mode@context-mode. - Restart Claude Code or run
/reload-plugins. - Run
/context-mode:ctx-doctorand confirm all checks show[x].
These steps come from our top use case, Keep large tool output out of Claude Code's context, which also has a copy-paste agent prompt.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for mksglu/context-mode
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeBest AI repos for Software and DevOps · Compared in: Best open-source AI repos for long-term memory for AI agents · Best open-source AI repos for cutting coding agent token usage · Best open-source AI repos for MCP servers
About this repo
- Who it is forDevelopers who use AI coding agents on large codebases and notice their context window filling up during long sessions.
- Why it is hot34k stars on GitHub as of Nov 6, 2026, picked up by one AI source we track
- LanguageTypeScript
- Sourcegithub.com/mksglu/context-mode · Back to Hot repos
Requirements
- Claude Code v1.0.33+ for the plugin install, or Node.js >= 22.5 (or Bun) for the Gemini CLI setup
- An existing AI coding agent session in a project you want to work on
Add this badge to your README
Maintain Context Mode? Show readers where to find these use cases.
Markdown
[](https://dedupedai.com/use-cases/mksglu-context-mode/?utm_source=github&utm_medium=badge&utm_campaign=mksglu-context-mode)
HTML
<a href="https://dedupedai.com/use-cases/mksglu-context-mode/?utm_source=github&utm_medium=badge&utm_campaign=mksglu-context-mode"><img src="https://dedupedai.com/badge/mksglu/context-mode.svg" alt="Use cases on Deduped" height="20"></a>
A static image, no tracking script. About the badge
Questions about Context Mode
What is Context Mode?
Context Mode is an MCP server and hook set for AI coding agents that keeps raw tool output out of the context window, persists session memory in SQLite, and routes work across many clients. It is an open-source project on GitHub: https://github.com/mksglu/context-mode.
How do I use Context Mode?
Run /plugin marketplace add mksglu/context-mode in Claude Code; then run /plugin install context-mode@context-mode; Restart Claude Code or run /reload-plugins. The use cases on this page give the full steps and a copy-paste agent prompt for each job.
Who is Context Mode for?
Developers who use AI coding agents on large codebases and notice their context window filling up during long sessions.
What can I do with Context Mode?
5 use cases so far, for example: Keep large tool output out of Claude Code's context; Count or summarize code with one script, not many reads; Pick up a coding task after the chat compacts. Each has steps and a copy-paste agent prompt.
What do I need to run Context Mode?
Claude Code v1.0.33+ for the plugin install, or Node.js >= 22.5 (or Bun) for the Gemini CLI setup; An existing AI coding agent session in a project you want to work on.
What are alternatives to Context Mode?
Other hot AI repos in Software and DevOps: Skills, Claude Mem, Freellmapi, Andrej Karpathy Skills, Agent Desktop.
Is Context Mode safe to run?
Deduped does not own, audit or vouch for it. Read the README and license, run it on your own systems first and review every command before you run it.