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.
- Context Mode
- Claude Code
- Software and DevOps
- Beginner
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.
- 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.
-
Pick up a coding task after the chat compacts
Keep edits, tasks, and decisions in SQLite so the agent can recover them after compaction.
- 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.
-
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.
- 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.
-
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.
- 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.
How to use 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.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeContext Mode alternatives · Best AI repos for Software and DevOps
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 hot
- 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
Maintain Context Mode? Add the Featured on Deduped badge
Paste this into your README:
[](https://dedupedai.com/use-cases/mksglu-context-mode/?ref=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.
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: Harness2, iFixAi, Orca, Diagram Design, AI Memory.
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.