Chuyển đến nội dung
Skillpedia
Agent7.8k · #12998

shell-agent-file-workflow

Skill này làm gì

Quy trình này hướng dẫn AI agent để shell agent tạo các file phức tạp, rồi tìm lại chúng. Nó dành cho những người có công cụ file thất bại với các định dạng như slide, tài liệu hoặc PDF.

Khi nào nên dùng

  • ✓Khi công cụ tạo file trực tiếp thất bại với một định dạng phức tạp như slide hoặc tài liệu.
  • ✓Khi file cần nhiều bước, thư viện hoặc sửa lỗi để tạo ra.
  • ✓Khi file được tạo có thể nằm trong một thư mục lồng nhau mà bạn khó tìm.

Liên kết skill

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

Sao 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

Hãy dùng skill này để giúp tôi: https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/shell-agent-file-workflow/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tạo bộ slide PowerPoint cho buổi đánh giá quý của tôi. Các công cụ trực tiếp đã lỗi, nên hãy nhờ một shell agent làm và rồi tìm file.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent đưa cho shell agent một nhiệm vụ rõ ràng. Sau khi shell agent hoàn tất, agent tìm trong không gian làm việc file mới theo tên và thời gian sửa đổi gần đây, nên có thể tìm thấy nó trong bất kỳ thư mục lồng nhau nào.

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 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_file functions 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
Câu hỏi thường gặp

Agent tìm file bằng cách nào?

Nó dùng lệnh find để tìm theo loại file, và có thể lọc các file được thay đổi trong vài phút gần đây.

Có thể tìm những loại file nào?

Skill nêu PowerPoint, Word và PDF làm ví dụ.

Nếu có nhiều phiên bản thì sao?

Skill gợi ý lọc theo thời gian sửa đổi để chọn file mới nhất.

Chi tiết

Mô tả gốc của tác giả

Delegate file generation to shell_agent when direct tools fail, with systematic file location and retrieval

repo: HKUDS/AgentPilot

Độ phổ biến

Sao GitHub
7.8k
Vị trí xếp hạng
#12998
Giấy phép
MIT
Cập nhật
1/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự