# Context Mode Routing

Routes file reads, searches, and data-heavy commands through context-mode tools.

- Repository: https://github.com/mksglu/context-mode (33152 stars)
- Category: AI and agents
- License: see repository
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add mksglu/context-mode --skill context-mode -g -a claude-code -y`
Codex: `npx skills add mksglu/context-mode --skill context-mode -g -a codex -y`
Cursor: `npx skills add mksglu/context-mode --skill context-mode -g -a cursor -y`
Gemini CLI: `npx skills add mksglu/context-mode --skill context-mode -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add mksglu/context-mode`

## Description

Mandatory routing rules for Antigravity CLI. Invoke when exploring a codebase, reading files for analysis, listing context-mode tools, searching, parsing, counting, comparing, summarizing, fetching web content, or running data-heavy commands.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# context-mode for Antigravity CLI

context-mode MCP tools are available in agy as `context-mode/<tool>`.
Use these tools directly. Do not inspect cached schema files under
`~/.gemini/antigravity-cli/mcp/context-mode/*.json`, and do not run
`ctx_execute` just to discover tool names or schemas.

If agy uses the generic MCP wrapper, call `call_mcp_tool` with:

- `ServerName`: `"context-mode"`
- `ToolName`: one of the tool names below
- `Arguments`: the JSON arguments for that tool

## Tool List

- `context-mode/ctx_execute`: run JavaScript, TypeScript, Python, shell, or
  other code in a sandbox. Print only the final answer.
- `context-mode/ctx_execute_file`: read one file into `FILE_CONTENT` inside the
  sandbox and run code over it. This is the context-mode file-read surface.
- `context-mode/ctx_batch_execute`: run multiple repository commands in one
  batch, index large output, and answer follow-up queries.
- `context-mode/ctx_index`: store a file, directory, or content in the local
  FTS5 knowledge base for later search.
- `context-mode/ctx_search`: search indexed content and captured session
  memory. Batch related questions in `queries`.
- `context-mode/ctx_fetch_and_index`: fetch web content, store it, then query
  with `ctx_search`.
- `context-mode/ctx_stats`: show context savings and current-session stats.
- `context-mode/ctx_doctor`: diagnose context-mode runtime and hook health.
- `context-mode/ctx_upgrade`: provide upgrade or repair guidance.
- `context-mode/ctx_purge`: purge stored context-mode knowledge after
  confirmation.
- `context-mode/ctx_insight`: launch or report the Insight analytics app.

When the user asks "what context-mode tools are available", answer from this
list. Do not list `~/.gemini/antigravity-cli/mcp/context-mode` and do not read
the JSON schema files.

## File Reading

There is no separate `ctx_read` tool. Use `context-mode/ctx_execute_file` for
file reads that analyze, summarize, extract, count, filter, or compare.

The rest: https://github.com/mksglu/context-mode/blob/HEAD/configs/antigravity-cli/skills/context-mode/SKILL.md
