shell-agent-file-workflow
ما الذي تفعله
يوجّه سير العمل هذا وكيل الذكاء الاصطناعي إلى تكليف وكيل طرفية بإنشاء ملفات معقدة، ثم إيجادها. وهو مناسب لمن تفشل أدوات الملفات لديه مع صيغ مثل العروض والمستندات وPDF.
متى تستخدمها
- ✓عندما تفشل أدوات إنشاء الملفات المباشرة مع صيغة معقدة مثل العروض أو المستندات.
- ✓عندما يحتاج الملف إلى عدة خطوات أو مكتبات أو إصلاحات أخطاء لإنتاجه.
- ✓عندما قد يُحفظ الملف الناتج في مجلد متداخل يصعب العثور عليه.
رابط المهارة
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/shell-agent-file-workflow/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“أنشئ عرض PowerPoint لمراجعة الربع الأخير. فشلت الأدوات المباشرة، فاطلب من وكيل طرفية بناءه ثم ابحث عن الملف.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يعطي الوكيل وكيل الطرفية مهمة واضحة. بعد أن ينتهي وكيل الطرفية، يبحث الوكيل في مساحة العمل عن الملف الجديد بالاسم وبوقت التعديل الأخير، حتى يجده في أي مجلد متداخل.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من 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_filefunctions 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 |
الأسئلة الشائعة
كيف يجد الوكيل الملف؟
يستخدم الأمر find للبحث بحسب نوع الملف، ويمكنه التصفية حسب الملفات التي تغيّرت خلال الدقائق الأخيرة.
ما أنواع الملفات التي يمكن البحث عنها؟
تذكر المهارة ملفات PowerPoint وWord وPDF أمثلةً.
ماذا لو وُجدت عدة نسخ؟
تقترح المهارة التصفية حسب وقت التعديل لاختيار الأحدث.
التفاصيل
الوصف الأصلي من المؤلف
Delegate file generation to shell_agent when direct tools fail, with systematic file location and retrieval
repo: HKUDS/AgentPilot
الشعبية
- نجوم GitHub
- 7.8k
- الترتيب
- #12998
- الترخيص
- MIT
- آخر تحديث
- 1/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
agentpilot
7.8kيساعد وكيلك على تحسين مشروع خطوة بخطوة، بتجهيز مهمة وتشغيل حلقة AgentPilot التي تقترح التغييرات وتختبرها وتقيّمها.
openspace
7.8kيساعد وكيلك على إعداد OpenSpace، وهو أداة تخزن مهارات الوكلاء وتسترجعها، وربطه بتطبيق الذكاء الاصطناعي عبر MCP.
rsi-arena
7.8kيساعد وكيلك على إعداد اختبارات معيارية مثل AIME وTerminal-Bench وتشغيلها، لمقارنة طرق التحسين المختلفة.
experiment-guide
7.8kيساعد وكيلك على تخطيط تجارب صغيرة وقراءة نتائجها وتسجيل ما يتعلمه أثناء التحقيق في طرق تحسين برنامج.
مهارات مشابهة
add-model-provider
394kتتيح لوكيلك ربط مزوّد نموذج ذكاء اصطناعي جديد بـ OpenClaw باستخدام أوامر إعداد آمنة، وإبقاء مفاتيح API خارج النص العادي، وإجراء اختبار حي.
acp-router
394kيساعد وكيلك على إرسال مهمة إلى مساعد برمجة مثل Claude Code أو Cursor عبر OpenClaw، فيعمل العمل داخل تلك الأداة.
browser-automation
394kتعلّم وكيلك التحكم في صفحات الويب خطوة بخطوة، بما في ذلك تسجيل الدخول والتبويبات والتعافي عندما تتوقف الصفحة عن الاستجابة.