shell-agent-file-workflow
What it does
This workflow guides the AI agent to have a shell agent make complex files, then find them. It is for people whose file tools fail on formats such as slides, documents or PDFs.
When to use it
- ✓When direct file creation tools fail on a complex format such as slides or documents.
- ✓When the file needs several steps, libraries or error fixes to produce.
- ✓When the generated file may be saved in a nested folder that you cannot easily find.
Skill link
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/shell-agent-file-workflow/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
“Make a PowerPoint deck for my quarterly review. The direct tools failed, so have a shell agent build it and then find the file.”
5 new skills a week. 1 minute to read.
How it works
The agent gives the shell agent a clear task. After the shell agent finishes, the agent searches the workspace for the new file by name and recent modification time, so it can be found in any nested folder.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Shell Agent File Generation Workflow
When direct document or file generation approaches fail, delegate the task to shell_agent which can autonomously write code, execute it, and retry on errors. Generated files may appear in nested workspace directories.
When to Use
- Direct file generation tools or
create_filefunctions fail for complex formats - Complex file creation requiring multiple steps, libraries, or error recovery
- When you need an autonomous agent to figure out how to accomplish a goal
- File generation that requires iteration and automatic error fixing
Workflow Steps
Step 1: Delegate File Generation to shell_agent
Use shell_agent with a clear, specific task description:
shell_agent(task="Create a [file type] with [specific content/structure requirements]")
The agent will:
- Decide whether to use Python or Bash
- Write and execute code
- Inspect output and iterate
- Automatically retry and fix errors (up to several rounds)
Step 2: Locate Generated Files
Files may be created in nested directories within the workspace. Use find to locate them:
find . -name "*.extension" -type f
For multiple file types:
find . -type f \( -name "*.pptx" -o -name "*.docx" -o -name "*.pdf" \)
For recently modified files (last 10 minutes):
find . -name "*.extension" -type f -mmin -10
Step 3: Copy Files to Working Directory
Once located, copy the file to your working directory:
cp /path/to/found/file.extension ./
Example
Creating a PowerPoint Presentation
# Step 1: Delegate to shell_agent
shell_agent(task="Create a 10-slide PowerPoint presentation covering: topic A, topic B, topic C")
# Step 2: Find the generated file
find . -name "*.pptx" -type f
# Output might show: ./workspace/nested/path/presentation.pptx
# Step 3: Copy to working directory
cp ./workspace/nested/path/presentation.pptx ./
Creating a PDF Report
# Step 1: Delegate generation
shell_agent(task="Generate a PDF report with charts and tables from the provided data")
# Step 2: Locate output
find . -name "*.pdf" -type f -mmin -5
# Step 3: Retrieve file
cp ./generated/reports/output.pdf ./
Tips
- Be specific in task description: Include file format, structure, and content requirements explicitly
- Check multiple extensions: If unsure of output format, search for common extensions
- Use modification time: Filter by recent files to identify newly created outputs
- Verify file integrity: After copying, check that the file is valid and complete
Troubleshooting
| Issue | Solution |
|---|---|
| No files found | Expand search: remove extension filter, increase time window |
| Multiple files found | Sort by modification time: find . -name "*.ext" -type f -printf '%T@ %p\n' | sort -n |
| File is corrupted | Re-run shell_agent with more specific requirements |
| Permission errors | Use sudo or check directory permissions |
FAQ
How does the agent find the file?
It uses the find command to search by file type, and can filter for files changed in the last few minutes.
Which file types can it search for?
The skill names PowerPoint, Word and PDF files as examples.
What happens if several versions exist?
The skill suggests filtering by modification time to pick the newest one.
Details
Original description by the author
Delegate file generation to shell_agent when direct tools fail, with systematic file location and retrieval
repo: HKUDS/AgentPilot
Popularity
- GitHub stars
- 7.8k
- Ranking position
- #12998
- 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.