본문으로 건너뛰기
Skillpedia
일반 코딩7.8k · #12993

sandbox-file-discovery-and-validation

하는 일

이 스킬은 AI 에이전트가 실제로 접근할 수 있는 폴더에서 파일을 찾고, 작업 후 출력을 확인하도록 안내합니다. 흔한 폴더가 없을 수 있는 제한적이거나 임시적인 환경에서 일하는 사람을 위한 스킬입니다.

사용하는 경우

  • ✓낯설거나 임시적인 환경에서 에이전트가 입력 파일을 찾아야 할 때.
  • ✓시스템에 바탕화면이나 문서 폴더 같은 흔한 폴더가 없을 수 있을 때.
  • ✓출력 파일이 만들어졌고 요청한 형식과 맞는다는 증거가 필요할 때.

스킬 링크

https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/sandbox-file-discovery-and-validation/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/sandbox-file-discovery-and-validation/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이 환경에 업로드한 스프레드시트를 찾고, 요약 파일을 만든 뒤 제대로 저장되었는지 확인해 주세요.”

매주 새 스킬 5개. 읽는 데 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:

  1. discover files from actual accessible roots,
  2. avoid brittle path assumptions,
  3. generate outputs in known locations, and
  4. 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/null when 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
자주 묻는 질문

에이전트는 왜 바탕화면 같은 폴더를 피하나요?

스킬은 샌드박스에서 이런 폴더가 없을 수 있으므로, 에이전트가 작업 폴더에서 시작한다고 설명합니다.

검색은 얼마나 깊게 하나요?

스킬은 필요한 경우가 아니면 전체 시스템이 아니라 알려진 시작 위치에서 제한된 검색을 하라고 제안합니다.

마지막 확인에는 무엇이 포함되나요?

파일이 존재하고, 읽을 수 있으며, 예상한 형태를 갖췄는지 확인합니다.

상세 정보

작성자의 원본 설명

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
업데이트
2026. 11. 1.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬