context-mode 1.0.41 → 1.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/.openclaw-plugin/openclaw.plugin.json +1 -1
- package/.openclaw-plugin/package.json +1 -1
- package/README.md +380 -306
- package/build/adapters/kiro/index.d.ts +2 -2
- package/build/adapters/kiro/index.js +6 -6
- package/build/openclaw-plugin.js +1 -1
- package/build/opencode-plugin.js +1 -1
- package/build/server.js +11 -7
- package/cli.bundle.mjs +77 -77
- package/configs/codex/AGENTS.md +13 -13
- package/configs/cursor/context-mode.mdc +27 -0
- package/configs/openclaw/AGENTS.md +13 -13
- package/configs/opencode/AGENTS.md +13 -13
- package/configs/pi/AGENTS.md +13 -13
- package/configs/zed/AGENTS.md +13 -13
- package/hooks/core/routing.mjs +29 -11
- package/hooks/core/tool-naming.mjs +50 -0
- package/hooks/cursor/pretooluse.mjs +1 -1
- package/hooks/cursor/sessionstart.mjs +4 -1
- package/hooks/gemini-cli/beforetool.mjs +1 -1
- package/hooks/gemini-cli/sessionstart.mjs +4 -1
- package/hooks/kiro/pretooluse.mjs +1 -1
- package/hooks/pretooluse.mjs +1 -1
- package/hooks/routing-block.mjs +34 -8
- package/hooks/sessionstart.mjs +4 -1
- package/hooks/vscode-copilot/pretooluse.mjs +1 -1
- package/hooks/vscode-copilot/sessionstart.mjs +4 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/server.bundle.mjs +52 -52
- package/start.mjs +8 -65
- /package/configs/kiro/{mcp_config.json → mcp.json} +0 -0
package/README.md
CHANGED
|
@@ -26,284 +26,315 @@ https://github.com/user-attachments/assets/07013dbf-07c0-4ef1-974a-33ea1207637b
|
|
|
26
26
|
|
|
27
27
|
## Install
|
|
28
28
|
|
|
29
|
+
Platforms are grouped by install complexity. Hook-capable platforms get automatic routing enforcement. Non-hook platforms need a one-time routing file copy.
|
|
30
|
+
|
|
29
31
|
<details open>
|
|
30
|
-
<summary><strong>Claude Code</strong
|
|
32
|
+
<summary><strong>Claude Code</strong> — plugin marketplace, fully automatic</summary>
|
|
33
|
+
|
|
34
|
+
**Prerequisites:** Claude Code v1.0.33+ (`claude --version`). If `/plugin` is not recognized, update first: `brew upgrade claude-code` or `npm update -g @anthropic-ai/claude-code`.
|
|
31
35
|
|
|
32
|
-
**
|
|
36
|
+
**Install:**
|
|
33
37
|
|
|
34
38
|
```bash
|
|
35
39
|
/plugin marketplace add mksglu/context-mode
|
|
36
40
|
/plugin install context-mode@context-mode
|
|
37
41
|
```
|
|
38
42
|
|
|
39
|
-
|
|
43
|
+
Restart Claude Code (or run `/reload-plugins`).
|
|
44
|
+
|
|
45
|
+
**Verify:**
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
/context-mode:ctx-doctor
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
All checks should show `[x]`. The doctor validates runtimes, hooks, FTS5, and plugin registration.
|
|
40
52
|
|
|
41
|
-
|
|
42
|
-
- MCP server with 6 sandbox tools (`ctx_batch_execute`, `ctx_execute`, `ctx_execute_file`, `ctx_index`, `ctx_search`, `ctx_fetch_and_index`)
|
|
43
|
-
- PreToolUse hooks that intercept Bash, Read, WebFetch, Grep, and Task calls — nudging them toward sandbox execution
|
|
44
|
-
- PostToolUse, PreCompact, and SessionStart hooks for session tracking and context injection
|
|
45
|
-
- A `CLAUDE.md` routing instructions file auto-created in your project root
|
|
46
|
-
- Slash commands for diagnostics and upgrades (Claude Code only)
|
|
53
|
+
**Routing:** Automatic. The SessionStart hook injects routing instructions at runtime — no file is written to your project. The plugin registers all hooks (PreToolUse, PostToolUse, PreCompact, SessionStart) and 6 sandbox tools (`ctx_batch_execute`, `ctx_execute`, `ctx_execute_file`, `ctx_index`, `ctx_search`, `ctx_fetch_and_index`).
|
|
47
54
|
|
|
48
|
-
| Command | What it does |
|
|
55
|
+
| Slash Command | What it does |
|
|
49
56
|
|---|---|
|
|
50
57
|
| `/context-mode:ctx-stats` | Context savings — per-tool breakdown, tokens consumed, savings ratio. |
|
|
51
58
|
| `/context-mode:ctx-doctor` | Diagnostics — runtimes, hooks, FTS5, plugin registration, versions. |
|
|
52
59
|
| `/context-mode:ctx-upgrade` | Pull latest, rebuild, migrate cache, fix hooks. |
|
|
53
60
|
|
|
54
|
-
> **Note:** Slash commands are a Claude Code plugin feature. On other platforms,
|
|
61
|
+
> **Note:** Slash commands are a Claude Code plugin feature. On other platforms, type `ctx stats`, `ctx doctor`, or `ctx upgrade` in the chat — the model calls the MCP tool automatically. See [Utility Commands](#utility-commands).
|
|
55
62
|
|
|
56
|
-
|
|
63
|
+
<details>
|
|
64
|
+
<summary>Alternative — MCP-only install (no hooks or slash commands)</summary>
|
|
57
65
|
|
|
58
66
|
```bash
|
|
59
67
|
claude mcp add context-mode -- npx -y context-mode
|
|
60
68
|
```
|
|
61
69
|
|
|
62
|
-
This gives you the 6 sandbox tools
|
|
70
|
+
This gives you the 6 sandbox tools without automatic routing. The model can still use them — it just won't be nudged to prefer them over raw Bash/Read/WebFetch. Good for trying it out before committing to the full plugin.
|
|
71
|
+
|
|
72
|
+
</details>
|
|
63
73
|
|
|
64
74
|
</details>
|
|
65
75
|
|
|
66
76
|
<details>
|
|
67
|
-
<summary><strong>Gemini CLI</strong
|
|
77
|
+
<summary><strong>Gemini CLI</strong> — one config file, hooks included</summary>
|
|
68
78
|
|
|
69
|
-
**
|
|
79
|
+
**Prerequisites:** Node.js 18+, Gemini CLI installed.
|
|
70
80
|
|
|
71
|
-
|
|
72
|
-
npm install -g context-mode
|
|
73
|
-
```
|
|
81
|
+
**Install:**
|
|
74
82
|
|
|
75
|
-
|
|
83
|
+
1. Install context-mode globally:
|
|
76
84
|
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
"context-mode": {
|
|
81
|
-
"command": "context-mode"
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
```
|
|
85
|
+
```bash
|
|
86
|
+
npm install -g context-mode
|
|
87
|
+
```
|
|
86
88
|
|
|
87
|
-
|
|
89
|
+
2. Add the following to `~/.gemini/settings.json`. This single file registers the MCP server and all four hooks:
|
|
88
90
|
|
|
89
|
-
```json
|
|
90
|
-
{
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
91
|
+
```json
|
|
92
|
+
{
|
|
93
|
+
"mcpServers": {
|
|
94
|
+
"context-mode": {
|
|
95
|
+
"command": "context-mode"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"hooks": {
|
|
99
|
+
"BeforeTool": [
|
|
100
|
+
{
|
|
101
|
+
"matcher": "run_shell_command|read_file|read_many_files|grep_search|search_file_content|web_fetch|activate_skill|mcp__plugin_context-mode",
|
|
102
|
+
"hooks": [{ "type": "command", "command": "context-mode hook gemini-cli beforetool" }]
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
"AfterTool": [
|
|
106
|
+
{
|
|
107
|
+
"matcher": "",
|
|
108
|
+
"hooks": [{ "type": "command", "command": "context-mode hook gemini-cli aftertool" }]
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
"PreCompress": [
|
|
112
|
+
{
|
|
113
|
+
"matcher": "",
|
|
114
|
+
"hooks": [{ "type": "command", "command": "context-mode hook gemini-cli precompress" }]
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
"SessionStart": [
|
|
118
|
+
{
|
|
119
|
+
"matcher": "",
|
|
120
|
+
"hooks": [{ "type": "command", "command": "context-mode hook gemini-cli sessionstart" }]
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
3. Restart Gemini CLI.
|
|
128
|
+
|
|
129
|
+
**Verify:**
|
|
113
130
|
|
|
114
|
-
|
|
131
|
+
```
|
|
132
|
+
/mcp list
|
|
133
|
+
```
|
|
115
134
|
|
|
116
|
-
|
|
117
|
-
- **File exists without context-mode rules** — routing instructions are appended after your existing content.
|
|
118
|
-
- **File already contains context-mode rules** — skipped (idempotent, no duplicate content).
|
|
135
|
+
You should see `context-mode: ... - Connected`.
|
|
119
136
|
|
|
120
|
-
|
|
137
|
+
**Routing:** Automatic. The SessionStart hook injects routing instructions at runtime — no `GEMINI.md` file is written to your project. All four hooks (BeforeTool, AfterTool, PreCompress, SessionStart) handle enforcement programmatically.
|
|
121
138
|
|
|
122
|
-
> **Why
|
|
139
|
+
> **Why the BeforeTool matcher?** It targets only tools that produce large output (`run_shell_command`, `read_file`, `read_many_files`, `grep_search`, `search_file_content`, `web_fetch`, `activate_skill`) plus context-mode's own tools (`mcp__plugin_context-mode`). This avoids unnecessary hook overhead on lightweight tools while intercepting every tool that could flood your context window.
|
|
123
140
|
|
|
124
|
-
Full
|
|
141
|
+
Full config reference: [`configs/gemini-cli/settings.json`](configs/gemini-cli/settings.json)
|
|
125
142
|
|
|
126
143
|
</details>
|
|
127
144
|
|
|
128
145
|
<details>
|
|
129
|
-
<summary><strong>VS Code Copilot</strong
|
|
146
|
+
<summary><strong>VS Code Copilot</strong> — hooks with SessionStart</summary>
|
|
130
147
|
|
|
131
|
-
**
|
|
148
|
+
**Prerequisites:** Node.js 18+, VS Code with Copilot Chat v0.32+.
|
|
132
149
|
|
|
133
|
-
|
|
134
|
-
npm install -g context-mode
|
|
135
|
-
```
|
|
150
|
+
**Install:**
|
|
136
151
|
|
|
137
|
-
|
|
152
|
+
1. Install context-mode globally:
|
|
138
153
|
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
"context-mode": {
|
|
143
|
-
"command": "context-mode"
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
```
|
|
154
|
+
```bash
|
|
155
|
+
npm install -g context-mode
|
|
156
|
+
```
|
|
148
157
|
|
|
149
|
-
|
|
158
|
+
2. Create `.vscode/mcp.json` in your project root:
|
|
150
159
|
|
|
151
|
-
```json
|
|
152
|
-
{
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
]
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
```
|
|
160
|
+
```json
|
|
161
|
+
{
|
|
162
|
+
"servers": {
|
|
163
|
+
"context-mode": {
|
|
164
|
+
"command": "context-mode"
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
3. Create `.github/hooks/context-mode.json`:
|
|
166
171
|
|
|
167
|
-
|
|
172
|
+
```json
|
|
173
|
+
{
|
|
174
|
+
"hooks": {
|
|
175
|
+
"PreToolUse": [
|
|
176
|
+
{ "type": "command", "command": "context-mode hook vscode-copilot pretooluse" }
|
|
177
|
+
],
|
|
178
|
+
"PostToolUse": [
|
|
179
|
+
{ "type": "command", "command": "context-mode hook vscode-copilot posttooluse" }
|
|
180
|
+
],
|
|
181
|
+
"SessionStart": [
|
|
182
|
+
{ "type": "command", "command": "context-mode hook vscode-copilot sessionstart" }
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
```
|
|
168
187
|
|
|
169
|
-
|
|
170
|
-
- **File exists without context-mode rules** — routing instructions are appended after your existing content, preserving project-level coding standards.
|
|
171
|
-
- **File already contains context-mode rules** — skipped (idempotent, no duplicate content).
|
|
188
|
+
4. Restart VS Code.
|
|
172
189
|
|
|
173
|
-
|
|
190
|
+
**Verify:** Open Copilot Chat and type `ctx stats`. Context-mode tools should appear and respond.
|
|
174
191
|
|
|
175
|
-
|
|
192
|
+
**Routing:** Automatic. The SessionStart hook injects routing instructions at runtime — no `copilot-instructions.md` file is written to your project.
|
|
176
193
|
|
|
177
194
|
Full hook config including PreCompact: [`configs/vscode-copilot/hooks.json`](configs/vscode-copilot/hooks.json)
|
|
178
195
|
|
|
179
196
|
</details>
|
|
180
197
|
|
|
181
198
|
<details>
|
|
182
|
-
<summary><strong>Cursor</strong
|
|
199
|
+
<summary><strong>Cursor</strong> — hooks without SessionStart</summary>
|
|
183
200
|
|
|
184
|
-
**
|
|
201
|
+
**Prerequisites:** Node.js 18+, Cursor with agent mode.
|
|
185
202
|
|
|
186
|
-
|
|
187
|
-
npm install -g context-mode
|
|
188
|
-
```
|
|
203
|
+
**Install:**
|
|
189
204
|
|
|
190
|
-
|
|
205
|
+
1. Install context-mode globally:
|
|
191
206
|
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
"context-mode": {
|
|
196
|
-
"command": "context-mode"
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
```
|
|
207
|
+
```bash
|
|
208
|
+
npm install -g context-mode
|
|
209
|
+
```
|
|
201
210
|
|
|
202
|
-
|
|
211
|
+
2. Create `.cursor/mcp.json` in your project root (or `~/.cursor/mcp.json` for global):
|
|
203
212
|
|
|
204
|
-
```json
|
|
205
|
-
{
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
],
|
|
214
|
-
"postToolUse": [
|
|
215
|
-
{
|
|
216
|
-
"command": "context-mode hook cursor posttooluse"
|
|
217
|
-
}
|
|
218
|
-
]
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
```
|
|
213
|
+
```json
|
|
214
|
+
{
|
|
215
|
+
"mcpServers": {
|
|
216
|
+
"context-mode": {
|
|
217
|
+
"command": "context-mode"
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
```
|
|
222
222
|
|
|
223
|
-
|
|
223
|
+
3. Create `.cursor/hooks.json` (or `~/.cursor/hooks.json` for global):
|
|
224
224
|
|
|
225
|
-
|
|
225
|
+
```json
|
|
226
|
+
{
|
|
227
|
+
"version": 1,
|
|
228
|
+
"hooks": {
|
|
229
|
+
"preToolUse": [
|
|
230
|
+
{
|
|
231
|
+
"command": "context-mode hook cursor pretooluse",
|
|
232
|
+
"matcher": "Shell|Read|Grep|WebFetch|Task|MCP:ctx_execute|MCP:ctx_execute_file|MCP:ctx_batch_execute"
|
|
233
|
+
}
|
|
234
|
+
],
|
|
235
|
+
"postToolUse": [
|
|
236
|
+
{
|
|
237
|
+
"command": "context-mode hook cursor posttooluse"
|
|
238
|
+
}
|
|
239
|
+
]
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
```
|
|
226
243
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
244
|
+
The `preToolUse` matcher is optional — without it, the hook fires on all tools.
|
|
245
|
+
|
|
246
|
+
4. Copy the routing rules file. Cursor lacks a SessionStart hook, so the model needs a rules file for routing awareness:
|
|
247
|
+
|
|
248
|
+
```bash
|
|
249
|
+
mkdir -p .cursor/rules
|
|
250
|
+
cp node_modules/context-mode/configs/cursor/context-mode.mdc .cursor/rules/context-mode.mdc
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
5. Restart Cursor or open a new agent session.
|
|
254
|
+
|
|
255
|
+
**Verify:** Open Cursor Settings > MCP and confirm "context-mode" shows as connected. In agent chat, type `ctx stats`.
|
|
256
|
+
|
|
257
|
+
**Routing:** Hooks enforce routing programmatically via `preToolUse`/`postToolUse`. The `.cursor/rules/context-mode.mdc` file provides routing instructions at session start since Cursor's `sessionStart` hook is currently rejected by their validator ([forum report](https://forum.cursor.com/t/unknown-hook-type-sessionstart/149566)). Project `.cursor/hooks.json` overrides `~/.cursor/hooks.json`.
|
|
230
258
|
|
|
231
|
-
Full
|
|
232
|
-
Example MCP registration: [`configs/cursor/mcp.json`](configs/cursor/mcp.json)
|
|
259
|
+
Full configs: [`configs/cursor/hooks.json`](configs/cursor/hooks.json) | [`configs/cursor/mcp.json`](configs/cursor/mcp.json) | [`configs/cursor/context-mode.mdc`](configs/cursor/context-mode.mdc)
|
|
233
260
|
|
|
234
261
|
</details>
|
|
235
262
|
|
|
236
263
|
<details>
|
|
237
|
-
<summary><strong>OpenCode</strong
|
|
264
|
+
<summary><strong>OpenCode</strong> — TypeScript plugin with hooks</summary>
|
|
238
265
|
|
|
239
|
-
**
|
|
266
|
+
**Prerequisites:** Node.js 18+, OpenCode installed.
|
|
240
267
|
|
|
241
|
-
|
|
242
|
-
npm install -g context-mode
|
|
243
|
-
```
|
|
268
|
+
**Install:**
|
|
244
269
|
|
|
245
|
-
|
|
270
|
+
1. Install context-mode globally:
|
|
246
271
|
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
"mcp": {
|
|
251
|
-
"context-mode": {
|
|
252
|
-
"type": "local",
|
|
253
|
-
"command": ["context-mode"]
|
|
254
|
-
}
|
|
255
|
-
},
|
|
256
|
-
"plugin": ["context-mode"]
|
|
257
|
-
}
|
|
258
|
-
```
|
|
272
|
+
```bash
|
|
273
|
+
npm install -g context-mode
|
|
274
|
+
```
|
|
259
275
|
|
|
260
|
-
|
|
276
|
+
2. Add to `opencode.json` in your project root (or `~/.config/opencode/opencode.json` for global):
|
|
261
277
|
|
|
262
|
-
|
|
278
|
+
```json
|
|
279
|
+
{
|
|
280
|
+
"$schema": "https://opencode.ai/config.json",
|
|
281
|
+
"mcp": {
|
|
282
|
+
"context-mode": {
|
|
283
|
+
"type": "local",
|
|
284
|
+
"command": ["context-mode"]
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
"plugin": ["context-mode"]
|
|
288
|
+
}
|
|
289
|
+
```
|
|
263
290
|
|
|
264
|
-
|
|
265
|
-
- **File exists without context-mode rules** — routing instructions are appended after your existing content.
|
|
266
|
-
- **File already contains context-mode rules** — skipped (idempotent, no duplicate content).
|
|
291
|
+
The `mcp` entry registers the 6 sandbox tools. The `plugin` entry enables hooks — OpenCode calls the plugin's TypeScript functions directly before and after each tool execution, blocking dangerous commands and enforcing sandbox routing.
|
|
267
292
|
|
|
268
|
-
|
|
293
|
+
3. Restart OpenCode.
|
|
269
294
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
295
|
+
**Verify:** In the OpenCode session, type `ctx stats`. Context-mode tools should appear and respond.
|
|
296
|
+
|
|
297
|
+
**Routing:** Automatic. The plugin intercepts tool calls at runtime via `tool.execute.before` and `tool.execute.after`. No routing file is written to your project. The `experimental.session.compacting` hook builds resume snapshots when the conversation compacts.
|
|
298
|
+
|
|
299
|
+
> **Note:** OpenCode's SessionStart hook is not yet available ([#14808](https://github.com/sst/opencode/issues/14808)), so startup/resume session restore is not supported. Compaction recovery works fully via the plugin.
|
|
300
|
+
|
|
301
|
+
Full config: [`configs/opencode/opencode.json`](configs/opencode/opencode.json)
|
|
273
302
|
|
|
274
303
|
</details>
|
|
275
304
|
|
|
276
305
|
<details>
|
|
277
|
-
<summary><strong>OpenClaw / Pi Agent</strong
|
|
306
|
+
<summary><strong>OpenClaw / Pi Agent</strong> — native gateway plugin</summary>
|
|
278
307
|
|
|
279
308
|
**Prerequisites:** OpenClaw gateway running ([>2026.1.29](https://github.com/openclaw/openclaw/pull/9761)), Node.js 22+.
|
|
280
309
|
|
|
281
310
|
context-mode runs as a native [OpenClaw](https://github.com/openclaw) gateway plugin, targeting **Pi Agent** sessions (Read/Write/Edit/Bash tools). Unlike other platforms, there's no separate MCP server — the plugin registers directly into the gateway runtime via OpenClaw's [plugin API](https://docs.openclaw.ai/tools/plugin).
|
|
282
311
|
|
|
283
|
-
**
|
|
312
|
+
**Install:**
|
|
284
313
|
|
|
285
|
-
|
|
286
|
-
git clone https://github.com/mksglu/context-mode.git
|
|
287
|
-
cd context-mode
|
|
288
|
-
npm run install:openclaw
|
|
289
|
-
```
|
|
314
|
+
1. Clone and install:
|
|
290
315
|
|
|
291
|
-
|
|
316
|
+
```bash
|
|
317
|
+
git clone https://github.com/mksglu/context-mode.git
|
|
318
|
+
cd context-mode
|
|
319
|
+
npm run install:openclaw
|
|
320
|
+
```
|
|
292
321
|
|
|
293
|
-
|
|
294
|
-
npm run install:openclaw -- /path/to/openclaw-state
|
|
295
|
-
```
|
|
322
|
+
The installer uses `$OPENCLAW_STATE_DIR` from your environment (default: `/openclaw`). To specify a custom path:
|
|
296
323
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
324
|
+
```bash
|
|
325
|
+
npm run install:openclaw -- /path/to/openclaw-state
|
|
326
|
+
```
|
|
300
327
|
|
|
301
|
-
|
|
328
|
+
Common locations: **Docker** — `/openclaw` (the default). **Local** — `~/.openclaw` or wherever you set `OPENCLAW_STATE_DIR`.
|
|
302
329
|
|
|
303
|
-
|
|
330
|
+
The installer handles everything: `npm install`, `npm run build`, `better-sqlite3` native rebuild, extension registration in `runtime.json`, and gateway restart via SIGUSR1.
|
|
331
|
+
|
|
332
|
+
2. Open a Pi Agent session.
|
|
333
|
+
|
|
334
|
+
**Verify:** The plugin registers 8 hooks via [`api.on()`](https://docs.openclaw.ai/tools/plugin) (lifecycle) and [`api.registerHook()`](https://docs.openclaw.ai/tools/plugin) (commands). Type `ctx stats` to confirm tools are loaded.
|
|
335
|
+
|
|
336
|
+
**Routing:** Automatic. All tool interception, session tracking, and compaction recovery hooks activate automatically — no manual hook configuration or routing file needed.
|
|
304
337
|
|
|
305
|
-
> **Why native plugin?** OpenClaw doesn't support shell-based hooks like Claude Code or Gemini CLI. Instead, plugins register TypeScript functions directly into the gateway runtime. This gives full access to tool interception, argument mutation, and session context injection — equivalent to the hook-based approach on other platforms.
|
|
306
|
-
>
|
|
307
338
|
> **Minimum version:** OpenClaw >2026.1.29 — this includes the `api.on()` lifecycle fix from [PR #9761](https://github.com/openclaw/openclaw/pull/9761). On older versions, lifecycle hooks silently fail. The adapter falls back to DB snapshot reconstruction (less precise but preserves critical state).
|
|
308
339
|
|
|
309
340
|
Full documentation: [`docs/adapters/openclaw.md`](docs/adapters/openclaw.md)
|
|
@@ -311,173 +342,216 @@ Full documentation: [`docs/adapters/openclaw.md`](docs/adapters/openclaw.md)
|
|
|
311
342
|
</details>
|
|
312
343
|
|
|
313
344
|
<details>
|
|
314
|
-
<summary><strong>Codex CLI</strong
|
|
345
|
+
<summary><strong>Codex CLI</strong> — MCP-only, no hooks</summary>
|
|
315
346
|
|
|
316
|
-
**
|
|
347
|
+
**Prerequisites:** Node.js 18+, Codex CLI installed.
|
|
317
348
|
|
|
318
|
-
|
|
319
|
-
npm install -g context-mode
|
|
320
|
-
```
|
|
349
|
+
**Install:**
|
|
321
350
|
|
|
322
|
-
|
|
351
|
+
1. Install context-mode globally:
|
|
323
352
|
|
|
324
|
-
```
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
```
|
|
353
|
+
```bash
|
|
354
|
+
npm install -g context-mode
|
|
355
|
+
```
|
|
328
356
|
|
|
329
|
-
|
|
357
|
+
2. Add to `~/.codex/config.toml`:
|
|
330
358
|
|
|
331
|
-
|
|
359
|
+
```toml
|
|
360
|
+
[mcp_servers.context-mode]
|
|
361
|
+
command = "context-mode"
|
|
362
|
+
```
|
|
332
363
|
|
|
333
|
-
|
|
364
|
+
3. Copy routing instructions (Codex CLI has no hook support):
|
|
334
365
|
|
|
335
|
-
```bash
|
|
336
|
-
cp
|
|
337
|
-
```
|
|
366
|
+
```bash
|
|
367
|
+
cp node_modules/context-mode/configs/codex/AGENTS.md ./AGENTS.md
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
For global use: `cp node_modules/context-mode/configs/codex/AGENTS.md ~/.codex/AGENTS.md`. Global applies to all projects. If both exist, Codex CLI merges them.
|
|
371
|
+
|
|
372
|
+
4. Restart Codex CLI.
|
|
373
|
+
|
|
374
|
+
**Verify:** Start a session and type `ctx stats`. Context-mode tools should appear and respond.
|
|
338
375
|
|
|
339
|
-
|
|
376
|
+
**Routing:** Manual. The `AGENTS.md` file is the only enforcement method (~60% compliance). There is no programmatic interception — the model can run raw `curl`, read large files, or bypass sandbox tools at any time. Hook support PRs [#2904](https://github.com/openai/codex/pull/2904) and [#9796](https://github.com/openai/codex/pull/9796) were closed without merge.
|
|
340
377
|
|
|
341
378
|
</details>
|
|
342
379
|
|
|
343
380
|
<details>
|
|
344
|
-
<summary><strong>Antigravity</strong
|
|
381
|
+
<summary><strong>Antigravity</strong> — MCP-only, no hooks</summary>
|
|
345
382
|
|
|
346
|
-
**
|
|
383
|
+
**Prerequisites:** Node.js 18+, Antigravity installed.
|
|
347
384
|
|
|
348
|
-
|
|
349
|
-
npm install -g context-mode
|
|
350
|
-
```
|
|
385
|
+
**Install:**
|
|
351
386
|
|
|
352
|
-
|
|
387
|
+
1. Install context-mode globally:
|
|
353
388
|
|
|
354
|
-
```
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
389
|
+
```bash
|
|
390
|
+
npm install -g context-mode
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
2. Add to `~/.gemini/antigravity/mcp_config.json`:
|
|
394
|
+
|
|
395
|
+
```json
|
|
396
|
+
{
|
|
397
|
+
"mcpServers": {
|
|
398
|
+
"context-mode": {
|
|
399
|
+
"command": "context-mode"
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
```
|
|
363
404
|
|
|
364
|
-
|
|
405
|
+
3. Copy routing instructions (Antigravity has no hook support):
|
|
365
406
|
|
|
366
|
-
|
|
407
|
+
```bash
|
|
408
|
+
cp node_modules/context-mode/configs/antigravity/GEMINI.md ./GEMINI.md
|
|
409
|
+
```
|
|
367
410
|
|
|
368
|
-
|
|
411
|
+
4. Restart Antigravity.
|
|
369
412
|
|
|
370
|
-
|
|
371
|
-
|
|
413
|
+
**Verify:** In an Antigravity session, type `ctx stats`. Context-mode tools should appear and respond.
|
|
414
|
+
|
|
415
|
+
**Routing:** Manual. The `GEMINI.md` file is the only enforcement method (~60% compliance). There is no programmatic interception. Auto-detected via MCP protocol handshake (`clientInfo.name`) — no manual platform configuration needed.
|
|
416
|
+
|
|
417
|
+
Full configs: [`configs/antigravity/mcp_config.json`](configs/antigravity/mcp_config.json) | [`configs/antigravity/GEMINI.md`](configs/antigravity/GEMINI.md)
|
|
372
418
|
|
|
373
419
|
</details>
|
|
374
420
|
|
|
375
421
|
<details>
|
|
376
|
-
<summary><strong>Kiro</strong
|
|
422
|
+
<summary><strong>Kiro</strong> — hooks with steering file</summary>
|
|
377
423
|
|
|
378
|
-
**
|
|
424
|
+
**Prerequisites:** Node.js 18+, Kiro with MCP enabled (Settings > search "MCP").
|
|
379
425
|
|
|
380
|
-
|
|
381
|
-
npm install -g context-mode
|
|
382
|
-
```
|
|
426
|
+
**Install:**
|
|
383
427
|
|
|
384
|
-
|
|
428
|
+
1. Install context-mode globally:
|
|
385
429
|
|
|
386
|
-
```
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
"context-mode": {
|
|
390
|
-
"command": "context-mode"
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
```
|
|
430
|
+
```bash
|
|
431
|
+
npm install -g context-mode
|
|
432
|
+
```
|
|
395
433
|
|
|
396
|
-
|
|
434
|
+
2. Add to `.kiro/settings/mcp.json` in your project (or `~/.kiro/settings/mcp.json` for global):
|
|
397
435
|
|
|
398
|
-
```json
|
|
399
|
-
{
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
436
|
+
```json
|
|
437
|
+
{
|
|
438
|
+
"mcpServers": {
|
|
439
|
+
"context-mode": {
|
|
440
|
+
"command": "context-mode"
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
3. Create `.kiro/hooks/context-mode.json`:
|
|
447
|
+
|
|
448
|
+
```json
|
|
449
|
+
{
|
|
450
|
+
"name": "context-mode",
|
|
451
|
+
"description": "Context-mode hooks for context window protection",
|
|
452
|
+
"hooks": {
|
|
453
|
+
"preToolUse": [
|
|
454
|
+
{ "matcher": "*", "command": "context-mode hook kiro pretooluse" }
|
|
455
|
+
],
|
|
456
|
+
"postToolUse": [
|
|
457
|
+
{ "matcher": "*", "command": "context-mode hook kiro posttooluse" }
|
|
458
|
+
]
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
```
|
|
412
462
|
|
|
413
|
-
|
|
463
|
+
4. Copy routing instructions. Kiro's `agentSpawn` (SessionStart) is not yet implemented, so the model needs a routing file at session start:
|
|
414
464
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
465
|
+
```bash
|
|
466
|
+
cp node_modules/context-mode/configs/kiro/KIRO.md ./KIRO.md
|
|
467
|
+
```
|
|
418
468
|
|
|
419
|
-
|
|
469
|
+
5. Restart Kiro.
|
|
470
|
+
|
|
471
|
+
**Verify:** Open the Kiro panel > MCP Servers tab and confirm "context-mode" shows a green status indicator. In chat, type `ctx stats`.
|
|
472
|
+
|
|
473
|
+
**Routing:** Hooks enforce routing programmatically via `preToolUse`/`postToolUse`. The `KIRO.md` file provides routing instructions since `agentSpawn` (SessionStart equivalent) is not yet wired. Tool names appear as `@context-mode/ctx_batch_execute`, `@context-mode/ctx_search`, etc. Auto-detected via MCP protocol handshake.
|
|
474
|
+
|
|
475
|
+
Full configs: [`configs/kiro/mcp.json`](configs/kiro/mcp.json) | [`configs/kiro/agent.json`](configs/kiro/agent.json) | [`configs/kiro/KIRO.md`](configs/kiro/KIRO.md)
|
|
420
476
|
|
|
421
477
|
</details>
|
|
422
478
|
|
|
423
479
|
<details>
|
|
424
|
-
<summary><strong>Zed</strong
|
|
480
|
+
<summary><strong>Zed</strong> — MCP-only, no hooks</summary>
|
|
425
481
|
|
|
426
|
-
**
|
|
482
|
+
**Prerequisites:** Node.js 18+, Zed installed.
|
|
427
483
|
|
|
428
|
-
|
|
429
|
-
npm install -g context-mode
|
|
430
|
-
```
|
|
484
|
+
**Install:**
|
|
431
485
|
|
|
432
|
-
|
|
486
|
+
1. Install context-mode globally:
|
|
433
487
|
|
|
434
|
-
```
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
488
|
+
```bash
|
|
489
|
+
npm install -g context-mode
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
2. Add to `~/.config/zed/settings.json` (Windows: `%APPDATA%\Zed\settings.json`):
|
|
493
|
+
|
|
494
|
+
```json
|
|
495
|
+
{
|
|
496
|
+
"context_servers": {
|
|
497
|
+
"context-mode": {
|
|
498
|
+
"command": {
|
|
499
|
+
"path": "context-mode"
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
```
|
|
505
|
+
|
|
506
|
+
Note: Zed uses `"context_servers"` and `"command": { "path": "..." }` syntax, not `"mcpServers"` or `"command": "..."` like other platforms.
|
|
445
507
|
|
|
446
|
-
|
|
508
|
+
3. Copy routing instructions (Zed has no hook support):
|
|
447
509
|
|
|
448
|
-
|
|
510
|
+
```bash
|
|
511
|
+
cp node_modules/context-mode/configs/zed/AGENTS.md ./AGENTS.md
|
|
512
|
+
```
|
|
449
513
|
|
|
450
|
-
|
|
514
|
+
4. Restart Zed (or save `settings.json` — Zed auto-restarts context servers on config change).
|
|
515
|
+
|
|
516
|
+
**Verify:** Open the Agent Panel (`Cmd+Shift+A`), go to settings, and check the indicator dot next to "context-mode" — green means active. Type `ctx stats` in the agent chat.
|
|
517
|
+
|
|
518
|
+
**Routing:** Manual. The `AGENTS.md` file is the only enforcement method (~60% compliance). There is no programmatic interception. Tool names appear as `mcp:context-mode:ctx_batch_execute`, `mcp:context-mode:ctx_search`, etc. Auto-detected via MCP protocol handshake.
|
|
451
519
|
|
|
452
520
|
</details>
|
|
453
521
|
|
|
454
522
|
<details>
|
|
455
|
-
<summary><strong>Pi Coding Agent</strong
|
|
523
|
+
<summary><strong>Pi Coding Agent</strong> — extension with full hook support</summary>
|
|
456
524
|
|
|
457
|
-
**
|
|
525
|
+
**Prerequisites:** Node.js 18+, Pi Coding Agent installed.
|
|
458
526
|
|
|
459
|
-
|
|
460
|
-
git clone https://github.com/mksglu/context-mode.git ~/.pi/extensions/context-mode
|
|
461
|
-
cd ~/.pi/extensions/context-mode
|
|
462
|
-
npm install
|
|
463
|
-
```
|
|
527
|
+
**Install:**
|
|
464
528
|
|
|
465
|
-
|
|
529
|
+
1. Clone the extension:
|
|
466
530
|
|
|
467
|
-
```
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
```
|
|
531
|
+
```bash
|
|
532
|
+
git clone https://github.com/mksglu/context-mode.git ~/.pi/extensions/context-mode
|
|
533
|
+
cd ~/.pi/extensions/context-mode
|
|
534
|
+
npm install
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
2. Add to `~/.pi/settings/mcp.json` (or `.pi/settings/mcp.json` for project-level):
|
|
477
538
|
|
|
478
|
-
|
|
539
|
+
```json
|
|
540
|
+
{
|
|
541
|
+
"mcpServers": {
|
|
542
|
+
"context-mode": {
|
|
543
|
+
"command": "node",
|
|
544
|
+
"args": ["~/.pi/extensions/context-mode/node_modules/context-mode/start.mjs"]
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
```
|
|
479
549
|
|
|
480
|
-
|
|
550
|
+
3. Restart Pi.
|
|
551
|
+
|
|
552
|
+
**Verify:** In a Pi session, type `ctx stats`. Context-mode tools should appear and respond.
|
|
553
|
+
|
|
554
|
+
**Routing:** Automatic. The extension registers all key lifecycle events (`tool_call`, `tool_result`, `session_start`, `session_before_compact`), providing full session continuity and routing enforcement.
|
|
481
555
|
|
|
482
556
|
</details>
|
|
483
557
|
|
|
@@ -667,19 +741,19 @@ Detailed event data is also indexed into FTS5 for on-demand retrieval via `searc
|
|
|
667
741
|
|
|
668
742
|
**Cursor** — Partial coverage. Native `preToolUse` and `postToolUse` hooks capture tool events. `sessionStart` is documented by Cursor but currently rejected by their validator, so session restore is not available. Routing instructions are delivered via MCP server startup instead.
|
|
669
743
|
|
|
670
|
-
**OpenCode** — Partial. The TypeScript plugin captures PostToolUse events via `tool.execute.after`, but SessionStart is not yet available ([#14808](https://github.com/sst/opencode/issues/14808)). Events are stored but not automatically restored after compaction.
|
|
744
|
+
**OpenCode** — Partial. The TypeScript plugin captures PostToolUse events via `tool.execute.after`, but SessionStart is not yet available ([#14808](https://github.com/sst/opencode/issues/14808)). Events are stored but not automatically restored after compaction.
|
|
671
745
|
|
|
672
746
|
**OpenClaw / Pi Agent** — High coverage. All tool lifecycle hooks (`after_tool_call`, `before_compaction`, `session_start`) fire via the native gateway plugin. User decisions aren't captured but file edits, git ops, errors, and tasks are fully tracked. Falls back to DB snapshot reconstruction if compaction hooks fail on older gateway versions. See [`docs/adapters/openclaw.md`](docs/adapters/openclaw.md).
|
|
673
747
|
|
|
674
|
-
**Codex CLI** — No session support. No hooks means no event capture. Each compaction or new session starts fresh.
|
|
748
|
+
**Codex CLI** — No session support. No hooks means no event capture. Each compaction or new session starts fresh. Requires manually copying `AGENTS.md` to your project root.
|
|
675
749
|
|
|
676
|
-
**Antigravity** — No session support. Same as Codex CLI — no hooks, no event capture.
|
|
750
|
+
**Antigravity** — No session support. Same as Codex CLI — no hooks, no event capture. Requires manually copying `GEMINI.md` to your project root. Auto-detected via MCP protocol handshake (`clientInfo.name`).
|
|
677
751
|
|
|
678
|
-
**Zed** — No session support. Same as Codex CLI — no hooks, no event capture.
|
|
752
|
+
**Zed** — No session support. Same as Codex CLI — no hooks, no event capture. Requires manually copying `AGENTS.md` to your project root. Auto-detected via MCP protocol handshake (`clientInfo.name`).
|
|
679
753
|
|
|
680
|
-
**Kiro** — Partial coverage. Native `preToolUse` and `postToolUse` hooks capture tool events and enforce sandbox routing. `agentSpawn` (the Kiro equivalent of SessionStart) is not yet implemented, so session restore after compaction is not available.
|
|
754
|
+
**Kiro** — Partial coverage. Native `preToolUse` and `postToolUse` hooks capture tool events and enforce sandbox routing. `agentSpawn` (the Kiro equivalent of SessionStart) is not yet implemented, so session restore after compaction is not available. Requires manually copying `KIRO.md` to your project root. Auto-detected via MCP protocol handshake (`clientInfo.name`).
|
|
681
755
|
|
|
682
|
-
**Pi Coding Agent** — High coverage. The extension registers all key lifecycle events: `tool_call` (PreToolUse), `tool_result` (PostToolUse), `session_start` (SessionStart), and `session_before_compact` (PreCompact). File edits, git ops, errors, and tasks are fully tracked. Session restore after compaction works via the extension's event hooks.
|
|
756
|
+
**Pi Coding Agent** — High coverage. The extension registers all key lifecycle events: `tool_call` (PreToolUse), `tool_result` (PostToolUse), `session_start` (SessionStart), and `session_before_compact` (PreCompact). File edits, git ops, errors, and tasks are fully tracked. Session restore after compaction works via the extension's event hooks.
|
|
683
757
|
|
|
684
758
|
</details>
|
|
685
759
|
|
|
@@ -702,11 +776,9 @@ Detailed event data is also indexed into FTS5 for on-demand retrieval via `searc
|
|
|
702
776
|
>
|
|
703
777
|
> **OpenClaw** runs context-mode as a native gateway plugin targeting Pi Agent sessions. Hooks register via `api.on()` (tool/lifecycle) and `api.registerHook()` (commands). All tool interception and compaction hooks are supported. See [`docs/adapters/openclaw.md`](docs/adapters/openclaw.md).
|
|
704
778
|
>
|
|
705
|
-
> **Codex CLI**, **Antigravity**, and **Zed** do not support hooks. They rely solely on routing instruction files (`AGENTS.md` / `GEMINI.md`) for enforcement (~60% compliance). Antigravity and Zed are auto-detected via MCP protocol handshake — no manual platform configuration needed.
|
|
779
|
+
> **Codex CLI**, **Antigravity**, and **Zed** do not support hooks. They rely solely on manually-copied routing instruction files (`AGENTS.md` / `GEMINI.md`) for enforcement (~60% compliance). See each platform's install section for copy instructions. Antigravity and Zed are auto-detected via MCP protocol handshake — no manual platform configuration needed.
|
|
706
780
|
>
|
|
707
|
-
> **Kiro** supports native `preToolUse` and `postToolUse` hooks for routing enforcement and tool event capture. `agentSpawn` (SessionStart equivalent) and `stop` are not yet wired. Kiro is auto-detected via MCP protocol handshake (`clientInfo.name`).
|
|
708
|
-
>
|
|
709
|
-
> **Zed** does not support hooks. It relies solely on the `AGENTS.md` routing instructions file for enforcement (~60% compliance). Zed is auto-detected via MCP protocol handshake — no manual platform configuration needed.
|
|
781
|
+
> **Kiro** supports native `preToolUse` and `postToolUse` hooks for routing enforcement and tool event capture. `agentSpawn` (SessionStart equivalent) and `stop` are not yet wired. Requires manually copying `KIRO.md` to your project root. Kiro is auto-detected via MCP protocol handshake (`clientInfo.name`).
|
|
710
782
|
>
|
|
711
783
|
> **Pi Coding Agent** runs context-mode as an extension with full hook support. The extension registers `tool_call`, `tool_result`, `session_start`, and `session_before_compact` events, providing high session continuity coverage. The MCP server provides the 6 sandbox tools.
|
|
712
784
|
|
|
@@ -714,12 +786,14 @@ Detailed event data is also indexed into FTS5 for on-demand retrieval via `searc
|
|
|
714
786
|
|
|
715
787
|
Hooks intercept tool calls programmatically — they can block dangerous commands and redirect them to the sandbox before execution. Instruction files guide the model via prompt instructions but cannot block anything. **Always enable hooks where supported.**
|
|
716
788
|
|
|
789
|
+
> **Note:** Routing instruction files were previously auto-written to project directories on first session start. This was disabled to prevent git tree pollution ([#158](https://github.com/mksglu/context-mode/issues/158), [#164](https://github.com/mksglu/context-mode/issues/164)). Hook-capable platforms (Claude Code, Gemini CLI, VS Code Copilot, OpenCode, OpenClaw) inject routing via hooks and need no file. Non-hook platforms (Codex, Zed, Cursor, Kiro, Antigravity) require a one-time manual copy — see each platform's install section.
|
|
790
|
+
|
|
717
791
|
| Platform | Hooks | Instruction File | With Hooks | Without Hooks |
|
|
718
792
|
|---|:---:|---|:---:|:---:|
|
|
719
793
|
| Claude Code | Yes (auto) | [`CLAUDE.md`](configs/claude-code/CLAUDE.md) | **~98% saved** | ~60% saved |
|
|
720
794
|
| Gemini CLI | Yes | [`GEMINI.md`](configs/gemini-cli/GEMINI.md) | **~98% saved** | ~60% saved |
|
|
721
795
|
| VS Code Copilot | Yes | [`copilot-instructions.md`](configs/vscode-copilot/copilot-instructions.md) | **~98% saved** | ~60% saved |
|
|
722
|
-
| Cursor | Yes |
|
|
796
|
+
| Cursor | Yes | [`context-mode.mdc`](configs/cursor/context-mode.mdc) | **~98% saved** | ~60% saved |
|
|
723
797
|
| OpenCode | Plugin | [`AGENTS.md`](configs/opencode/AGENTS.md) | **~98% saved** | ~60% saved |
|
|
724
798
|
| OpenClaw | Plugin | [`AGENTS.md`](configs/openclaw/AGENTS.md) | **~98% saved** | ~60% saved |
|
|
725
799
|
| Codex CLI | -- | [`AGENTS.md`](configs/codex/AGENTS.md) | -- | ~60% saved |
|