Sandbox Algorithms
Purpose
Execute small deterministic algorithm tasks through the EdgeOne sandbox code interpreter instead of relying only on model reasoning.
Filesystem (critical)
This skill directory exists only on the Claude Code host (the agent process). It is not mounted into the EdgeOne sandbox.
After this skill loads, do not list or search the skill base directory.
Never call files_list, files_read, files_exists, or commands on:
- this skill's base directory
/tmp/user-code.claude/skills- any other agent
cwdpath
Those tools operate on a separate sandbox VM and will return not found.
If you need scripts/algorithms.py, use Claude Code Read on .claude/skills/sandbox-algorithms/scripts/algorithms.py. For typical algorithm questions, skip that file and run a self-contained snippet.
When to Use
Use this skill for requests involving:
- Fibonacci sequence calculation.
- Factorial calculation.
- Prime or composite number checks.
- Prime list generation.
- Sorting or searching examples.
- Combination, permutation, or binomial coefficient calculation.
- Small dynamic programming demonstrations.
- User requests that explicitly mention sandbox execution, runCode, code_interpreter, or algorithm scripts.
Workflow
- Identify the algorithm task and required inputs.
- Write a small self-contained Python snippet. Do not probe the skill directory first.
- Execute the snippet with the EdgeOne sandbox
code_interpretertool. - Inspect
results,logs, anderror. - If execution fails, fix the code and run once more.
- Return the final answer with a short explanation and the executed result.
Tool Usage Rules
- Use
code_interpreterfor actual computation whenever available. - Do not fake tool outputs.
- Do not rely only on mental arithmetic for requested algorithm execution.
- Keep code snippets deterministic and self-contained. Put the full implementation in the
codeargument; do notimporthost skill files. - Set a reasonable timeout, usually 5 to 15 seconds for small algorithms.
- Avoid network access unless the user explicitly asks for it.
- Avoid writing files unless a file is necessary for the task.
Output Format
Return:
## Result
...
## Method
- Algorithm: ...
- Executed with: EdgeOne sandbox `code_interpreter`
## Execution Output
```text
...
```
For very small answers, keep the response concise.