fallback-file-ops
하는 일
이 스킬은 상위 도구가 모호한 오류를 내거나 조용히 실패할 때 폴더와 파일을 만드는 대체 방법입니다. AI 프로젝트 설정이 계속 실패하는 사람에게 맞습니다.
사용하는 경우
- ✓샌드박스가 파일이나 폴더를 만드는 중 알 수 없는 오류를 낼 때.
- ✓도우미는 파일을 만들었다고 말하지만 실제로 파일이 없는 경우.
- ✓여러 단계로 중첩된 프로젝트 폴더 구조를 제대로 만들어야 할 때.
스킬 링크
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/fallback-file-ops/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“여러 개의 중첩 폴더와 파일로 프로젝트 폴더 구조를 만들어 주세요. 도우미가 계속 실패하니 셸을 사용해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
AI는 mkdir이나 리디렉션 쓰기 같은 셸 명령으로 바꾸고, ls나 test 명령으로 각 항목이 있는지 확인합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Fallback File Operations
Purpose
When execute_code_sandbox or shell_agent fail with 'unknown error' on filesystem operations, fall back to run_shell with explicit mkdir and file write commands. This hybrid approach is more reliable for creating complex project structures.
When to Apply
execute_code_sandboxreturns 'unknown error' on file/directory creationshell_agentfails to write files or create nested directories- You need to create complex project structures with multiple levels
Procedure
Step 1: Detect Tool Failure
Monitor for these failure patterns:
- Error message contains "unknown error"
- File operations silently fail (file not created)
- Directory creation returns success but directory doesn't exist
Step 2: Switch to run_shell
When failures occur, immediately switch to run_shell for filesystem operations:
# Create directory structure explicitly
run_shell: mkdir -p /path/to/nested/directory
# Write files using shell redirection or echo
run_shell: echo "content" > /path/to/file.txt
# Or use cat with heredoc for multi-line files
run_shell: cat > /path/to/file.txt << 'EOF'
line 1
line 2
EOF
Step 3: Verify Creation
After each operation, verify the file/directory was created:
run_shell: ls -la /path/to/created/item
run_shell: test -f /path/to/file && echo "File exists"
run_shell: test -d /path/to/dir && echo "Directory exists"
Step 4: Continue with Hybrid Approach
- Use
run_shellfor all filesystem operations (mkdir, write, copy, move) - Continue using
execute_code_sandboxorshell_agentfor code execution, compilation, or other non-filesystem tasks - Document which tool handles which operation for clarity
Example: Creating Project Structure
# Failed attempt with execute_code_sandbox
execute_code_sandbox: create directory src/components
# Fallback with run_shell
run_shell: mkdir -p src/components
run_shell: mkdir -p src/utils
run_shell: mkdir -p tests/unit
run_shell: echo "// Component file" > src/components/Button.tsx
run_shell: echo "// Utility file" > src/utils/helpers.ts
Best Practices
- Be explicit: Always use full paths or confirm working directory
- Create parent directories: Use
mkdir -pfor nested structures - Verify before proceeding: Check files exist before dependent operations
- Log tool switches: Note when you fall back to run_shell for debugging
- Batch operations: Group related file operations in consecutive run_shell calls
Common Pitfalls
- Don't assume filesystem state after tool failure
- Don't mix tools for the same file operation (pick one and stick with it)
- Don't skip verification steps when using fallback
자주 묻는 질문
AI는 단계가 실패했다는 것을 어떻게 아나요?
알 수 없는 오류 메시지나, 성공했다고 했지만 나타나지 않는 파일을 살핍니다.
어떤 명령을 쓰나요?
mkdir -p, echo, heredoc을 쓴 cat 같은 명령과, 결과를 확인하는 ls나 test를 씁니다.
검증이 필요한가요?
네, 가이드는 각 파일이나 폴더를 만든 뒤 확인하라고 안내합니다.
상세 정보
작성자의 원본 설명
Use run_shell as fallback when execute_code_sandbox or shell_agent fail on filesystem operations
repo: HKUDS/AgentPilot
인기도
- GitHub 스타
- 7.8k
- 순위
- #12881
- 라이선스
- MIT
- 업데이트
- 2026. 11. 1.
댓글
- …
이 저장소의 다른 스킬
agentpilot
7.8k작업을 준비하고 AgentPilot 루프를 실행해 변경을 제안, 테스트, 점수화하면서 프로젝트를 단계적으로 개선하도록 돕습니다.
openspace
7.8k에이전트 스킬을 저장하고 가져오는 도구인 OpenSpace를 설정하고, MCP를 통해 AI 앱에 연결하도록 돕습니다.
rsi-arena
7.8kAIME나 Terminal-Bench 같은 표준 AI 벤치마크 테스트를 설정하고 실행해 서로 다른 개선 방법을 비교하도록 돕습니다.
experiment-guide
7.8k프로그램을 개선하는 방법을 조사하면서 작은 실험을 계획하고, 결과를 읽고, 발견 사항을 기록하도록 돕습니다.