Execute Python/TypeScript code with access to Claude Code tools for 10x faster batch operations
This plugin is not yet in any themed marketplace. To install it, you'll need to add it from GitHub directly.
Choose your preferred installation method below
A marketplace is a collection of plugins. Every plugin gets an auto-generated marketplace JSON for individual installation, plus inclusion in category and themed collections. Add a marketplace once (step 1), then install any plugin from it (step 2).
One-time setup for access to all plugins
When to use: If you plan to install multiple plugins now or later
Step 1: Add the marketplace (one-time)
/plugin marketplace add https://claudepluginhub.com/marketplaces/all.json
Run this once to access all plugins
Step 2: Install this plugin
/plugin install claude-code-accelerator@all
Use this plugin's auto-generated marketplace JSON for individual installation
When to use: If you only want to try this specific plugin
Step 1: Add this plugin's marketplace
/plugin marketplace add https://claudepluginhub.com/marketplaces/plugins/claude-code-accelerator.json
Step 2: Install the plugin
/plugin install claude-code-accelerator@claude-code-accelerator
10x faster batch operations through code mode execution
Claude Code Accelerator enables code mode executionโallowing Claude to write Python/TypeScript code that calls Claude Code tools programmatically instead of making sequential tool calls. This delivers:
Inspired by: Cloudflare's Code Mode
Operation | Traditional | Code Mode | Improvement |
---|---|---|---|
Update 50 files | 101 tool calls, 30-60s | 1 execution, 3-5s | 10-15x faster |
Token usage | 8,000+ tokens | 400 tokens | 95% reduction |
Error handling | Sequential retry | Built-in try/except | Native |
/code
from claude_code import files, search
matches = search.grep("oldFunction", output_mode="files_with_matches")
for file in matches:
files.edit(file, old="oldFunction", new="newFunction", replace_all=True)
/code
for file in files.glob("src/**/*.tsx"):
content = files.read(file)
if "useState" in content and "import React" not in content:
files.edit(file, old="import {", new="import React, {")
/code
from claude_code import files, git, bash
# Refactor
for file in files.glob("src/**/*.ts"):
files.edit(file, old="React.FC", new="FC")
# Test
result = bash.run("npm test")
if result.exit_code == 0:
git.commit("Refactor: Update React.FC to FC")
else:
git.reset(mode="hard")
print(f"Tests failed, rolled back")
/plugin install claude-code-accelerator
# Clone the repository
git clone https://github.com/mcfearsome/claude-code-accelerator.git
cd claude-code-accelerator
# Install in Claude Code
/plugin install ./
# Verify installation
/plugin list
/code [language]
Prompts for code input and executes in specified language (default: Python).
/code:python for f in files.glob("**/*.ts"): files.edit(f, old="x", new="y")
/code --language typescript --timeout 120000 --show-preview
Claude will automatically suggest code mode for batch operations:
Claude: "I detected this is a batch operation affecting 47 files.
Use code mode for 10x speedup? (yes/no)"
/code
Execute Python or TypeScript code with tool access.
Options:
--language
, -l
: python
or typescript
(default: python
)--timeout
, -t
: Execution timeout in ms (default: 60000
)--show-preview
, -p
: Show code before execution (default: true
)--no-detect
: Disable auto-detectionExamples:
/code
/code --language typescript
/code:python print("Hello from code mode!")
/code:batch
Specialized batch operation mode with optimization hints.
Usage:
/code:batch "Update all imports in TypeScript files"
/code:benchmark
Compare code mode vs traditional tool calling performance.
Usage:
/code:benchmark --operation "update 50 files"
Specialized agent for code mode execution with:
Activation:
/agent code-executor
pre-tool-call
Intercepts tool calls to suggest code mode for batch operations.
post-execution
Logs performance metrics and suggests optimizations.
error-recovery
Automatic fallback to traditional tool calling on code mode failures.
Edit .claude-code/config.json
:
{
"plugins": {
"claude-code-accelerator": {
"autoDetect": true,
"defaultLanguage": "python",
"timeout": 60000,
"showCode": true,
"performance": {
"enableMetrics": true,
"benchmarkThreshold": 3
}
}
}
}
from claude_code import files, git, bash, search
from claude_code.mcp import context7, serena, memory, browser
# File Operations
content = files.read(file_path: str) -> str
files.write(file_path: str, content: str) -> None
files.edit(file_path: str, old: str, new: str, replace_all: bool = False) -> None
files.glob(pattern: str, path: str = ".") -> list[str]
# Search
matches = search.grep(pattern: str, output_mode: str = "files_with_matches") -> list[str]
# Git
git.status() -> GitStatus
git.commit(message: str) -> None
git.has_changes() -> bool
# Bash
result = bash.run(command: str) -> BashResult
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Claude Code โ
โ โ
โ โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โ
โ โ Plugin System โโโโโโโโโถโ Code Executor โ โ
โ โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โผ โ
โ โโโโโโโโโโโโโโโโโโโโ โ
โ โ IPC Server โ โ
โ โ (Unix Socket) โ โ
โ โโโโโโโโโโโโโโโโโโโโ โ
โ โฒ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโ
โ
โ Tool Calls
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโ
โ Python/TypeScript Sandbox โ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโ โ
โ โ claude_code_api (Generated) โ โ
โ โ - files.read(), files.edit() โ โ
โ โ - search.grep() โ โ
โ โ - git.commit() โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ User Code โ โ
โ โ - Your Python/TypeScript โ โ
โ โ - Executes with full tool access โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
await Deno.run({
cmd: ["deno", "run",
"--no-net",
"--allow-read=./workspace",
"--allow-write=./workspace",
"code.ts"],
});
We welcome contributions! See CONTRIBUTING.md for guidelines.
# Clone repository
git clone https://github.com/mcfearsome/claude-code-accelerator.git
cd claude-code-accelerator
# Install dependencies
npm install
# Run tests
npm test
# Build plugin
npm run build
MIT License - see LICENSE for details.
Made with โค๏ธ for the Claude Code community
0.1.0