shell-agent-file-ops
ما الذي تفعله
تساعد هذه المهارة وكيل الذكاء الاصطناعي على استخدام وكيل طرفية في أعمال الملفات، مثل إنشاء المستندات أو تحديث ملفات الإعداد. وهي مناسبة لمن يريد أن يقول ما يحتاجه بدلًا من تحديد كيفية تنفيذه.
متى تستخدمها
- ✓عندما تحتاج إلى إنشاء ملفات أو تعديلها ولا تكون الطريقة الأفضل واضحة.
- ✓عندما تريد معالجة تلقائية للأخطاء وإعادة المحاولة في مهمة ملفات.
- ✓عندما تفضّل وصف النتيجة المطلوبة بدل اختيار أدوات محددة.
رابط المهارة
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/shell-agent-file-ops/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“حدّث كل ملفات الإعداد في مجلد الإعدادات الخاص بي لإضافة مهلة قدرها 300. دع وكيل الطرفية يحدد الطريقة.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يسلّم الوكيل وكيل الطرفية مهمة بلغة عادية. يختار وكيل الطرفية Python أو Bash، ويكتب الكود ويشغّله، ويعالج الأخطاء عبر عدة جولات إعادة محاولة، ثم يعيد النتيجة.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Shell Agent File Operations
Purpose
Use shell_agent for file operations when you want the tool to autonomously decide how to accomplish the task (Python vs Bash, which commands to use, error recovery) rather than manually selecting specific tools like write_file or run_shell.
When to Use
Use this pattern when:
- You need to create, modify, or organize files
- The optimal approach (Python script, Bash commands, direct file write) is unclear
- You want automatic error handling and retry logic
- You prefer to describe what to accomplish rather than how
How to Use
Basic Pattern
Delegate to shell_agent with a clear natural-language task description.
Example: Create a Document File
Task description to shell_agent:
Create a comprehensive SOAP note file containing four sections:
Subjective, Objective, Assessment, and Plan. Include all relevant
patient visit details in a professional medical format.
The shell_agent will:
- Decide whether to use Python or Bash
- Write and execute the appropriate code
- Handle any errors automatically (up to several retry rounds)
- Return the result
Example: Modify Existing Files
Task description to shell_agent:
Update all configuration files in the config/ directory to add
a new setting "timeout: 300" under the general section.
Example: Complex File Operations
Task description to shell_agent:
Create a project structure with README.md, src/main.py, and
tests/test_main.py. Include appropriate content in each file
based on a Python data processing project template.
Best Practices
Be specific about content requirements - Describe what should be in the file(s), not just that files should be created.
Include format specifications - Mention desired formats (markdown, JSON, CSV, etc.) when relevant.
Specify file locations - Include paths when files should be in specific directories.
Let shell_agent handle complexity - Don't pre-decide the implementation approach; trust the autonomous selection.
Check the output - Review what shell_agent created to ensure it meets requirements.
Comparison: When NOT to Use This Pattern
Use direct tools instead when:
- You already know the exact command/script to run → use
run_shell - You have the exact file content ready → use
write_filedirectly - The operation is trivial (single-line file write) → use
write_file - You need fine-grained control over the implementation
Anti-Patterns to Avoid
❌ Don't over-specify the implementation:
Use Python to write a file called notes.md with this content...
✅ Do describe the desired outcome:
Create a notes.md file with comprehensive documentation about...
❌ Don't use shell_agent for simple direct operations:
Write "hello" to hello.txt
✅ Do use write_file directly for simple cases:
write_file(path="hello.txt", content="hello")
Summary
This pattern shifts focus from implementation mechanics to task intent, leveraging shell_agent's autonomous decision-making for file operations that benefit from intelligent tool selection and automatic error recovery.
الأسئلة الشائعة
هل يمكنه تعديل عدة ملفات دفعة واحدة؟
نعم، يحدّث مثال المهارة كل ملفات الإعداد في مجلد واحد.
ما أنواع الملفات التي يتعامل معها؟
تذكر المهارة أمثلة من المستندات والملاحظات وملفات الإعداد.
هل أحتاج إلى معرفة الأوامر؟
لا، تصف المهمة ويتولى وكيل الطرفية الأوامر.
التفاصيل
الوصف الأصلي من المؤلف
Leverage shell_agent for autonomous file creation and modification with automatic tool selection and error recovery
repo: HKUDS/AgentPilot
الشعبية
- نجوم GitHub
- 7.8k
- الترتيب
- #12997
- الترخيص
- 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تعلّم وكيلك التحكم في صفحات الويب خطوة بخطوة، بما في ذلك تسجيل الدخول والتبويبات والتعافي عندما تتوقف الصفحة عن الاستجابة.