context-mode

Solid

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.

Data & Documents 20,032 stars 1444 forks Updated today NOASSERTION

Install

View on GitHub

Quality Score: 81/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
72
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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.

Details

Author
mksglu
Repository
mksglu/context-mode
Created
5 months ago
Last Updated
today
Language
TypeScript
License
NOASSERTION

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

context-mode

Context-mode is an MCP server plugin that reduces context window usage by ~98% through sandboxed tool routing. MUST be applied whenever Claude is running inside a context-mode-enabled session — it is not optional. Trigger when: context-mode MCP server is present in the session; running Bash commands that produce more than 20 lines of output; reading files for analysis; fetching web pages and searching them; batch execution of multiple queries; or when you need to prevent raw tool outputs from flooding the context window. Key capabilities: routes Bash to ctx_execute / ctx_batch_execute (captures output, prevents bloat); routes Read to ctx_execute_file (raw content never enters context); routes WebFetch to ctx_fetch_and_index then ctx_search (fetch once, query indexed content on demand); enforces strict output rules (under 500 words, write artifacts to files, return only path + 1-line description). Ideal for: working in long-running sessions with large codebases; running multi-step debugging workflows that prod

0 Updated 1 weeks ago
Tekkiiiii
Data & Documents Listed

context-mode

Use context-mode tools (ctx_execute, ctx_execute_file) instead of Bash/cat when processing large outputs. Triggers: "analyze logs", "summarize output", "process data", "parse JSON", "filter results", "extract errors", "check build output", "analyze dependencies", "process API response", "large file analysis", "page snapshot", "browser snapshot", "DOM structure", "inspect page", "accessibility tree", "Playwright snapshot", "run tests", "test output", "coverage report", "git log", "recent commits", "diff between branches", "list containers", "pod status", "disk usage", "fetch docs", "API reference", "index documentation", "call API", "check response", "query results", "find TODOs", "count lines", "codebase statistics", "security audit", "outdated packages", "dependency tree", "cloud resources", "CI/CD output". Also triggers on ANY MCP tool output that may exceed 20 lines. Subagent routing is handled automatically via PreToolUse hook.

5 Updated today
opencue
AI & Automation Listed

context-mode

Context window optimization for AI coding agents. Sandboxes tool output (98% reduction), persists session memory across compactions, and enforces routing across 17 platforms via MCP + hooks. Use when context window is filling up, tool outputs are too large, or session state needs to survive compaction. Works with Antigravity, Claude, Cursor, Codex, Copilot, OpenCode, and more. Source: https://github.com/mksglu/context-mode — MCP-layer sandboxing, local-only, no telemetry.

0 Updated 3 weeks ago
williamcorrea23