Context Mode

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

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

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-heavy command — so raw bytes stay out of the context window.

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

透過使用 context-mode MCP 工具而非直接命令,將原始資料排除在上下文視窗之外的路由規則。

功能
此技能為在 GitHub Copilot CLI 中使用 context-mode MCP 工具提供強制性路由規則。它指示代理撰寫程式碼來分析、計數、篩選、比較、搜尋、解析或轉換資料,使只有答案而非原始位元組進入上下文視窗。它還要求透過索引與沙箱執行工具進行 URL 擷取與大型檔案分析,並建議將產出寫入檔案並傳回路徑及一行描述。
適用情境
在可使用 context-mode MCP 工具且任務涉及資料密集型命令、網頁擷取或大型檔案分析的環境中使用。其目的是防止原始命令輸出或 HTTP 回應導致上下文氾濫。
執行需求
需要 GitHub Copilot CLI 並可使用 context-mode MCP 工具。不附帶指令碼,僅為說明文件。

context-mode — MANDATORY routing rules

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.

Think in Code — MANDATORY

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.

BLOCKED — do NOT use

  • curl / wget — dumps raw HTTP into context. Use ctx_fetch_and_index(url, source) then ctx_search(queries).
  • Inline HTTP (node -e "fetch(...)", python -c "requests.get(...)") — use ctx_execute(language, code); only stdout enters context.
  • Reading large files to analyze — use ctx_execute_file(path, language, code).

Tool selection

  1. GATHER: ctx_batch_execute(commands, queries) — runs all commands, auto-indexes, returns search. One call replaces dozens.
  2. PROCESS: ctx_execute / ctx_execute_file — sandbox; only stdout enters context.
  3. WEB: ctx_fetch_and_index(url, source) then ctx_search(queries) — raw HTML never enters context.
  4. SEARCH: ctx_search(queries: [...]) — all questions in one call.

Write artifacts to FILES; return a path + one-line description, not inline dumps.

來源與署名

來源:mksglu/context-mode位於configs/copilot-cli/skills/context-mode提交51a716f

授權條款: 無授權條款

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

檢舉或申請下架