token-efficient
Use when processing 50+ items, analyzing CSV/log files, executing code in sandbox, or searching for tools. Load for data processing tasks. Achieves 98%+ token savings via in-sandbox execution, progressive disclosure, and pagination. Supports heredocs for multi-line bash.
When & Why to Use This Skill
The Token-Efficient MCP is a high-performance Claude skill designed to optimize context window usage by offloading heavy data processing to a secure sandbox environment. It enables the analysis of large CSV files, extensive system logs, and complex datasets while achieving over 98% token savings through advanced techniques like progressive disclosure, pagination, and in-sandbox code execution (Python, Bash, and Node.js).
Use Cases
- Large-scale Data Analysis: Filtering and aggregating CSV files with 10,000+ rows by processing data in a sandbox and returning only the summarized results.
- Efficient Log Auditing: Searching through massive application logs for specific error patterns or warnings without loading the raw text into the conversation context.
- Resource-Intensive Scripting: Executing complex multi-line Bash or Python scripts for data transformation and batch processing while maintaining minimal token overhead.
- Dynamic Tool Discovery: Reducing prompt bloat by searching for and loading specific tools on-demand rather than pre-loading all available tool definitions.
| name | token-efficient |
|---|---|
| description | "Use when processing 50+ items, analyzing CSV/log files, executing code in sandbox, or searching for tools. Load for data processing tasks. Achieves 98%+ token savings via in-sandbox execution, progressive disclosure, and pagination. Supports heredocs for multi-line bash." |
| keywords | csv, logs, execute, sandbox, pagination, batch, filter, aggregate |
Token-Efficient MCP
Process data in sandbox, return only results. 98%+ token savings.
Instructions
- Search for tool:
search_tools("csv")(95% savings vs loading all) - Process data in sandbox (never load raw to context)
- Use pagination for large files:
offset,limit - Return summaries, not raw data
Quick Commands
# Process CSV with filter
scripts/process-csv.sh data.csv "price > 100"
# Search logs for errors
scripts/search-logs.sh app.log "ERROR|WARN"
# Execute code in sandbox
scripts/run-sandbox.sh script.py
Token Savings
| Tool | Savings | Example |
|---|---|---|
execute_code |
98%+ | Run Python without loading |
process_csv |
99% | 10K rows → 100 results |
process_logs |
95% | 100K lines → 500 matches |
search_tools |
95% | Find tools on-demand |
MCP Tools
| Tool | Purpose |
|---|---|
execute_code |
Python/Bash/Node in sandbox |
process_csv |
Filter, aggregate CSV |
process_logs |
Pattern match logs |
search_tools |
Find tools by keyword |
batch_process_csv |
Multiple CSVs at once |
References
| File | Load When |
|---|---|
| references/patterns.md | Choosing which tool |
| references/examples.md | Need code examples |