Context Mode

mksglu/context-mode/configs/antigravity-cli/skills/context-mode

作者 mksglua6c43765d26b無授權條款25K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫今天更新

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.

僅含說明AI & Agents
AI 產生的概覽

在 Antigravity CLI 中使用 context-mode MCP 工具進行檔案讀取、程式碼庫探索、索引與搜尋的路由規則。

功能
此技能是一份純說明文件,指導代理如何在 Antigravity CLI 中呼叫 context-mode MCP 工具,既可直接使用 context-mode/ ,也可透過通用 MCP 包裝器呼叫。它列出可用工具,例如 ctx_execute、ctx_execute_file、ctx_batch_execute、ctx_index、ctx_search、ctx_fetch_and_index、ctx_stats、ctx_doctor、ctx_upgrade、ctx_purge 和 ctx_insight,並說明各自用途。它也規範檔案讀取、程式碼庫探索與回答風格的規則,傾向輸出精煉的衍生結果而非原始傾印。
適用情境
適用於在 Antigravity CLI 中讀取或分析檔案、探索程式碼庫、索引或搜尋內容、擷取網頁,或檢查 context-mode 執行環境健康狀況的情境。也用於回答有哪些 context-mode 工具可用。它不適用於需要在對話中保留精確位元組的編輯操作,也不適用於檢視已知的小範圍內容。
執行需求
不附帶指令碼,僅為說明文件。它假定 Antigravity CLI(agy)中已提供 context-mode MCP 伺服器及其工具,並具備本機 FTS5 知識庫;擷取網頁內容需要網路存取。

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.

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:

json
{  "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.

來源與署名

來源:mksglu/context-mode位於configs/antigravity-cli/skills/context-mode提交a6c4376

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架