用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/HKUDS/OpenSpace --skill sandbox-execution-fallback-717e65命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Incremental audio production with duration mismatch handling, adaptive stem extension, and pre-mix alignment verification
Audio production with diagnostic analysis, timecode parsing from documents, and verified export workflow
Incremental audio production with duration alignment handling, per-stem verification, and adaptive extension strategies
基于 SOC 职业分类
正在显示 SKILL.md
| name | sandbox-execution-fallback-717e65 |
| description | Fallback from execute_code_sandbox to file-based run_shell execution when sandbox fails |
Apply this pattern when execute_code_sandbox fails repeatedly or exhibits instability. Common triggers include:
Recognize the failure pattern:
execute_code_sandbox produces repeated errors despite code correctionsUse write_file to save your script:
write_file(
path="script.py",
content="#!/usr/bin/env python3
# Your Python code here
import sys
print('Executing via file-based approach')
# ... rest of your code
"
)
For multi-file projects, write each file separately:
write_file(path="utils.py", content="# Utility functions\ndef helper(): ...")
write_file(path="main.py", content="from utils import helper\nhelper()")
Run the script using run_shell:
run_shell(command="python3 script.py")
For scripts in subdirectories:
run_shell(command="cd mydir && python3 script.py")
run_shell outputread_file if neededrun_shell(command="rm script.py")
| Benefit | Explanation |
|---|---|
| Bypasses provider limitations | No sandbox resource constraints |
| Better error visibility | Full stack traces and system errors |
| Environment control | Direct access to system Python and packages |
| Multi-file support | Easy imports and module structure |
| Persistence | Files remain for inspection and debugging |
| Reliability | More consistent execution behavior |
# Scenario: execute_code_sandbox failing on data processing task
# Step 1: Write the script
write_file(
path="process_data.py",
content="#!/usr/bin/env python3
import json
import csv
# Load and process data
with open('input.json', 'r') as f:
data = json.load(f)
# Transform data
results = []
for item in data:
results.append({'processed': item['value'] * 2})
# Write output
with open('output.csv', 'w', newline='') as f:
writer = csv.DictWriter(f, fieldnames=['processed'])
writer.writeheader()
writer.writerows(results)
print('Processing complete')
"
)
# Step 2: Execute via shell
run_shell(command="python3 process_data.py")
# Step 3: Read results
read_file(filetype="csv", file_path="output.csv")
# Step 4: Clean up (optional)
run_shell(command="rm process_data.py")
| Issue | Solution |
|---|---|
python3 not found | Try python or specify full path /usr/bin/python3 |
| Import errors | Use run_shell(command="pip3 install package") first |
| Permission denied | Add execute permission: run_shell(command="chmod +x script.py") |
| Working directory issues | Use absolute paths or cd in the command |