sandbox-file-discovery-and-validation
यह क्या करती है
यह स्किल AI एजेंट को उन फ़ोल्डरों में फ़ाइलें ढूँढने का मार्गदर्शन देती है जिन तक वह सचमुच पहुँच सकता है, और बाद में अपना आउटपुट पक्का करने का। यह उन लोगों के लिए है जो सीमित या अस्थायी वातावरण में काम करते हैं जहाँ आम फ़ोल्डर न हों।
कब इस्तेमाल करें
- ✓जब आपको अनजान या अस्थायी वातावरण में एजेंट से इनपुट फ़ाइलें ढूँढवानी हों।
- ✓जब सिस्टम पर Desktop या Documents जैसे आम फ़ोल्डर मौजूद न हों।
- ✓जब आपको सबूत चाहिए कि आउटपुट फ़ाइल बनी और जो माँगा था उससे मेल खाती है।
Skill का लिंक
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/sandbox-file-discovery-and-validation/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“इस वातावरण में मेरी अपलोड की हुई स्प्रेडशीट ढूँढिए, एक सारांश फ़ाइल बनाइए, और जाँचिए कि वह सही सहेजी गई।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट मौजूदा वर्किंग फ़ोल्डर और दूसरे पक्के वर्कस्पेस फ़ोल्डरों से शुरू करता है, वहाँ ज़रूरी फ़ाइलें खोजता है, और आउटपुट ज्ञात जगहों पर सहेजता है। फिर वह जाँचता है कि हर आउटपुट मौजूद है, पढ़ा जा सकता है और माँगे गए रूप से मेल खाता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Sandbox File Discovery and Validation
Use 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:
- discover files from actual accessible roots,
- avoid brittle path assumptions,
- generate outputs in known locations, and
- explicitly validate that outputs were created and match expectations.
Core principles
- Do not assume GUI-era user folders exist.
- Start from the current working directory and other confirmed workspace roots.
- Use recursive search from known roots, not from
/unless necessary. - Prefer deterministic output paths you control.
- After creating an artifact, verify it exists, is readable, and matches the requested form.
When to use this
Use this pattern when:
- you need to locate input files in an unfamiliar sandbox,
- the environment may be ephemeral or nonstandard,
- you are producing files for the user,
- success depends on the actual contents or structure of the output.
Recommended workflow
1) Establish your real working roots
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.
2) Avoid assumed folders
Do not begin with paths like:
~/Desktop~/Documents~/Downloads
unless 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
3) Search from known roots with bounded, focused queries
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:
- suppress permission noise with
2>/dev/nullwhen appropriate, - filter by extension or name fragment,
- sort output for stable inspection,
- keep searches bounded to known roots.
4) Choose a deterministic output location
When generating a file, write it somewhere explicit and easy to re-check.
Good patterns:
- current directory,
- a task-specific subdirectory like
./output, - a confirmed writable workspace directory.
Example:
mkdir -p output
python make_result.py --out output/final.xlsx
Avoid writing to guessed locations that may not exist.
5) Immediately validate the output artifact
Never assume generation succeeded just because a command exited successfully.
At minimum, confirm:
- the file exists,
- the path is the one you intended,
- the file is non-empty when applicable,
- the format or structure matches the task.
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:
- CSV: preview headers and row counts
- JSON: parse and inspect keys
- ZIP-like formats such as
.xlsx: verify internal structure or open with a library - generated code/config: run syntax or schema checks if available
6) Validate against task requirements, not just file existence
A file existing is necessary but not sufficient.
Check the artifact against the requested deliverable:
- expected filename or location,
- expected sheet names, tabs, columns, or keys,
- expected formulas, calculations, or derived values,
- expected number of records,
- expected transformations or formatting.
Examples:
- If a workbook was requested, verify the workbook contains the required sheets.
- If formulas were required, verify formulas are present, not just pasted values.
- If a filtered dataset was requested, verify row counts and selected columns.
- If a renamed file was requested, verify the actual output name.
7) Report with evidence
When you finish, cite the exact artifact path and the validation you performed.
Good completion style:
- “Created
output/final.xlsx.” - “Verified it e
अक्सर पूछे जाने वाले सवाल
एजेंट Desktop जैसे फ़ोल्डरों से क्यों बचता है?
स्किल कहती है कि सैंडबॉक्स में ये फ़ोल्डर न हों, इसलिए एजेंट वर्किंग फ़ोल्डर से शुरू करता है।
खोज कितनी गहराई तक होती है?
स्किल ज्ञात मूल फ़ोल्डरों से सीमित खोज सुझाती है, ज़रूरत न हो तो पूरे सिस्टम की नहीं।
अंतिम जाँच में क्या आता है?
यह पक्का करती है कि फ़ाइल मौजूद है, पढ़ी जा सकती है और अपेक्षित रूप में है।
जानकारी
लेखक का मूल विवरण
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.
repo: HKUDS/AgentPilot
लोकप्रियता
- GitHub स्टार
- 7.8k
- रैंकिंग में स्थान
- #12993
- लाइसेंस
- MIT
- अपडेट की गई
- 1/11/2026
कमेंट
- …
इस repository की और skills
agentpilot
7.8kआपके एजेंट को AgentPilot से प्रोजेक्ट को चरण-दर-चरण सुधारने में मदद करती है, जिसमें बदलाव सुझाए, परखे और स्कोर किए जाते हैं।
openspace
7.8kआपके एजेंट को OpenSpace सेट करने में मदद करती है, जो एजेंट स्किल्स सहेजता और वापस लाता है, और MCP के ज़रिए आपके AI ऐप से जुड़ता है।
rsi-arena
7.8kआपके एजेंट को AIME और Terminal-Bench जैसे मानक AI बेंचमार्क टेस्ट सेट करने और चलाने में मदद करती है, ताकि सुधार के तरीकों की तुलना हो सके।
experiment-guide
7.8kआपके एजेंट को छोटे प्रयोग बनाने, उनके नतीजे पढ़ने और जाँच के दौरान उपयोगी निष्कर्ष लिखने में मदद करती है।
मिलती-जुलती skills
diffs
394kयह आपके एजेंट को बदलावों का असली diff बनाने देती है, जिसे व्यूअर लिंक या इमेज फ़ाइल के रूप में साझा किया जा सकता है, हाथ से लिखे सारांश के बजाय।
coding-agent
394kयह आपके एजेंट को बड़े कोडिंग काम Codex, Claude Code या OpenCode को बैकग्राउंड वर्कर के रूप में सौंपने, फिर उसकी प्रगति जांचने में मदद करती है।
gh-issues
394kयह आपके एजेंट को GitHub issues खोजने, उनमें से काम करने लायक चुनने, और सुधार के साथ pull requests खोलने में मदद करती है, जिसमें समीक्षा टिप्पणियों का फ़ॉलो-अप भी शामिल है।