Code Execution

Voer lokale Python uit voor bulk code-operaties, retourneer samenvattingen in plaats van volledige broncode

Door mhattingpete · mhattingpete/claude-skills-marketplace

Tested · Didn't pass

Code Execution — Voer lokale Python uit voor bulk code-operaties, retourneer samenvattingen in plaats van volledige broncode

Wat het doet

Een skill die Claude instrueert om lokale Python uit te voeren via een execution_runtime pakket (fs/code/transform/git API's) voor bulk bestandsoperaties, hernoemingen, en metadata-only code-analyse, waarbij compacte samenvattingen worden geretourneerd om context-tokens te besparen. Activeert op bulkoperaties over 10+ bestanden, meerstaps refactors, of vermeldingen van efficiëntie. Het gedocumenteerde importpad is kapot bij een schone installatie, dus het vereist momenteel een bronpatch om te gebruiken.

Testrapport

De runtime geïnstalleerd precies zoals setup.sh doet (pip install -e .) in een tijdelijke venv onder een tijdelijke HOME. Het gedocumenteerde entrypoint `from execution_runtime import fs, code, transform, git` faalde met ImportError: security/__init__.py importeert module-level `mask_result`, dat alleen bestaat als een PIIDetector methode (regel 200), en de fallback importeert een niet-bestaande `mcp_server`. Door de kapotte facade te omzeilen met `from api import code_transform`, hernoemde rename_identifier correct `oldName`->`newName` over 3 bestanden en retourneerde {'files_modified': 3, 'total_replacements': 12}. Een naïeve baseline regex hernoeming produceerde een byte-identiek uitvoerbestand, dus bestandsuitvoer is niet beter dan baseline; het enige verschil is de compacte samenvattingsretour versus volledige broncode in context.

Getest op: 2026-07-21 · Claude Code 2.x (agent harness)

Installatie

# BROKEN on clean install: the documented `from execution_runtime import ...` raises
# ImportError (mask_result is a PIIDetector method, not a module function; fallback
# imports non-existent mcp_server). Underlying api/ modules work if you patch that.
git clone --depth 1 https://github.com/mhattingpete/claude-skills-marketplace.git /tmp/code-execution-src
mkdir -p ~/.claude/skills
cp -R /tmp/code-execution-src/code-operations-plugin/skills/code-execution ~/.claude/skills/code-execution
# Runtime (required for the skill to do anything):
#   cd /tmp/code-execution-src/execution-runtime && pip install -e .
# Then to actually import it, fix execution_runtime/security/__init__.py and
# execution_runtime/__init__.py: remove `mask_result` from the imports, OR add a
# module-level `def mask_result(...)` wrapper in security/pii_detector.py.
# Without that patch, `from execution_runtime import fs, code, transform, git` fails.

Commando's en voorbeeldprompts

  • /code-executionVoer lokale Python uit voor bulk code-operaties, retourneer samenvattingen in plaats van volledige broncode

Skills reageren op gewone verzoeken — geen commando's om te onthouden. Na installatie activeren prompts zoals deze de skill (in het Engels):

  • Process these 50 files locally instead of one by one
  • Run this bulk marketplace API workflow efficiently
  • Execute this iterative data processing task locally