Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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.
.claude/skills/wecode-ai-sandbox-environment/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-06 | ✗→✓ | ▲ Improved | 460% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 243% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 208% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 255% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 340% | 0% |
Execute code, commands, and complex tasks securely in isolated Docker containers running AlmaLinux 9.4.
The sandbox environment provides fully isolated execution spaces with:
Use this skill when you need to:
Note: The sub_claude_agent tool should only be used when the user explicitly requests Claude AI assistance (e.g., "use Claude to generate...", "ask Claude to create...").
execExecute shell commands in the sandbox environment.
Use Cases:
Parameters:
command (required): Shell command to executeworking_dir (optional): Working directory pathtimeout (optional): Timeout in secondsExample:
json{ "name": "exec", "arguments": { "command": "python script.py --arg value", "working_dir": "/home/user/project" } }
sub_claude_agentRun Claude AI to execute complex tasks in the sandbox.
⚠️ IMPORTANT: This tool should only be used when the user explicitly requests it. Do not use this tool automatically or as a default option.
Use Cases:
Parameters:
prompt (required): Task description for Claudeallowed_tools (optional): List of tools Claude can useappend_system_prompt (optional): Additional system prompttimeout (optional): Timeout in seconds (minimum: 600 seconds / 10 minutes, default: 1800 seconds / 30 minutes)Features:
Example:
json{ "name": "sub_claude_agent", "arguments": { "prompt": "Create a 5-page presentation about the history of artificial intelligence", "allowed_tools": "Edit,Write,Bash(*),skills,Read" } }
list_filesList files and subdirectories in a directory.
Parameters:
path (required): Directory pathdepth (optional): Recursion depth, default 1Returns:
Example:
json{ "name": "list_files", "arguments": { "path": "/home/user/project", "depth": 2 } }
read_fileRead file contents.
Parameters:
file_path (required): File path to readLimits:
Example:
json{ "name": "read_file", "arguments": { "file_path": "/home/user/config.json" } }
write_fileWrite content to a file.
⚠️ IMPORTANT: Both file_path AND content are REQUIRED parameters. You must always provide the content to write.
Parameters:
file_path (REQUIRED): File path to writecontent (REQUIRED): Content to write (MUST be provided, cannot be omitted)format (optional): Content format - 'text' (default) or 'bytes' (base64-encoded)create_dirs (optional): Auto-create parent directories (default: True)Features:
Example - Text file:
json{ "name": "write_file", "arguments": { "file_path": "/home/user/output.txt", "content": "Hello, Sandbox!" } }
Example - HTML file:
json{ "name": "write_file", "arguments": { "file_path": "/home/user/index.html", "content": "<!DOCTYPE html><html><head><title>Test</title></head><body><h1>Hello</h1></body></html>" } }
upload_attachmentUpload a file from sandbox to Wegent and get a download URL for users.
Use Cases:
Parameters:
file_path (required): Path to the file in sandbox to uploadtimeout_seconds (optional): Upload timeout in seconds (default: 300)Returns:
success: Whether the upload succeededattachment_id: ID of the uploaded attachmentfilename: Name of the uploaded filefile_size: Size of the file in bytesmime_type: MIME type of the filedownload_url: Relative URL for downloading (e.g., /api/attachments/123/download)Limits:
Example:
json{ "name": "upload_attachment", "arguments": { "file_path": "/home/user/documents/report.pdf" } }
After Upload - Presenting to User: After a successful upload, present the download link to the user:
Document generation completed!
📄 **report.pdf**
[Click to Download](/api/attachments/123/download)download_attachmentDownload a file from Wegent attachment URL to sandbox for processing.
Use Cases:
Parameters:
attachment_url (required): Wegent attachment URL (e.g., /api/attachments/123/download)timeout_seconds (optional): Download timeout in seconds (default: 300)The tool resolves the attachment filename and owning subtask from Wegent, then saves it to the canonical task attachment directory: /home/user/{task_id}:executor:attachments/{subtask_id}/{filename}.
Returns:
success: Whether the download succeededfile_path: Full path to the downloaded file in sandboxfile_size: Size of the downloaded file in bytesExample:
json{ "name": "download_attachment", "arguments": { "attachment_url": "/api/attachments/123/download" } }
| Task Type | Recommended Tool | Reason | |-----------|-----------------|--------| | Execute commands or scripts | exec | Fast execution, no overhead | | Create/delete directories | exec | Use mkdir -p or rm -rf directly | | Read files | read_file | Better error handling and size validation | | Write files | write_file | Auto directory creation, size validation | | Browse directories | list_files | Structured output with metadata | | Upload files for user download | upload_attachment | Get download URL for user-facing files | | Download attachments | download_attachment | Retrieve Wegent attachments into sandbox | | Complex tasks with Claude | sub_claude_agent | Only when user explicitly requests |
Important: Always prefer exec for standard operations. Only use sub_claude_agent when the user specifically asks for Claude AI assistance.
json{ "name": "exec", "arguments": { "command": "cd /home/user && python -m pip install requests && python app.py" } }
json{ "name": "exec", "arguments": { "command": "dnf install -y gcc make && gcc --version" } }
json// 1. List files { "name": "list_files", "arguments": { "path": "/home/user" } } // 2. Read file { "name": "read_file", "arguments": { "file_path": "/home/user/data.json" } } // 3. Write file { "name": "write_file", "arguments": { "file_path": "/home/user/result.txt", "content": "Processing complete: Success" } }
json{ "name": "exec", "arguments": { "command": "git clone https://github.com/user/repo.git && cd repo && git checkout -b feature" } }
⚠️ zip is not pre-installed. Always run dnf install -y zip before using it.
⚠️ Always use English or pinyin folder names as the ZIP root directory. The zip command does not set the ZIP UTF-8 flag, so Windows decodes Chinese names using CP437, resulting in garbled folders that appear empty.
json// Step 1: Install zip { "name": "exec", "arguments": { "command": "dnf install -y zip" } } // Step 2: Create ZIP with English folder name (recommended) { "name": "exec", "arguments": { "command": "zip -r 'my-skill.zip' 'my-skill/'" } }
If the user explicitly requires a Chinese folder name, use Python's zipfile module instead — it automatically sets the UTF-8 flag so Windows can decode Chinese names correctly:
json{ "name": "exec", "arguments": { "command": "python3 -c \"\nimport zipfile, os\nfolder = '中文名称'\nwith zipfile.ZipFile(folder + '.zip', 'w', zipfile.ZIP_DEFLATED) as zf:\n for root, dirs, files in os.walk(folder):\n for f in files:\n zf.write(os.path.join(root, f))\n\"" } }
Example user request: "Please use Claude to generate a presentation about AI"
json{ "name": "sub_claude_agent", "arguments": { "prompt": "Create a 5-page presentation about the history of artificial intelligence" } }
Note: This scenario should only be used when the user explicitly asks for Claude assistance.
Control Claude's available tools via the allowed_tools parameter:
json{ "allowed_tools": "Edit,Write,MultiEdit,Bash(*),skills,Read,Glob,Grep,LS" }
Bash(*): Allow all Bash commandssuccess fieldsub_claude_agent when user explicitly requests Claude assistancezip first with dnf install -y zip; always use English/pinyin folder names for cross-platform compatibility; if Chinese names are required, use Python's zipfile module (it sets the UTF-8 flag correctly, preventing garbled names on Windows)Cause: Executor Manager unavailable Solution: Check service status and configuration
Cause: Incorrect path or file doesn't exist Solution: Use absolute paths, verify with list_files first
Cause: Task execution takes too long Solution: Increase timeout setting or split into smaller tasks
Cause: Exceeds size limit (1MB read / 10MB write) Solution: Process in chunks or adjust configuration
Cause: Insufficient file permissions Solution: Check file paths and permission settings
Cause: The zip command stores filenames as raw bytes without setting the ZIP UTF-8 flag (bit 11). Windows decodes them using CP437, turning Chinese folder names into garbled text, making contents inaccessible. Solution: Use English/pinyin folder names with the zip command. If Chinese names are required, use Python's zipfile module — it sets the UTF-8 flag automatically:
bashpython3 -c " import zipfile, os folder = '中文名称' with zipfile.ZipFile(folder + '.zip', 'w', zipfile.ZIP_DEFLATED) as zf: for root, dirs, files in os.walk(folder): for f in files: zf.write(os.path.join(root, f)) "
Other measured skills in the registry, with their headline benchmark lift.