sandbox-routing

Solid

SELF-CORRECT tool choice. About to Read a long file just to extract one piece of info? Use a sandbox tool that returns only the summary. About to run a long shell command? Same. Sandbox keeps raw output OUT of context — only summaries land. Triggers when about to flood context with large output.

AI & Automation 11 stars 3 forks Updated today MIT

Install

View on GitHub

Quality Score: 79/100

Stars 20%
36
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Sandbox Routing > [!danger] HARD RULE — fires before any large Read or Bash that isn't for editing > If you're about to Read a long file to *analyze* (not to Edit), or run a Bash command with >20 line output, **route through sandbox tools instead**. Raw output stays out of context; only the summary you print enters context. This skill assumes your Claude Code install includes context-mode (or equivalent) sandbox tools — `ctx_execute`, `ctx_execute_file`, `ctx_batch_execute`. If those aren't available, the principle still applies: use `head_limit` on Grep, narrow Read to specific line ranges, and avoid `cat large.log`. ## The decision tree ``` Am I about to Read or run Bash? ├── Editing a file? (need full content for Edit tool) │ → Read is correct, proceed │ ├── Running git status / git log -n short / mkdir / mv / rm / short command? │ → Bash is correct, proceed │ ├── Reading a file just to extract a piece of info / find a line? │ → STOP. Use ctx_execute_file with grep/awk code that prints just the answer. │ ├── Running a shell command with >20 line output? │ → STOP. Use ctx_execute with the same command — only printed summary enters context. │ └── Multiple commands at once? → Use ctx_batch_execute with all commands as labelled chunks, indexed for FTS5 search. ``` ## When to use each tool ### `ctx_execute(language, code)` - Shell command with large output → `language: "shell"` - Python data processing → `l...

Details

Author
wrg32786
Repository
wrg32786/aigent-os
Created
1 months ago
Last Updated
today
Language
JavaScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

context-mode

Context-mode is an MCP server plugin that reduces context window usage by ~98% through sandboxed tool routing. MUST be applied whenever Claude is running inside a context-mode-enabled session — it is not optional. Trigger when: context-mode MCP server is present in the session; running Bash commands that produce more than 20 lines of output; reading files for analysis; fetching web pages and searching them; batch execution of multiple queries; or when you need to prevent raw tool outputs from flooding the context window. Key capabilities: routes Bash to ctx_execute / ctx_batch_execute (captures output, prevents bloat); routes Read to ctx_execute_file (raw content never enters context); routes WebFetch to ctx_fetch_and_index then ctx_search (fetch once, query indexed content on demand); enforces strict output rules (under 500 words, write artifacts to files, return only path + 1-line description). Ideal for: working in long-running sessions with large codebases; running multi-step debugging workflows that prod

0 Updated today
Tekkiiiii
AI & Automation Solid

sandbox

Provides read_file/write_file/exec/list_files/read_file/write_file for running process and managing filesystems in the sandbox. Ideal for code testing, file management, and command execution. The sub_claude_agent tool is available for advanced use cases. You MUST load this skill BEFORE use sandbox tools.

667 Updated today
wecode-ai
Data & Documents Listed

context-mode

Use context-mode tools (ctx_execute, ctx_execute_file) instead of Bash/cat when processing large outputs. Triggers: "analyze logs", "summarize output", "process data", "parse JSON", "filter results", "extract errors", "check build output", "analyze dependencies", "process API response", "large file analysis", "page snapshot", "browser snapshot", "DOM structure", "inspect page", "accessibility tree", "Playwright snapshot", "run tests", "test output", "coverage report", "git log", "recent commits", "diff between branches", "list containers", "pod status", "disk usage", "fetch docs", "API reference", "index documentation", "call API", "check response", "query results", "find TODOs", "count lines", "codebase statistics", "security audit", "outdated packages", "dependency tree", "cloud resources", "CI/CD output". Also triggers on ANY MCP tool output that may exceed 20 lines. Subagent routing is handled automatically via PreToolUse hook.

5 Updated today
opencue