context-mode
What it does
This skill tells an AI agent how to use the context-mode tools when exploring code, searching files and running heavy commands. It is for people who use the Antigravity CLI with the context-mode tools installed.
When to use it
- ✓When an agent is exploring a codebase or reading many files for analysis.
- ✓When a task involves counting, comparing or parsing large amounts of data.
- ✓When a request needs web content fetched and searched without filling the conversation.
Skill link
https://github.com/mksglu/context-mode/blob/main/configs/antigravity-cli/skills/context-mode/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Explore this codebase and count the TODO comments without flooding our conversation.”
5 new skills a week. 1 minute to read.
How it works
The skill points the agent to the context-mode tools, such as a sandbox for running code and a local search index for large content. The agent uses them directly instead of reading everything into the conversation.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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 belowArguments: 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 intoFILE_CONTENTinside 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 inqueries.context-mode/ctx_fetch_and_index: fetch web content, store it, then query withctx_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.
Native Read / view_file is only right when editing needs exact bytes in the
conversation, or when the user explicitly asks to view a small known range.
Use JavaScript by default for lightweight file analysis:
{
"path": "README.md",
"language": "javascript",
"code": "const lines = FILE_CONTENT.split(/\\r?\\n/); console.log(lines.slice(0, 20).join('\\n'));"
}
Never print FILE_CONTENT wholesale unless the user explicitly asks for a full
file dump. Print selected lines, counts, matches, summaries, or structured
results.
Codebase Exploration
For repository exploration, prefer one context-mode/ctx_batch_execute call
instead of many native ListDir, Read, Grep, or shell calls.
For one-off computed answers, use context-mode/ctx_execute.
For one-file analysis, use context-mode/ctx_execute_file.
For durable recall across follow-up questions, use context-mode/ctx_index
with a descriptive source, then context-mode/ctx_search.
Return concise derived answers. Do not paste raw command dumps, full files, large search results, cached schemas, or raw HTML into the conversation.
FAQ
Which tools does it use?
It uses context-mode tools for sandboxed code execution, file indexing, search and web fetching.
Does it need special setup?
Yes. The context-mode tools must be installed and available in the Antigravity CLI.
Why keep output short?
Printing only the final answer keeps the conversation focused and avoids large raw outputs.
Details
Original description by the author
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.
repo: mksglu/context-mode
Popularity
- GitHub stars
- 33k
- Ranking position
- #8508
- License
- —
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
context-mode
33kTeaches your agent to run data-heavy work in a sandbox and print only the answer, so raw files and web pages do not flood the conversation.
context-mode
33kTeaches your agent to use context-mode tools instead of plain shell commands when output may be large, such as logs, JSON or build results.
ctx-doctor
33kRuns context-mode diagnostics that check runtimes, hooks, search storage, plugin setup and versions, then shows a clear pass or fail report.
ctx-index
33kLets your agent index a local project or folder into a searchable store, so later questions find the right snippets without rereading every file.
Similar skills
add-model-provider
394kLets your agent connect a new AI model provider to OpenClaw using safe setup commands, keep API keys out of plain text, and run a live test.
acp-router
394kHelps your agent send a task to a coding assistant such as Claude Code or Cursor through OpenClaw, so the work runs in that tool.
browser-automation
394kTeaches your agent to control web pages step by step, including logins, tabs, and recovery when a page stops responding.