Fallback to run_shell and write_file when execute_code_sandbox or shell_agent fail on filesystem operations
70
85%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
When creating complex project structures, automated tools like execute_code_sandbox and shell_agent may fail with 'unknown error' on filesystem operations. This skill provides a reliable fallback strategy using explicit shell commands.
Apply this pattern when:
execute_code_sandbox fails with unknown error on file/directory creationshell_agent fails to complete filesystem operations after retriesWhen either execute_code_sandbox or shell_agent fails on filesystem operations (especially after automatic retries), immediately switch to the manual hybrid approach.
Use run_shell with mkdir -p for each required directory:
run_shell command="mkdir -p /path/to/nested/directory"The -p flag ensures parent directories are created automatically.
Use write_file tool for each file with explicit path and content:
write_file path="/path/to/file.py" content="..."Do not attempt to batch multiple file creations in a single operation.
Confirm the structure was created correctly:
run_shell command="ls -la /path/to/directory"
# or
run_shell command="tree /path/to/directory"[execute_code_sandbox fails on project setup]
↓
[run_shell mkdir -p src/components]
[run_shell mkdir -p src/utils]
[run_shell mkdir -p tests]
↓
[write_file path="src/main.py" content="..."]
[write_file path="src/components/widget.py" content="..."]
[write_file path="tests/test_main.py" content="..."]
↓
[run_shell ls -la src/ # verify]run_shell executes commands directly without the abstraction layer that can failwrite_file is a primitive operation with fewer failure modes❌ Don't keep retrying the same failing execute_code_sandbox command
❌ Don't attempt to create complex nested structures in a single Python script via sandbox
❌ Don't assume directories exist before writing files to them
❌ Don't skip verification on critical project scaffolding
c5a9c4b
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.