Langsung ke konten
Skillpedia
PDF, Word & slide7.8k Β· #12999

shell-doc-gen-and-locate

Fungsinya

Skill ini menunjukkan kepada agent AI cara membuat presentasi atau PDF dengan skrip saat pemanggilan pustaka langsung gagal, lalu memindahkan file ke folder kerja. Skill ini ditujukan untuk orang yang memerlukan slide atau PDF dari sebuah skrip.

Kapan dipakai

  • βœ“Saat pembuatan dokumen langsung gagal dan skrip shell dapat menghasilkan file tersebut.
  • βœ“Saat Anda memerlukan file PowerPoint atau PDF yang disimpan skrip di lokasi yang tidak terduga.
  • βœ“Saat Anda ingin file jadi dipindahkan ke folder kerja agar mudah diakses.

Link skill

https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/shell-doc-gen-and-locate/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-doc-gen-and-locate/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 PowerPoint dari kerangka saya dengan skrip, lalu temukan filenya dan pindahkan ke folder kerja saya.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent menulis skrip yang membuat file dan mencetak konfirmasi. Setelah itu agent memakai find untuk mencari output di ruang kerja, menyaring berdasarkan perubahan terbaru jika perlu, dan menyalin file ke folder kerja.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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_agent capability 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.py or make_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 find command 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.
Pertanyaan umum

Mengapa skrip perlu mencetak pesan?

Konfirmasi yang dicetak menunjukkan bahwa skrip selesai, sehingga agent tahu kapan harus mencari file.

Bagaimana agent menemukan PDF?

Agent menjalankan find rekursif untuk file PDF di seluruh ruang kerja.

Bisakah agent memilih versi yang tepat?

Bisa. Skill ini menyarankan penyaringan berdasarkan waktu modifikasi jika ada beberapa versi.

Detail

Deskripsi asli dari pembuat

Generate documents via shell commands and locate nested outputs using find.

repo: HKUDS/AgentPilot

Popularitas

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

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa