mirror of
https://github.com/mhattingpete/claude-skills-marketplace.git
synced 2026-11-18 18:04:26 +00:00
* feat: Add Anthropic code execution pattern - 90%+ token savings Implements the Anthropic code execution pattern for massive token efficiency. Instead of loading code through context, Claude executes Python locally with API access - achieving 90-99% token reduction for bulk operations. ## Core Infrastructure (execution-runtime/) ### API Library (importable in execution) - api/filesystem.py: File operations (copy, paste, search, batch) - api/code_analysis.py: AST-based analysis (returns metadata, not source) - api/code_transform.py: Refactoring operations - api/git_operations.py: Git command wrappers ### Security - security/sandbox.py: RestrictedPython execution environment - security/pii_detector.py: Auto-mask 15+ types of secrets/PII ### MCP Server (mcp_server.py) - execute_python: Run Python with API access - save_reusable_skill: Save transformation functions - create_refactoring_session: Stateful operations - save_session_state: Checkpoint progress - list_available_apis: API documentation ### Setup & Docs - setup.sh: One-command installation - pyproject.toml: Dependencies (FastMCP, RestrictedPython) - .env.example: Configuration template - README.md: Comprehensive documentation ## New Skills ### code-execution skill - Teaches agents when/how to use execution mode - 3 example scripts showing token savings - Comprehensive usage patterns ### Enhanced existing skills - code-transfer: Auto-uses execution for 10+ operations - code-refactor: Auto-switches for bulk operations ## New Commands ### /pr command - Quick access to git-pushing skill - Creates PRs with comprehensive summaries ## Token Savings | Operation | Files | Traditional | Execution | Savings | |-----------|-------|-------------|-----------|---------| | Rename | 10 | 5K tokens | 500 | 90% | | Refactor | 50 | 25K tokens | 600 | 97.6% | | Audit | 100 | 150K tokens | 1K | 99.3% | ## Security Features ✅ Sandboxed execution (RestrictedPython) ✅ Resource limits (30s timeout, 256MB memory) ✅ Restricted imports (whitelist only) ✅ Automatic PII/secret masking ✅ Directory access restrictions ## Installation Users run: ~/.claude/plugins/execution-runtime/setup.sh Skills automatically activate execution mode for bulk operations (10+ files). Reference: https://www.anthropic.com/engineering/code-execution-with-mcp * refactor(git-pushing): enforce smart_commit.sh script usage Make the smart_commit.sh script mandatory for all git-pushing operations. Removes manual git command fallback to ensure consistent behavior. Changes: - Updated workflow to always use the script - Removed manual git command instructions - Simplified examples to show script usage only - Added clear 'IMPORTANT' notice about script requirement Benefits: - Consistent commit message format - Automatic Claude Code footer - Better error handling - Simpler skill instructions for LLM * refactor: make skills more concise for LLM consumption Dramatically reduced skill file lengths to be more LLM-friendly: - code-execution: 541 → 101 lines (81% reduction) - git-pushing: simplified workflow instructions Skills are for LLMs to read, not humans. Keeping them concise: - Focuses on essential information only - Removes verbose explanations - Keeps concrete examples - Clear do's and don'ts Benefits: - Faster LLM processing - Lower token usage for skill loading - Clearer decision-making for activation * refactor: drastically reduce visual documentation skill sizes Reduced skill files by 80-92% for LLM efficiency: - architecture-diagram-creator: 992 → 83 lines (92%) - timeline-creator: 601 → 67 lines (89%) - technical-doc-creator: 525 → 87 lines (83%) - dashboard-creator: 406 → 79 lines (81%) - flowchart-creator: 373 → 78 lines (79%) Total reduction: 2,897 → 394 lines (86% reduction) Skills are for LLMs, not humans. Kept only: - Essential activation criteria - HTML structure templates - Key component patterns - Concise workflow steps Benefits: - Faster skill loading (86% less tokens) - Clearer decision-making - Same functionality, better performance * refactor: reduce all skill sizes for LLM efficiency (76% reduction) Reduced all marketplace skills per user requirement for LLM consumption. Code Operations: 393->84 lines (79%) Productivity Skills: 821->580 lines (29%) Engineering Workflow: 492->393 lines (20%) Visual Documentation: 2897->394 lines (86%) Total: 4603->1827 lines (76% reduction, -2776 lines) Pattern: Keep only activation phrases, brief lists, minimal examples, essential workflow steps.