Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By gabe4codingv0.12.20MITIn 1 marketplace
Lets Claude run one JavaScript program over your MCP tools in a sandbox, so only the filtered answer enters context. Needs Node.js 22.13+; it claims 43% lower cost per task on Haiku 5.5 benchmark runs.
Trending plugins
7-day copy clicks
Run automatically on Claude Code events. Claude doesn't decide.
Claude Code asks for these when you enable the plugin. Sensitive values are stored in your system keychain.
Node.js executablenode
Node 22.13 or later runs the sandbox. A name on PATH or an absolute path.
stringOptional
1 critical to review before installing
JavaScript or TypeScript that runs inside Claude Code as you, unsandboxed. Read from its source, it sees, changes or blocks tool calls; runs Claude Code's tools itself; runs programs; writes files; reads files; reads environment variables (CLAUDE_CODE_ENTRYPOINT, CLAUDE_CODE_REMOTE, HOME); calls a model on your account; calls MCP servers.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Record run metricsmetrics
Write one line per run_code run to ~/.claude/code-mode/metrics/: sizes and counts only, no data. For the output projection experiment.
booleanOptionaldefault false
Approval of nested MCP callsapproval
program: approving run_code approves the MCP calls inside it that no permission rule decides (deny rules and organization limits still apply). per-call: each nested call has its own permission check. In auto mode, Claude Code older than 2.1.301 needs allow rules for nested calls.
One of program, per-call
stringOptionaldefault program
Output projectionprojection
After each run, show the size and shape of each MCP result and keep the results in memory, so a later program can read one again with recall(n) and make no new call. search_tools shows the result shape of each tool from an earlier call (saved in ~/.claude/code-mode/shapes.json).
booleanOptionaldefault true
Load project hintsprojectHints
Also load usage hints from .claude/code-mode/hints/ in the project. Off by default: anyone who can commit to the project could use them to steer the model.
booleanOptionaldefault false
Block direct MCP callsblockDirectMcp
Deny MCP tool calls the model makes directly, so it uses run_code. Calls from run_code still go through.
booleanOptionaldefault false
Program timeout (seconds)timeoutSeconds
Wall-clock and CPU limit for one run_code program. Minimum 5.
numberOptionaldefault 120
code-mode is a Claude Code plugin. Claude writes one JavaScript program that calls your MCP tools in a sandbox, filters and joins the data there, and sends back only the answer.
Measured: the same 30/30 correct answers at 43% lower cost per task with Haiku 5.5. How we measured · If it saves you tokens, ⭐ the repo.
Install · Demo · Measured · Example · How it works · Config
Needs Claude Code and Node.js 22.13+. No dependencies. In a Claude Code session:
/plugin marketplace add gabe4coding/claude-code-mode
/plugin install code-mode@claude-code-mode
Start a new session and ask for anything that needs several MCP calls. Using auto mode with Claude Code older than 2.1.301? Add allow rules first: Permissions.
The full film with sound:
https://github.com/user-attachments/assets/468c412f-ecae-4e04-a53b-8a291561a052
| Without code-mode | With code-mode |
|---|---|
| Claude calls tools one by one | Claude writes one program |
| Every full result lands in context | Results are filtered in a sandbox |
| Context fills with raw JSON | Only the answer comes back |
unshare -rn works.The bench in bench/ runs six tasks in headless Claude Code against a fake MCP server.
Each task has traps: pages, nested fields, bots and results larger than 20,000 characters.
Haiku 5.5, without and with code-mode (5 runs of each task, plugin 0.6.0 and 0.6.1, 2026-10-10). In 0.6.0 the code-mode start line did not reach the model, so Haiku called most tools directly.
| Tools called directly (0.6.0) | Through code-mode (0.6.1) | |
|---|---|---|
| Share of MCP calls made directly | 89% | 2% |
| Correct answers | 30/30 | 30/30 |
| Cost per task | $0.007 | $0.004 |
| Input tokens per task | 167,297 | 149,995 |
| Output tokens per task | 1,814 | 1,194 |
| Seconds per task | 13.5 | 11.6 |
Opus 5.5, output projection off and on: duplicate MCP calls per task went from 1.37 to 0.10. Cost and correct answers did not change. Refer to PR #11.
Limits: these are bench tasks in headless runs. Interactive sessions were not measured. Most input tokens are the fixed context of Claude Code, so the input saving is smaller than the cost saving. To run the bench again, refer to Development.
"Which of my open Jira issues have no update in the last 14 days?"
const issues = await call("mcp__claude_ai_Jira__searchJiraIssuesUsingJql", {
cloudId: "example.atlassian.net",
jql: "assignee = currentUser() AND statusCategory != Done",
})
const cutoff = Date.now() - 14 * 24 * 3600 * 1000
return issues.issues
.filter(i => Date.parse(i.fields.updated) < cutoff)
.map(i => ({ key: i.key, title: i.fields.summary }))
Claude sees a short list of keys and titles, not every full issue.
7-day copy clicks
npx claudepluginhub gabe4coding/claude-code-mode --plugin code-modePlugins from other owners that cover similar ground
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.