MANDATORY routing rules for context-mode. Invoke whenever you analyze, count, filter, compare, search, parse, or transform data; fetch a URL; or run a data-heav
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-context-mode-19896d149d1c ,按照其中的说明把「context-mode」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
context-mode MCP tools are available in GitHub Copilot CLI. These rules protect the context window from flooding — one unrouted command can dump tens of KB into the conversation. Follow them strictly.
Analyze / count / filter / compare / search / parse / transform data: write
code via ctx_execute(language, code) and console.log() only the answer. Do
NOT read raw data into context. PROGRAM the analysis, do not COMPUTE it by
reading. One script replaces ten tool calls.
ctx_fetch_and_index(url, source) then ctx_search(queries).node -e "fetch(...)", python -c "requests.get(...)") — use
ctx_execute(language, code); only stdout enters context.ctx_execute_file(path, language, code).ctx_batch_execute(commands, queries) — runs all commands,
auto-indexes, returns search. One call replaces dozens.ctx_execute / ctx_execute_file — sandbox; only stdout enters
context.ctx_fetch_and_index(url, source) then ctx_search(queries) — raw
HTML never enters context.ctx_search(queries: [...]) — all questions in one call.Write artifacts to FILES; return a path + one-line description, not inline dumps.