Skillpedia
PDF وWord والعروض التقديمية7.8k · #12999

shell-doc-gen-and-locate

ما الذي تفعله

تشرح هذه المهارة لوكيل الذكاء الاصطناعي كيف ينشئ عروضًا تقديمية أو ملفات PDF عبر برنامج نصي عندما تفشل استدعاءات المكتبات المباشرة، ثم ينقل الملف إلى مجلد العمل. وهي مناسبة لمن يحتاج إلى شرائح أو ملفات PDF من برنامج نصي.

متى تستخدمها

  • ✓عندما يفشل إنشاء المستند مباشرة ويمكن لبرنامج نصي في الطرفية إنتاج الملف بدلًا منه.
  • ✓عندما تحتاج إلى ملف PowerPoint أو PDF حفظه البرنامج في مكان غير متوقع.
  • ✓عندما تريد نقل الملف الجاهز إلى مجلد العمل لتصل إليه بسهولة.

رابط المهارة

https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/shell-doc-gen-and-locate/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/shell-doc-gen-and-locate/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“أنشئ عرض PowerPoint من مخططي ببرنامج نصي، ثم ابحث عن الملف وانقله إلى مجلد العمل الخاص بي.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يكتب الوكيل برنامجًا ينشئ الملف ويطبع رسالة تأكيد. ثم يستخدم الأمر find للبحث عن المخرج في مساحة العمل، ويصفّي حسب التغييرات الأخيرة عند الحاجة، وينسخ الملف إلى مجلد العمل.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من 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.
الأسئلة الشائعة

لماذا يحتاج البرنامج إلى طباعة رسالة؟

رسالة التأكيد تبيّن أن البرنامج انتهى، فيعرف الوكيل متى يبحث عن الملف.

كيف يجد الوكيل ملف PDF؟

يشغّل بحثًا متكررًا عن ملفات PDF في كامل مساحة العمل.

هل يختار النسخة الصحيحة؟

نعم، تقترح المهارة التصفية حسب وقت التعديل عندما توجد عدة نسخ.

التفاصيل

الوصف الأصلي من المؤلف

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

repo: HKUDS/AgentPilot

الشعبية

نجوم GitHub
7.8k
الترتيب
#12999
الترخيص
MIT
آخر تحديث
1‏/11‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة