# context-mode

This rule routes data work through context-mode MCP tools and keeps raw files out of the conversation. Use it for analysis, search, and transformations.

- rule · `type=rule` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline · ★ 34370 repo stars
- Author: Mert Koseoğlu
- License: Elastic-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/mksglu/context-mode/tree/HEAD/configs/antigravity-cli/rules/context-mode.md
- Updated: 2026-10-24
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/rules/context-mode

## What it does

context-mode tells the agent how to handle tasks that analyze, count, filter, compare, search, parse, or transform data. It routes that work through `ctx_execute`, `ctx_execute_file`, `ctx_batch_execute`, `ctx_fetch_and_index`, `ctx_search`, and `ctx_index`, returning a derived answer, a short summary, or an artifact path instead of raw output.

The rule covers files and web content separately. `ctx_execute_file` loads a file into a sandbox so code can emit selected lines, values, matches, or counts. Repository reconnaissance can use one `ctx_batch_execute` call. Web content goes through `ctx_fetch_and_index` first, then `ctx_search` retrieves answers from the indexed source.

A full file dump through `ctx_execute_file` consumes the context twice: once when the result is saved and again when it is read back. Native `Read` and `view_file` remain suitable for exact edits, while analysis and exploration are routed through context-mode.

## Install

### Claude Code (native platform)

1. **Plugin marketplace**
In the agent chat (not a shell):
```text
/plugin marketplace add mksglu/context-mode
```
In the agent chat (not a shell):
```text
/plugin install context-mode@context-mode
```

2. **Manually: put the files in place**
- File: `.claude/rules/context-mode.md` — The paths frontmatter field limits the files

### Codex

**AGENTS.md**
- Codex reads AGENTS.md: paste the rule text there

### Cursor

**Manually: put the files in place**
- File: `.cursor/rules/context-mode.mdc` — Frontmatter: description, globs, alwaysApply

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/instructions/context-mode.instructions.md` — The applyTo field sets which files it applies to

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/rules/context-mode.md`

### Cline

**Manually: put the files in place**
- File: `.clinerules/context-mode.md`

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/mksglu/context-mode/tree/HEAD/configs/antigravity-cli/rules/context-mode.md

## When to use it
- count and filter values in a file
- find matches without dumping the whole file
- compare several command results in one batch
- index web content for later queries
- return a derived answer instead of raw output

## Example prompts
- Analyze the file and return only the requested values and match count.
- Run the repository checks as one batch and show the derived findings, not raw command output.
- Fetch the web page, index its content, and answer these queries from the indexed source.

## Similar
- [planetscale-autonomous-execution-mode](https://affpapa.org/en/nevibecode/skills/planetscale-autonomous-execution-mode.md) — skill · 2000 installs
- [platform-data-and-tooling-api-context-get](https://affpapa.org/en/nevibecode/skills/platform-data-and-tooling-api-context-get.md) — skill · 3500 installs
- [data-context-extractor](https://affpapa.org/en/nevibecode/skills/data-context-extractor.md) — skill · 3300 installs
- [Power BI Performance Expert Mode](https://affpapa.org/en/nevibecode/agents/power-bi-performance-expert-mode.md) — subagent · ★ 41430 repo stars
- [goblin-mode](https://affpapa.org/en/nevibecode/plugins/goblin-mode.md) — plugin · ★ 1104 repo stars
- [dial-your-context](https://affpapa.org/en/nevibecode/skills/dial-your-context.md) — skill · 1200 installs

## Other versions with the same name
- [context-mode · mksglu](https://affpapa.org/en/nevibecode/rules/mert-koseoglu-context-mode.md) — ★ 34370 repo stars

From the same set: [mksglu/context-mode](https://affpapa.org/en/nevibecode/by/mksglu/context-mode.md) — 14 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
