mhattingpete/claude-skills-marketplace / code-operations-plugin/skills/code-execution
code-execution
VerifiedExecute Python code locally with marketplace API access for 90%+ token savings on bulk operations. Activates when user requests bulk operations (10+ files), complex multi-step workflows, iterative processing, or mentions efficiency/performance.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.1 KB |
| examples/bulk_refactor.py | script | 737 B |
| examples/codebase_audit.py | script | 2.2 KB |
| examples/extract_functions.py | script | 1.2 KB |
examples/extract_functions.py
View on GitHub"""
Example: Extract Functions to New File
Shows how to find and move functions to a separate file
with minimal token usage.
"""
from api.code_analysis import find_functions
from api.filesystem import copy_lines, paste_code, read_file, write_file
# Find utility functions (returns metadata ONLY, not source code)
functions = find_functions('app.py', pattern='.*_util$', regex=True)
print(f"Found {len(functions)} utility functions")
# Extract imports from original file
content = read_file('app.py')
imports = [line for line in content.splitlines()
if line.strip().startswith(('import ', 'from '))]
# Create new utils.py with imports
write_file('utils.py', '\\n'.join(set(imports)) + '\\n\\n')
# Copy each function to utils.py
for func in functions:
print(f" Moving {func['name']} (lines {func['start_line']}-{func['end_line']})")
code = copy_lines('app.py', func['start_line'], func['end_line'])
paste_code('utils.py', -1, code + '\\n\\n') # -1 = append to end
result = {
'functions_extracted': len(functions),
'function_names': [f['name'] for f in functions]
}
# Token usage: ~800 tokens
# vs ~15,000 tokens reading full file into context
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |