context-mode
Skill này làm gì
Skill này hướng dẫn một agent AI cách dùng công cụ context-mode khi khám phá code, tìm kiếm tệp và chạy các lệnh nặng. Skill dành cho người dùng Antigravity CLI đã cài các công cụ context-mode.
Khi nào nên dùng
- ✓Khi agent đang khám phá một codebase hoặc đọc nhiều tệp để phân tích.
- ✓Khi một tác vụ liên quan đến đếm, so sánh hoặc phân tích lượng lớn dữ liệu.
- ✓Khi một yêu cầu cần lấy và tìm kiếm nội dung web mà không làm đầy cuộc trò chuyện.
Liên kết skill
https://github.com/mksglu/context-mode/blob/main/configs/antigravity-cli/skills/context-mode/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Khám phá codebase này và đếm các chú thích TODO mà không làm ngập cuộc trò chuyện của chúng ta.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill chỉ agent đến các công cụ context-mode, như hộp cát (sandbox) để chạy code và chỉ mục tìm kiếm cục bộ cho nội dung lớn. Agent dùng trực tiếp các công cụ này thay vì đọc mọi thứ vào cuộc trò chuyện.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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.
Câu hỏi thường gặp
Nó dùng những công cụ nào?
Nó dùng các công cụ context-mode để chạy code trong hộp cát, lập chỉ mục tệp, tìm kiếm và lấy nội dung web.
Có cần cài đặt đặc biệt không?
Có. Các công cụ context-mode phải được cài và sẵn sàng trong Antigravity CLI.
Vì sao giữ đầu ra ngắn?
Chỉ in câu trả lời cuối cùng giúp cuộc trò chuyện tập trung và tránh đầu ra thô lớn.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 33k
- Vị trí xếp hạng
- #8508
- Giấy phép
- —
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
context-mode
33kDạy agent chạy công việc nặng dữ liệu trong hộp cát và chỉ in câu trả lời, để tệp thô và trang web không làm ngập cuộc trò chuyện.
context-mode
33kDạy agent dùng công cụ context-mode thay cho lệnh shell thông thường khi đầu ra có thể lớn, như log, JSON hoặc kết quả build.
ctx-doctor
33kChạy chẩn đoán context-mode để kiểm tra runtime, hook, kho tìm kiếm, plugin và phiên bản, rồi hiển thị báo cáo đạt hoặc không đạt.
ctx-index
33kCho phép agent của bạn lập chỉ mục một thư mục hoặc dự án cục bộ thành kho tìm kiếm, để các câu hỏi sau này tìm đúng đoạn mà không đọc lại mọi tệp.
Skill tương tự
add-model-provider
394kGiúp agent của bạn kết nối nhà cung cấp mô hình AI mới với OpenClaw bằng lệnh an toàn, giữ API key khỏi văn bản thuần và chạy thử.
acp-router
394kGiúp agent của bạn gửi một tác vụ đến trợ lý lập trình như Claude Code hoặc Cursor qua OpenClaw, để công việc chạy ngay trong công cụ đó.
browser-automation
394kHướng dẫn agent của bạn điều khiển trang web từng bước, gồm đăng nhập, tab và cách khôi phục khi trang ngừng phản hồi.