shell-agent-delegation
Fungsinya
Skill ini memberi tahu agent AI untuk menyerahkan tugas sulit kepada agent shell setelah alat langsung gagal. Skill ini ditujukan untuk orang yang memerlukan dokumen atau pekerjaan data selesai tanpa kontrol langkah demi langkah.
Kapan dipakai
- βSaat sandbox kode, pembaca halaman, atau alat pencarian gagal dengan error tidak diketahui.
- βSaat beberapa percobaan alat langsung berturut-turut gagal pada tugas yang sama.
- βSaat tugas dokumen atau data kompleks dan memerlukan beberapa langkah serta pilihan pustaka.
Link skill
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/shell-agent-delegation/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
βBuat templat SBAR satu halaman sebagai PDF. Alat langsung terus gagal, jadi serahkan seluruh pekerjaan kepada agent shell.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent menulis deskripsi tugas yang lengkap dan mandiri, lalu menyerahkannya kepada agent shell. Agent shell memutuskan apakah akan memakai Python atau Bash, menulis kode, menjalankannya, memeriksa output, dan memperbaiki error.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Shell Agent Delegation for Resilient Workflow Execution
When to Use This Skill
Apply this pattern when:
- Direct tool execution (execute_code_sandbox, read_webpage, search_web) fails with 'unknown error'
- Multiple tool attempts have failed in sequence
- The task requires complex document generation or data processing
- You need a tool that can autonomously select libraries and handle multi-step workflows
Why This Works
The shell_agent tool differs from direct execution tools in key ways:
- Autonomous tool selection: Decides whether to use Python or Bash based on the task
- Built-in error recovery: Automatically retries and fixes errors (up to several rounds)
- Iterative execution: Writes code, executes, inspects output, and adapts
- Full workflow ownership: Handles the entire task end-to-end without manual intervention
Step-by-Step Instructions
Step 1: Recognize the Failure Pattern
Identify when to pivot to shell_agent:
- execute_code_sandbox returned 'unknown error'
- read_webpage/search_web failed multiple times
- Direct approaches are struggling with the task complexity
Step 2: Formulate the Delegation Task
Create a clear, self-contained task description for shell_agent:
Good task description:
Create a 1-page SBAR Template PDF document. Include sections for:
- Situation: Brief description of the current situation
- Background: Relevant context and history
- Assessment: Current assessment and analysis
- Recommendation: Proposed actions and next steps
Use a professional layout with clear headings and adequate whitespace.
Key elements to include:
- The end goal (what should be produced)
- Required sections/components
- Format requirements (PDF, DOCX, etc.)
- Any style or layout preferences
Step 3: Execute the Delegation
Call shell_agent with your task description:
# Conceptual example
shell_agent(task="Create a professional SBAR Template PDF with Situation, Background, Assessment, and Recommendation sections. Include clear headings and professional formatting.")
Step 4: Monitor and Verify
After shell_agent completes:
- Check that the output file was created in the working directory
- Verify the content meets requirements
- If issues remain, provide refined instructions to shell_agent
Code Example
# When direct approaches fail:
# execute_code_sandbox(code="...") # Returns 'unknown error'
# search_web(query="...") # Returns 'unknown error'
# Pivot to shell_agent:
shell_agent(
task="Generate a professional one-page template document in PDF format. "
"Include clearly labeled sections with appropriate spacing and formatting. "
"Select the most appropriate Python library for PDF generation.",
timeout=300 # Allow time for iteration and error recovery
)
Best Practices
- Be specific about the output: Clearly describe what the final product should look like
- Trust the autonomy: Let shell_agent decide on libraries and implementation details
- Allow sufficient timeout: Set timeout to 300+ seconds for complex tasks requiring iteration
- One task at a time: Give shell_agent a complete, self-contained objective
- Don't micromanage: Avoid prescribing specific libraries or code unless necessary
Common Use Cases
- Document generation (PDF, DOCX, reports, templates)
- Data processing pipelines with multiple steps
- Web scraping with fallback handling
- Complex file manipulation tasks
- Tasks requiring library discovery and selection
Anti-Patterns to Avoid
β Don't use shell_agent for simple, single-command tasks (use run_shell instead) β Don't provide overly prescriptive code instructions (defeats the autonomous benefit) β Don't set timeout too low (<60 seconds for complex tasks) β Don't split a coherent task into multiple shell_agent calls unnecessarily
Pertanyaan umum
Apa yang membuat deskripsi tugas yang baik?
Skill ini meminta tujuan, bagian, dan isi dijelaskan secara rinci dengan kata-kata biasa agar agent shell dapat bekerja sendiri.
Apakah agent shell memilih alatnya sendiri?
Ya. Agent shell memutuskan apakah memakai Python atau Bash dan pustaka mana yang digunakan.
Berapa kali agent mencoba memperbaiki?
Skill ini menyatakan agent mencoba ulang secara otomatis untuk beberapa putaran.
Detail
Deskripsi asli dari pembuat
Delegate complex tasks to shell_agent when direct tool execution fails, leveraging autonomous error recovery and library selection
repo: HKUDS/AgentPilot
Popularitas
- Bintang GitHub
- 7.8k
- Peringkat
- #12996
- 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.