shell-agent-file-ops
Fungsinya
Skill ini membantu agent AI memakai agent shell untuk pekerjaan file, seperti membuat dokumen atau memperbarui file konfigurasi. Skill ini ditujukan untuk orang yang lebih suka menyebut apa yang mereka perlukan daripada cara melakukannya.
Kapan dipakai
- βSaat file perlu dibuat atau diubah dan metode terbaiknya belum jelas.
- βSaat Anda menginginkan penanganan error dan percobaan ulang otomatis untuk pekerjaan file.
- βSaat Anda lebih suka menjelaskan hasil daripada memilih alat tertentu.
Link skill
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/shell-agent-file-ops/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βPerbarui setiap file konfigurasi di folder config saya untuk menambahkan timeout 300. Biarkan agent shell mencari caranya.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent memberi agent shell tugas dalam bahasa biasa. Agent shell memilih Python atau Bash, menulis dan menjalankan kode, menangani error dengan beberapa putaran percobaan ulang, lalu mengembalikan hasilnya.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Shell Agent File Operations
Purpose
Use shell_agent for file operations when you want the tool to autonomously decide how to accomplish the task (Python vs Bash, which commands to use, error recovery) rather than manually selecting specific tools like write_file or run_shell.
When to Use
Use this pattern when:
- You need to create, modify, or organize files
- The optimal approach (Python script, Bash commands, direct file write) is unclear
- You want automatic error handling and retry logic
- You prefer to describe what to accomplish rather than how
How to Use
Basic Pattern
Delegate to shell_agent with a clear natural-language task description.
Example: Create a Document File
Task description to shell_agent:
Create a comprehensive SOAP note file containing four sections:
Subjective, Objective, Assessment, and Plan. Include all relevant
patient visit details in a professional medical format.
The shell_agent will:
- Decide whether to use Python or Bash
- Write and execute the appropriate code
- Handle any errors automatically (up to several retry rounds)
- Return the result
Example: Modify Existing Files
Task description to shell_agent:
Update all configuration files in the config/ directory to add
a new setting "timeout: 300" under the general section.
Example: Complex File Operations
Task description to shell_agent:
Create a project structure with README.md, src/main.py, and
tests/test_main.py. Include appropriate content in each file
based on a Python data processing project template.
Best Practices
Be specific about content requirements - Describe what should be in the file(s), not just that files should be created.
Include format specifications - Mention desired formats (markdown, JSON, CSV, etc.) when relevant.
Specify file locations - Include paths when files should be in specific directories.
Let shell_agent handle complexity - Don't pre-decide the implementation approach; trust the autonomous selection.
Check the output - Review what shell_agent created to ensure it meets requirements.
Comparison: When NOT to Use This Pattern
Use direct tools instead when:
- You already know the exact command/script to run β use
run_shell - You have the exact file content ready β use
write_filedirectly - The operation is trivial (single-line file write) β use
write_file - You need fine-grained control over the implementation
Anti-Patterns to Avoid
β Don't over-specify the implementation:
Use Python to write a file called notes.md with this content...
β Do describe the desired outcome:
Create a notes.md file with comprehensive documentation about...
β Don't use shell_agent for simple direct operations:
Write "hello" to hello.txt
β
Do use write_file directly for simple cases:
write_file(path="hello.txt", content="hello")
Summary
This pattern shifts focus from implementation mechanics to task intent, leveraging shell_agent's autonomous decision-making for file operations that benefit from intelligent tool selection and automatic error recovery.
Pertanyaan umum
Bisakah beberapa file diubah sekaligus?
Bisa. Contoh dalam skill ini memperbarui semua file konfigurasi di satu folder sekaligus.
Jenis file apa yang ditangani?
Skill ini memberi contoh dokumen, catatan, dan file konfigurasi.
Apakah saya perlu tahu perintahnya?
Tidak. Anda menjelaskan tugasnya dan agent shell menangani perintahnya.
Detail
Deskripsi asli dari pembuat
Leverage shell_agent for autonomous file creation and modification with automatic tool selection and error recovery
repo: HKUDS/AgentPilot
Popularitas
- Bintang GitHub
- 7.8k
- Peringkat
- #12997
- Lisensi
- MIT
- Diperbarui
- 1/11/2026
Komentar
- β¦
Skill lain dari repositori ini
agentpilot
7.8kMembantu agent Anda meningkatkan proyek langkah demi langkah dengan menyiapkan tugas dan menjalankan loop AgentPilot yang mengusulkan, menguji, dan memberi skor pada perubahan.
openspace
7.8kMembantu agent Anda menyiapkan OpenSpace, alat yang menyimpan dan mengambil skill agent, lalu menghubungkannya ke aplikasi AI Anda melalui MCP.
rsi-arena
7.8kMembantu agent Anda menyiapkan dan menjalankan tes benchmark AI standar, seperti AIME dan Terminal-Bench, untuk membandingkan berbagai metode perbaikan.
experiment-guide
7.8kMembantu agent Anda merencanakan eksperimen kecil, membaca hasilnya, dan mencatat temuan saat menyelidiki cara memperbaiki sebuah program.
Skill serupa
add-model-provider
394kMemungkinkan agent Anda menghubungkan penyedia model AI baru ke OpenClaw dengan perintah pengaturan yang aman, menjaga kunci API tetap di luar teks biasa, dan menjalankan uji langsung.
acp-router
394kMembantu agent Anda mengirim tugas ke asisten pemrograman seperti Claude Code atau Cursor lewat OpenClaw, sehingga pekerjaan dijalankan di alat tersebut.
browser-automation
394kMengajari agent Anda mengendalikan halaman web langkah demi langkah, termasuk login, tab, dan pemulihan saat halaman berhenti merespons.