context-mode
できること
このスキルは、AIエージェントがコードを調べたり、ファイルを検索したり、重いコマンドを実行したりするときに context-mode のツールを使う方法を説明します。Antigravity CLI に context-mode のツールを入れている人向けです。
使う場面
- ✓エージェントがコードベースを調べたり、分析のために多くのファイルを読んだりしているとき。
- ✓大量のデータを数えたり、比較したり、解析したりする作業があるとき。
- ✓会話を埋めずに、Webの内容を取得して検索する必要がある場合。
スキルのリンク
https://github.com/mksglu/context-mode/blob/main/configs/antigravity-cli/skills/context-mode/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“このコードベースを調べて、会話を大量の出力で埋めずに TODO コメントの数を数えてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このスキルは、コードを実行するサンドボックスや、大きな内容用のローカル検索インデックスなど、context-mode のツールを使うよう指示します。エージェントは、すべてを会話に読み込む代わりに、これらを直接使います。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)を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.
よくある質問
どのツールを使いますか?
サンドボックスでのコード実行、ファイルのインデックス作成、検索、Webページの取得など、context-mode のツールを使います。
特別な設定は必要ですか?
はい。context-mode のツールを入れ、Antigravity CLI で使えるようにしておく必要があります。
なぜ出力を短くするのですか?
最終的な答えだけを表示すると、会話が集中し、生の大きな出力を避けられます。
詳細
作者による元の説明
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
人気
- GitHubのスター
- 33k
- ランキング
- #8508
- ライセンス
- —
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
context-mode
33kエージェントが、データ量の多い作業をサンドボックスで実行し、最終的な答えだけを表示できるよう支援します。生のファイルやWebページで会話が埋まらないようにします。
context-mode
33kエージェントが、ログ、JSON、ビルド結果など出力が大きくなりうる場合に、通常のシェルコマンドではなく context-mode のツールを使えるよう支援します。
ctx-doctor
33kcontext-mode の診断を実行し、ランタイム、フック、検索ストレージ、プラグインの設定、バージョンを確認して、合格か不合格かを明確に示します。
ctx-index
33kエージェントがローカルのプロジェクトやフォルダを検索可能なストアに登録できるよう支援します。後の質問で全ファイルを読み直さずに、適切な箇所が見つかります。
似ているスキル
add-model-provider
394k安全なセットアップコマンドで新しいAIモデルプロバイダーをOpenClawに接続し、APIキーを平文で残さず、ライブテストを行うようエージェントを支援します。
acp-router
394kClaude CodeやCursorなどのコーディングアシスタントに、OpenClaw経由でタスクを渡し、その作業がそのツール内で行われるようエージェントを支援します。
browser-automation
394kログイン、タブ、応答しなくなったページからの復旧を含め、Webページを段階的に操作するようエージェントに教えます。