# context-mode

A rules file that tells the agent when to run code in the context-mode sandbox instead of pasting files and command output into the chat.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf (Devin Desktop), Claude.ai · ★ 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/skills/context-mode/SKILL.md
- Updated: 2026-10-24
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/mert-koseoglu-context-mode

## What it does

The skill works as a routing sheet. It tells the agent which context-mode MCP tool to call for a given job: `ctx_execute` for a quick computation in the sandbox, `ctx_execute_file` when a file has to be measured, filtered or summarised through code rather than dropped into the conversation.

A whole repository can be swept with a single `ctx_batch_execute` call instead of a long chain of `ListDir`, `Read` or `Grep` calls. `ctx_index` and `ctx_search` keep material around for later questions, and `ctx_fetch_and_index` puts a web page into that same store. When the CLI goes through its generic MCP wrapper, the call arrives as `call_mcp_tool` with `ServerName`, `ToolName` and `Arguments`.

The rules also close a few detours: no reading cached schema JSON under `~/.gemini/antigravity-cli/mcp/context-mode/*.json`, and no `ctx_execute` run just to learn tool names. Native file reading is left for edits that need exact bytes. The tools belong to the context-mode MCP server, so the skill only decides when they get used, and it has nothing to point at until that server is connected. License: Elastic-2.0.

## 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
```
This installs the whole context-mode plugin with all its skills

2. **Skills CLI (Vercel)**
```bash
npx skills add mksglu/context-mode --skill context-mode -a claude-code
```

3. **Manually: put the files in place**
- File: `~/.claude/skills/context-mode/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/context-mode/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add mksglu/context-mode --skill context-mode -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/context-mode/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add mksglu/context-mode --skill context-mode -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/context-mode/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install mksglu/context-mode configs/antigravity-cli/skills/context-mode
```

2. **Manually: put the files in place**
- File: `.github/skills/context-mode/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add mksglu/context-mode --skill context-mode -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/mksglu/context-mode --path configs/antigravity-cli/skills/context-mode
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/context-mode/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

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/skills/context-mode/SKILL.md

## When to use it
- count matches in a file without pasting the whole file
- sweep a repository with one batched call instead of a chain of `Grep` runs
- index a docs folder so later questions can search it
- pull a web page into the local index and query it
- see how much context a session has saved

## Example prompts
- Count how many lines in `README.md` mention config, and don't dump the file.
- Index the `docs` folder, then search it for the config format.
- Collect every `TODO` in the repo with one batched run.

## Similar
- [mcp-code-execution-mode](https://affpapa.org/en/nevibecode/skills/mcp-code-execution-mode.md) — skill · 174 installs
- [api-test-mode-design](https://affpapa.org/en/nevibecode/skills/api-test-mode-design.md) — skill · 10400 installs
- [bmad-project-context](https://affpapa.org/en/nevibecode/skills/bmad-project-context.md) — skill · 17200 installs
- [context-engineering-collection](https://affpapa.org/en/nevibecode/skills/context-engineering-collection.md) — skill · 4500 installs
- [maintaining-agent-context](https://affpapa.org/en/nevibecode/skills/maintaining-agent-context.md) — skill · 3200 installs
- [domain-context](https://affpapa.org/en/nevibecode/skills/domain-context.md) — skill · 2700 installs

## Other versions with the same name
- [context-mode · mksglu](https://affpapa.org/en/nevibecode/skills/context-mode.md) — 3000 installs
- [context-mode · mksglu](https://affpapa.org/en/nevibecode/skills/context-mode-2.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
