forked from mksglu/context-mode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontext-mode.mdc
More file actions
27 lines (19 loc) · 1.25 KB
/
context-mode.mdc
File metadata and controls
27 lines (19 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
---
description: context-mode routing rules — context window protection
alwaysApply: true
---
# context-mode
Raw tool output floods your context window. Use context-mode MCP tools to keep raw data in the sandbox.
## Tool Selection
1. **GATHER**: `ctx_batch_execute(commands, queries)` — Primary tool for research. Runs all commands, auto-indexes, and searches. ONE call replaces many individual steps.
2. **FOLLOW-UP**: `ctx_search(queries: ["q1", "q2", ...])` — Use for all follow-up questions. ONE call, many queries.
3. **PROCESSING**: `ctx_execute(language, code)` or `ctx_execute_file(path, language, code)` — Use for API calls, log analysis, and data processing.
4. **WEB**: `ctx_fetch_and_index(url)` then `ctx_search(queries)` — Fetch, index, then query. Never dump raw HTML.
## Rules
- DO NOT use Bash for commands producing >20 lines of output — use `ctx_execute` or `ctx_batch_execute`.
- DO NOT use Read for analysis — use `ctx_execute_file`. Read IS correct for files you intend to Edit.
- DO NOT use curl/wget in terminal — use `ctx_fetch_and_index`.
- Bash is ONLY for git, mkdir, rm, mv, navigation, and short commands.
## Output
- Keep responses under 500 words.
- Write artifacts (code, configs) to FILES — never return them as inline text.