Pular para o conteúdo
Skillpedia
Agentes7,8 mil · #12997

shell-agent-file-ops

O que ela faz

Esta skill ajuda o agente de IA a usar um agente de shell para trabalhar com arquivos, como criar documentos ou atualizar arquivos de configuração. É para pessoas que querem dizer o que precisam, e não como fazer.

Quando usar

  • ✓Quando precisa criar ou alterar arquivos e o melhor método não está claro.
  • ✓Quando quer tratamento automático de erros e novas tentativas em um trabalho com arquivos.
  • ✓Quando prefere descrever o resultado a escolher ferramentas específicas.

Link da skill

https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/shell-agent-file-ops/SKILL.md

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/shell-agent-file-ops/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Atualize todos os arquivos de configuração da minha pasta de configurações para adicionar um timeout de 300. Deixe o agente de shell descobrir como.”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

O agente entrega ao agente de shell uma tarefa em linguagem simples. Este escolhe Python ou Bash, escreve e executa o código, trata os erros com várias rodadas de novas tentativas e devolve o resultado.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do 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:

  1. Decide whether to use Python or Bash
  2. Write and execute the appropriate code
  3. Handle any errors automatically (up to several retry rounds)
  4. 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

  1. Be specific about content requirements - Describe what should be in the file(s), not just that files should be created.

  2. Include format specifications - Mention desired formats (markdown, JSON, CSV, etc.) when relevant.

  3. Specify file locations - Include paths when files should be in specific directories.

  4. Let shell_agent handle complexity - Don't pre-decide the implementation approach; trust the autonomous selection.

  5. 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_file directly
  • 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.

Perguntas frequentes

Ele consegue editar vários arquivos de uma vez?

Sim. O exemplo da skill atualiza todos os arquivos de configuração de uma pasta em uma só operação.

Que tipos de arquivo ele trata?

A skill dá exemplos de documentos, anotações e arquivos de configuração.

Preciso conhecer os comandos?

Não. Você descreve a tarefa e o agente de shell cuida dos comandos.

Detalhes

Descrição original do autor

Leverage shell_agent for autonomous file creation and modification with automatic tool selection and error recovery

repo: HKUDS/AgentPilot

Popularidade

Estrelas no GitHub
7,8 mil
Posição no ranking
#12997
Licença
MIT
Atualizada em
01/11/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas