shell-doc-gen-and-locate
Skill này làm gì
Skill này chỉ cho AI agent cách tạo bài thuyết trình hoặc PDF bằng script khi các lệnh thư viện trực tiếp thất bại, rồi đưa file về thư mục làm việc. Nó dành cho những người cần slide hoặc PDF từ một script.
Khi nào nên dùng
- ✓Khi tạo tài liệu trực tiếp thất bại và một script shell có thể tạo ra file thay thế.
- ✓Khi bạn cần file PowerPoint hoặc PDF mà script đã lưu ở một nơi không mong đợi.
- ✓Khi bạn muốn đưa file đã hoàn tất vào thư mục làm việc để dễ truy cập.
Liên kết skill
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/shell-doc-gen-and-locate/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tạo một bài PowerPoint từ dàn ý của tôi bằng một script, rồi tìm file và chuyển nó vào thư mục làm việc của tôi.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent viết một script tạo file và in một xác nhận. Sau đó nó dùng find để tìm đầu ra trong không gian làm việc, lọc theo thay đổi gần đây nếu cần, rồi sao chép file vào thư mục làm việc.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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.
Câu hỏi thường gặp
Tại sao script cần in một thông báo?
Thông báo xác nhận cho thấy script đã kết thúc, giúp agent biết khi nào cần tìm file.
Agent tìm file PDF bằng cách nào?
Nó chạy find đệ quy để tìm các file PDF trong toàn bộ không gian làm việc.
Nó có chọn đúng phiên bản không?
Có, skill gợi ý lọc theo thời gian sửa đổi khi có nhiều phiên bản.
Chi tiết
Mô tả gốc của tác giả
Generate documents via shell commands and locate nested outputs using find.
repo: HKUDS/AgentPilot
Độ phổ biến
- Sao GitHub
- 7.8k
- Vị trí xếp hạng
- #12999
- Giấy phép
- MIT
- Cập nhật
- 1/11/2026
Bình luận
- …
Thêm skill từ kho mã này
agentpilot
7.8kGiúp agent của bạn cải thiện dự án từng bước bằng cách chuẩn bị tác vụ và chạy vòng lặp AgentPilot, gồm đề xuất, kiểm thử và chấm điểm thay đổi.
openspace
7.8kGiúp agent của bạn thiết lập OpenSpace, công cụ lưu và lấy lại skill của agent, rồi kết nối nó với ứng dụng AI của bạn qua MCP.
rsi-arena
7.8kGiúp agent của bạn thiết lập và chạy các bài kiểm thử benchmark AI chuẩn, như AIME và Terminal-Bench, để so sánh các phương pháp cải tiến khác nhau.
experiment-guide
7.8kGiúp agent của bạn lên kế hoạch các thí nghiệm nhỏ, đọc kết quả và ghi lại phát hiện khi tìm cách cải thiện một chương trình.
Skill tương tự
feishu-doc
394kGiúp agent của bạn đọc, tạo và sửa tài liệu đám mây Feishu, gồm văn bản, hình ảnh và bảng, bằng công cụ tài liệu.
feishu-drive
394kCho phép agent của bạn duyệt, sắp xếp và bình luận các file trong một thư mục đám mây Feishu đã được chia sẻ với bot.
feishu-perm
394kGiúp agent của bạn kiểm tra và thay đổi ai có quyền truy cập một file Feishu, chọn quyền nhỏ nhất đáp ứng yêu cầu của bạn.