Use shell tools safely in sandboxed environments by discovering files from real workspace roots instead of assumed user folders, then explicitly verifying output artifacts after generation.
56
63%
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
Fix and improve this skill with Tessl
tessl review fix ./benchmarks/gdpval/skills/sandbox-file-discovery-and-validation/SKILL.mdUse this skill when working in constrained or sandboxed shell environments where common folders like ~/Desktop, ~/Documents, or ~/Downloads may not exist, may be inaccessible, or may not be where task files are stored.
The goal is to:
/ unless necessary.Use this pattern when:
Begin by identifying where you are and what directories are actually available.
Example:
pwd
ls -la
find . -maxdepth 2 -type d | sort
If needed, inspect nearby likely roots:
ls -la /tmp
ls -la /workspace 2>/dev/null || true
ls -la /workspaces 2>/dev/null || true
ls -la /mnt/data 2>/dev/null || true
Treat only confirmed, readable directories as search roots.
Do not begin with paths like:
~/Desktop~/Documents~/Downloadsunless you have already confirmed they exist and are relevant.
Bad:
find ~/Desktop -name "*.xlsx"
Better:
find . -type f -name "*.xlsx"
or, if a root is confirmed:
find /workspace -type f -name "*.xlsx" 2>/dev/null
Prefer targeted searches over broad filesystem scans.
Useful patterns:
find . -type f | sort
find . -type f -iname "*report*"
find . -type f \( -iname "*.csv" -o -iname "*.xlsx" -o -iname "*.json" \)
If multiple roots are known:
find . /workspace /mnt/data -type f 2>/dev/null | sort
Guidelines:
2>/dev/null when appropriate,When generating a file, write it somewhere explicit and easy to re-check.
Good patterns:
./output,Example:
mkdir -p output
python make_result.py --out output/final.xlsx
Avoid writing to guessed locations that may not exist.
Never assume generation succeeded just because a command exited successfully.
At minimum, confirm:
Basic checks:
ls -l output/final.xlsx
test -f output/final.xlsx && echo "exists"
test -s output/final.xlsx && echo "non-empty"
file output/final.xlsx
For text-like outputs:
head -n 20 output/result.csv
wc -l output/result.csv
For structured outputs, inspect with the relevant tool:
.xlsx: verify internal structure or open with a libraryA file existing is necessary but not sufficient.
Check the artifact against the requested deliverable:
Examples:
When you finish, cite the exact artifact path and the validation you performed.
Good completion style:
output/final.xlsx.”Summary and Data.”This reduces false positives where an output was produced but not actually checked.
pwd
ls -la
find . -maxdepth 3 -type f | sort
find . -type f \( -iname "*.xlsx" -o -iname "*.csv" -o -iname "*.tsv" \) | sort
find . /workspace /mnt/data -type f 2>/dev/null | sort
mkdir -p output
some_command > output/result.txt
test -f output/result.txt && test -s output/result.txt && echo "validated"
pwd to anchor yourselffind from . or other verified rootsDiscover roots:
pwd && ls -la
Find candidate inputs:
find . -type f \( -iname "*.xlsx" -o -iname "*.csv" \) | sort
Create controlled output location:
mkdir -p output
Generate artifact:
python transform.py input/source.csv output/final.csv
Validate artifact exists and inspect content:
ls -l output/final.csv
test -s output/final.csv
head -n 5 output/final.csv
Validate requirement-specific properties:
This pattern is applied correctly when:
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.