shell-doc-gen-and-locate
What it does
This skill shows the AI agent how to create presentations or PDFs by script when direct library calls fail, then bring the file to the working folder. It is for people who need slides or PDFs from a script.
When to use it
- ✓When direct document creation fails and a shell script can produce the file instead.
- ✓When you need a PowerPoint or PDF file that the script saved somewhere unexpected.
- ✓When you want the finished file moved into the working folder for easy access.
Skill link
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/shell-doc-gen-and-locate/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
“Generate a PowerPoint from my outline with a script, then find the file and move it to my working folder.”
5 new skills a week. 1 minute to read.
How it works
The agent writes a script that creates the file and prints a confirmation. It then uses find to search the workspace for the output, filters by recent changes if needed, and copies the file to the working folder.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Shell Document Generation and Retrieval Workflow
Objective
Enable reliable file creation (e.g., PowerPoint, PDFs) when direct API or library-based generation fails, ensuring the final artifact is located and moved to the working directory regardless of nested output paths.
When to Use
- Standard document generation tools (e.g., direct Python library calls in-memory) fail or are unavailable.
- The
shell_agentcapability is available for executing scripts. - Generated files may be saved in unpredictable nested directories within the workspace.
Procedure
1. Attempt Shell-Based Generation
If direct tool invocation fails, delegate file creation to a shell-executed script.
- Write a script (e.g.,
generate_presentation.pyormake_doc.sh) that produces the file. - Execute the script via the shell agent.
- Ensure the script prints confirmation upon completion.
2. Locate the Output File
Do not assume the file is in the current directory. Shell scripts often create outputs in nested folders (e.g., ./workspace/output/, ./build/).
Use the
findcommand to search the workspace recursively.Example for PowerPoint files:
find . -type f -name "*.pptx"
Example for PDF files:
find . -type f -name "*.pdf"
Filter results by modification time if multiple versions exist (e.g.,
-mmin -10).
3. Retrieve to Working Directory
Once the file path is identified:
Copy the file to the root working directory or the expected delivery location.
cp /path/to/nested/file.pptx ./
Verify the file exists and is non-zero size.
4. Verification
- Confirm the file opens correctly or meets size expectations.
- If the file is not found after
find, check stderr of the generation script for path clues.
Best Practices
- Explicit Paths: Whenever possible, configure generation scripts to output to a known relative path (e.g.,
./output/filename.pptx). - Cleanup: Remove nested temporary copies after retrieving the final version to avoid confusion.
- Logging: Echo the final absolute path of the generated file in the script stdout to simplify locating.
FAQ
Why does the script need to print a message?
The printed confirmation shows the script finished, which helps the agent know when to look for the file.
How does the agent find a PDF?
It runs a recursive find for PDF files across the workspace.
Can it pick the right version?
Yes, the skill suggests filtering by modification time when several versions exist.
Details
Original description by the author
Generate documents via shell commands and locate nested outputs using find.
repo: HKUDS/AgentPilot
Popularity
- GitHub stars
- 7.8k
- Ranking position
- #12999
- 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
feishu-doc
394kHelps your agent read, create, and edit Feishu cloud documents, including text, images, and tables, using the document tool.
feishu-drive
394kLets your agent browse, organize, and comment on files in a Feishu cloud folder that has been shared with the bot.
feishu-perm
394kHelps your agent check and change who can access a Feishu file, choosing the smallest permission that meets your request.