context-mode · mksglu, antigravity-cli — Claude Code rule: what it does, how to install
This rule routes data work through context-mode MCP tools and keeps raw files out of the conversation. Use it for analysis, search, and transformations.
Elastic-2.0 ★ 34,370 updated 2026-10-24
/plugin marketplace add mksglu/context-mode
/plugin install context-mode@context-modeWhat context-mode does
context-mode tells the agent how to handle tasks that analyze, count, filter, compare, search, parse, or transform data. It routes that work through ctx_execute, ctx_execute_file, ctx_batch_execute, ctx_fetch_and_index, ctx_search, and ctx_index, returning a derived answer, a short summary, or an artifact path instead of raw output.
The rule covers files and web content separately. ctx_execute_file loads a file into a sandbox so code can emit selected lines, values, matches, or counts. Repository reconnaissance can use one ctx_batch_execute call. Web content goes through ctx_fetch_and_index first, then ctx_search retrieves answers from the indexed source.
A full file dump through ctx_execute_file consumes the context twice: once when the result is saved and again when it is read back. Native Read and view_file remain suitable for exact edits, while analysis and exploration are routed through context-mode.
What it helps with
- count and filter values in a file
- find matches without dumping the whole file
- compare several command results in one batch
- index web content for later queries
- return a derived answer instead of raw output
Example prompts for the agent
- Analyze the file and return only the requested values and match count.
- Run the repository checks as one batch and show the derived findings, not raw command output.
- Fetch the web page, index its content, and answer these queries from the indexed source.
How to install context-mode
1Plugin marketplace
/plugin marketplace add mksglu/context-mode/plugin install context-mode@context-mode2Manually: put the files in place
.claude/rules/context-mode.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/context-mode.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/context-mode.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/context-mode.mdManually: put the files in place
.clinerules/context-mode.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about context-mode
How do I install context-mode in Claude Code?
Run /plugin marketplace add mksglu/context-mode, then /plugin install context-mode@context-mode, and add the rule at .claude/rules/context-mode.md.
What does context-mode do?
The rule routes analysis, search, counting, and data transformation through context-mode MCP tools. The conversation receives the processed result rather than a full file or raw HTML dump.
Which platforms does context-mode support?
The rule targets Claude Code and Codex. MCP calls use context-mode/<tool> or the generic call_mcp_tool wrapper.
Similar IDE rules
All IDE rules for Agent setup: memory, context, orchestration →context-mode by other authors comes first.