fallback-file-ops
यह क्या करती है
यह स्किल फ़ोल्डर और फ़ाइलें बनाने का बैकअप तरीका है, जब उच्च-स्तरीय टूल्स अस्पष्ट एरर दें या चुपचाप विफल हों। यह उन लोगों के लिए है जिनका प्रोजेक्ट सेटअप बार-बार विफल होता है।
कब इस्तेमाल करें
- ✓जब फ़ाइल या फ़ोल्डर बनाते समय सैंडबॉक्स अज्ञात एरर दे।
- ✓जब सहायक कहे कि उसने फ़ाइल बनाई है, पर वह असल में मौजूद नहीं है।
- ✓जब मुझे नेस्टेड प्रोजेक्ट फ़ोल्डर संरचना सही तरीके से बनवानी हो।
Skill का लिंक
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/fallback-file-ops/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“कई नेस्टेड फ़ोल्डर और फ़ाइलों वाला प्रोजेक्ट ढाँचा बनाइए। सहायक बार-बार विफल हो रहा है, इसलिए कृपया शेल का इस्तेमाल कीजिए।”
हर हफ़्ते 5 नई skills, 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
- अपडेट की गई
- 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 खोलने में मदद करती है, जिसमें समीक्षा टिप्पणियों का फ़ॉलो-अप भी शामिल है।