shell-agent-delegation
Qué hace
Esta skill indica al agente de IA que pase una tarea difícil a un agente de shell cuando fallan las herramientas directas. Está pensada para quienes necesitan terminar un trabajo de documentos o de datos sin un control paso a paso.
Cuándo usarla
- ✓Cuando el entorno aislado de código, el lector de páginas o la herramienta de búsqueda fallan con errores desconocidos.
- ✓Cuando varios intentos seguidos con herramientas directas han fallado en la misma tarea.
- ✓Cuando un trabajo de documentos o de datos es complejo y necesita varios pasos y elección de bibliotecas.
Link de la skill
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/shell-agent-delegation/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Crea una plantilla de una página en formato SBAR en PDF. Las herramientas directas siguen fallando, así que entrega todo el trabajo a un agente de shell.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente escribe una descripción de tarea clara e independiente y se la entrega al agente de shell. Este decide si usa Python o Bash, escribe el código, lo ejecuta, comprueba la salida y corrige los errores.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de 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
Preguntas frecuentes
¿Qué hace buena una descripción de tarea?
La skill indica describir el objetivo, las secciones y el contenido con detalle y en lenguaje sencillo, para que el agente de shell pueda trabajar por su cuenta.
¿Elige el agente de shell las herramientas?
Sí. Decide si usa Python o Bash y qué bibliotecas emplear.
¿Cuántos intentos de corrección hace?
La skill indica que reintenta automáticamente durante varias rondas.
Detalles
Descripción original del autor
Delegate complex tasks to shell_agent when direct tool execution fails, leveraging autonomous error recovery and library selection
repo: HKUDS/AgentPilot
Popularidad
- Estrellas en GitHub
- 7,8 mil
- Posición en el ranking
- #12996
- Licencia
- MIT
- Actualizada
- 1/11/2026
Comentarios
- …
Más skills de este repositorio
agentpilot
7,8 milAyuda a tu agente a mejorar un proyecto paso a paso, preparando una tarea y ejecutando el bucle de AgentPilot que propone, prueba y puntúa cambios.
openspace
7,8 milAyuda a tu agente a configurar OpenSpace, una herramienta que guarda y recupera skills de agentes, y a conectarla a tu app de IA mediante MCP.
rsi-arena
7,8 milAyuda a tu agente a configurar y ejecutar pruebas de referencia de IA conocidas, como AIME y Terminal-Bench, para comparar distintos métodos de mejora.
experiment-guide
7,8 milAyuda a tu agente a planificar experimentos pequeños, leer sus resultados y anotar conclusiones mientras investiga cómo mejorar un programa.
Skills parecidas
add-model-provider
394 milPermite que tu agente conecte un nuevo proveedor de modelos de IA a OpenClaw con comandos de configuración seguros, mantenga las claves API fuera del texto plano y haga una prueba en vivo.
acp-router
394 milAyuda a tu agente a enviar una tarea a un asistente de programación como Claude Code o Cursor a través de OpenClaw, para que el trabajo se ejecute en esa herramienta.
browser-automation
394 milEnseña a tu agente a controlar páginas web paso a paso, incluidos los inicios de sesión, las pestañas y la recuperación cuando una página deja de responder.