shell-agent-file-ops
What it does
This skill helps the AI agent use a shell agent for file work, such as creating documents or updating config files. It is for people who want to say what they need rather than how to do it.
When to use it
- ✓When you need files created or changed and the best method is not clear.
- ✓When you want automatic error handling and retries for a file job.
- ✓When you would rather describe the result than pick specific tools.
Skill link
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/shell-agent-file-ops/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Update every config file in my config folder to add a timeout of 300. Let the shell agent work out how.”
5 new skills a week. 1 minute to read.
How it works
The agent gives the shell agent a plain-language task. The shell agent picks Python or Bash, writes and runs the code, handles errors with several retry rounds, and returns the result.
Technical content (original SKILL.md)
Original text by the author, straight from 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.
FAQ
Can it edit several files at once?
Yes, the skill's example updates all the configuration files in one folder.
What kinds of files does it handle?
The skill gives examples of documents, notes and configuration files.
Do I need to know the commands?
No, you describe the task and the shell agent handles the commands.
Details
Original description by the author
Leverage shell_agent for autonomous file creation and modification with automatic tool selection and error recovery
repo: HKUDS/AgentPilot
Popularity
- GitHub stars
- 7.8k
- Ranking position
- #12997
- License
- MIT
- Updated
- 11/1/2026
Comments
- …
More skills from this repository
agentpilot
7.8kHelps your agent improve a project step by step by preparing a task and running the AgentPilot loop that proposes, tests and scores changes.
openspace
7.8kHelps your agent set up OpenSpace, a tool that stores and fetches agent skills, and connect it to your AI app through MCP.
rsi-arena
7.8kHelps your agent set up and run standard AI benchmark tests, such as AIME and Terminal-Bench, to compare different improvement methods.
experiment-guide
7.8kHelps your agent plan small experiments, read their results and record findings while it investigates how to improve a program.
Similar skills
add-model-provider
394kLets your agent connect a new AI model provider to OpenClaw using safe setup commands, keep API keys out of plain text, and run a live test.
acp-router
394kHelps your agent send a task to a coding assistant such as Claude Code or Cursor through OpenClaw, so the work runs in that tool.
browser-automation
394kTeaches your agent to control web pages step by step, including logins, tabs, and recovery when a page stops responding.