Context Mode

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

by mksglu51a716fd2be075fc71610f876f44ea6895b46970No license25K starsListed Oct 9, 2026Updated Oct 9, 2026Repository updated today

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.

Instructions onlyAI & Agents
AI-generated overview

Routing rules that keep raw data out of the context window by using context-mode MCP tools instead of direct commands.

What it does
This skill provides mandatory routing rules for using context-mode MCP tools in GitHub Copilot CLI. It instructs the agent to write code for analyzing, counting, filtering, comparing, searching, parsing, or transforming data so that only the answer, not raw bytes, enters the context window. It also directs URL fetching and large-file analysis through indexing and sandboxed execution tools, and recommends writing artifacts to files and returning a path with a one-line description.
When to use it
Use it when working in an environment where context-mode MCP tools are available and tasks involve data-heavy commands, web fetching, or large-file analysis. It is meant to prevent context flooding from raw command output or HTTP responses.
Requirements
Requires GitHub Copilot CLI with context-mode MCP tools available. It ships no scripts and is instructions only.

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.

Source and attribution

Source:mksglu/context-modeinconfigs/copilot-cli/skills/context-modeat commit51a716f

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal