Skip to content
Skillpedia
Agents33k Β· #8509

context-mode

What it does

This skill sets routing rules for an AI agent that uses context-mode tools in GitHub Copilot CLI. It is for people who analyze large files, logs or web pages and want their conversation kept small.

When to use it

  • βœ“When an agent needs to count, filter, compare or parse a large amount of data.
  • βœ“When a task involves fetching a web page that would otherwise dump raw HTML into the conversation.
  • βœ“When a command produces a large output that should be processed rather than read in full.

Skill link

https://github.com/mksglu/context-mode/blob/main/configs/copilot-cli/skills/context-mode/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/mksglu/context-mode/blob/main/configs/copilot-cli/skills/context-mode/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œCount the failing tests in this large log file without pasting the whole log into our chat.”

5 new skills a week. 1 minute to read.

How it works

The skill tells the agent to write code that runs in a sandbox and returns only the final answer. Large outputs are saved and searched instead of being read in full.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

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.

FAQ

Which tools does it rely on?

It relies on context-mode tools such as sandboxed code execution, batch commands, indexed search and web fetching.

Does it block normal commands?

It blocks a few commands, such as curl and wget, that dump raw output, and asks the agent to use the sandbox instead.

Do I need the context-mode tools installed?

Yes. The context-mode tools must be available in GitHub Copilot CLI for these rules to work.

Details

Original description by the author

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.

repo: mksglu/context-mode

Popularity

GitHub stars
33k
Ranking position
#8509
License
β€”
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills