Langsung ke konten
Skillpedia
Agen7.8k Β· #12998

shell-agent-file-workflow

Fungsinya

Alur kerja ini memandu agent AI agar agent shell membuat file yang kompleks, lalu agent mencari file tersebut. Alur ini ditujukan untuk orang yang alat file-nya gagal pada format seperti slide, dokumen, atau PDF.

Kapan dipakai

  • βœ“Saat alat pembuatan file langsung gagal pada format kompleks seperti slide atau dokumen.
  • βœ“Saat file memerlukan beberapa langkah, pustaka, atau perbaikan error untuk dihasilkan.
  • βœ“Saat file yang dihasilkan mungkin disimpan di folder bertingkat yang sulit Anda temukan.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/shell-agent-file-workflow/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œBuat dek PowerPoint untuk tinjauan triwulan saya. Alat langsung gagal, jadi minta agent shell membuatnya lalu temukan filenya.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent memberi agent shell tugas yang jelas. Setelah agent shell selesai, agent mencari file baru di ruang kerja berdasarkan nama dan waktu modifikasi terbaru, sehingga file bisa ditemukan di folder bertingkat mana pun.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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_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
Pertanyaan umum

Bagaimana agent menemukan file?

Agent memakai perintah find untuk mencari berdasarkan jenis file, dan dapat menyaring file yang berubah dalam beberapa menit terakhir.

Jenis file apa yang bisa dicari?

Skill ini menyebut file PowerPoint, Word, dan PDF sebagai contoh.

Bagaimana jika ada beberapa versi?

Skill ini menyarankan penyaringan berdasarkan waktu modifikasi untuk memilih versi terbaru.

Detail

Deskripsi asli dari pembuat

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

repo: HKUDS/AgentPilot

Popularitas

Bintang GitHub
7.8k
Peringkat
#12998
Lisensi
MIT
Diperbarui
1/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa