yao-job
ما الذي تفعله
تشغّل هذه المهارة الأوامر الطويلة نيابة عنك، إما بانتظار انتهائها أو بتركها تعمل في الخلفية. وهي موجهة للأشخاص الذين يحتاجون إلى إنجاز مهام طويلة دون أن يفقدوا متابعتها.
متى تستخدمها
- ✓عندما يستغرق أمر وقتًا طويلًا وتريد تشغيله في الخلفية.
- ✓عندما تريد أن تعرف هل انتهت مهمة تعمل في الخلفية.
- ✓عندما تعمل مهمة أطول من اللازم وتحتاج إلى إيقافها.
رابط المهارة
https://github.com/YaoApp/yao/blob/main/tools/skills/yao-job/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“شغّل تصدير البيانات هذا في الخلفية، وأخبرني حين ينتهي.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يبدأ الوكيل الأمر إما في المقدمة وينتظر النتيجة، أو في الخلفية ويعطيه معرّفًا. ثم يقرأ التقدم، أو ينتظر مع حد زمني، أو يوقف المهمة عندما تطلب.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Background Jobs
Tools
yao_job_start— Start a command.background false(default) blocks until done and returnsoutput_tail;background truereturnsjob_idimmediately.yao_job_list— List jobs. Supports--statusfilter and--limit/--offsetpagination.yao_job_get— Get full details for a job (or daemon by ID).yao_job_output— Read process output (works for both job and daemon IDs).yao_job_wait— Block until a background job finishes or timeout expires. Jobs only, not daemons.yao_job_stop— Kill a running job.
Parameters
yao_job_start
| Param | Required | Default | Description |
|---|---|---|---|
command |
yes | — | Shell command to execute |
description |
yes | — | Concise 5–10 word summary |
background |
no | false |
true returns immediately; false blocks until done |
args |
no | — | Additional arguments (rarely needed; prefer inline in command) |
working_dir |
no | workspace | Working directory |
max_duration_ms |
no | — | Kill the job after this many milliseconds |
yao_job_list
| Param | Default | Description |
|---|---|---|
status |
all | Filter: running, stopping, completed, failed, cancelled, all |
limit |
20 | Max items per page |
offset |
0 | Skip first N items |
yao_job_output
| Param | Required | Description |
|---|---|---|
job_id |
yes | Job or daemon ID |
offset |
no | Byte offset to read from (0 = beginning) |
Output read behavior:
- Returns all available content from
offsetin a single read (nolimitparameter). - Ring buffer caps at 10 MB; older content beyond this is discarded.
- When content has been discarded,
lossy=truein the response. size= total bytes the process has produced;offset= earliest readable byte position.- Example: a 20 MB output has
size=20000000, offset≈10000000, lossy=true— the first ~10 MB was discarded.
yao_job_wait
| Param | Required | Default | Description |
|---|---|---|---|
job_id |
yes | — | Job ID |
timeout_ms |
no | 60000 | Timeout in milliseconds |
Response Fields
All responses are JSON. Job objects contain:
id, kind, session_id, status, description, background,
command, command_argv, command_line, pid, pgid, user,
started_at, finished_at, duration_ms, exit_code, signal, detail, seq
Foreground start (background=false)
Returns the job object plus output_tail (≤4KB tail of stdout+stderr):
{ "id": "job_...", "status": "completed", "exit_code": 0, ..., "output_tail": "hello world\n" }
List (paginated)
{ "jobs": [...], "total": 130, "offset": 0, "limit": 20, "has_more": true }
Wait
{ "job": { ... }, "timed_out": false }
Stop (already terminal)
{ "job": { ... }, "detail": "already in terminal state (failed); no action taken" }
Errors
Structured JSON with code and message:
{ "error": { "code": "invalid_argument", "message": "job_id is required" } }
Codes: invalid_argument, not_found, internal.
Usage Rules
- Use
background true(not bare--background) for commands expected to run longer than 30 seconds. - Always provide a
description. - Foreground is default — the result and output come back in one call.
- Monitor background output with
yao_job_outputto check progress. - Use
yao_job_waitto block until a background job completes rather than polling.
BackgroundJobReceipt
When a background job finishes, the system delivers a <BackgroundJobReceipt> XML message. Upon receiving it:
- Review the
status,exit_code,cause, andoutput_tail. - If
status=failed, investigate and take corrective action. - If
status=completed, acknowledge and continue the task.
الأسئلة الشائعة
هل يمكن إيقاف المهمة؟
نعم، يستطيع الوكيل إيقاف المهمة الجارية.
هل يمكن أن تنتهي المهمة بسبب المهلة؟
نعم، يمكنك تحديد أقصى مدة، وبعدها تُوقَف المهمة.
كيف أرى المخرجات؟
يقرأ الوكيل مخرجات المهمة، ويستطيع عرض آخر أسطرها عند انتهائها.
التفاصيل
الوصف الأصلي من المؤلف
Background job management — start, monitor, wait, stop long-running commands. ALWAYS invoke this skill when the user asks to run background tasks, check job status, read job output, or manage long-running commands.
repo: YaoApp/yao
الشعبية
- نجوم GitHub
- 8.3k
- الترتيب
- #12476
- الترخيص
- —
- آخر تحديث
- 19/10/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
yao-agent
8.3kيساعد وكيلك على سرد الوكلاء على خادم Yao، والبحث عن كود الوكلاء أو تنزيله، ونشر التغييرات، والتحقق من قائمة موصلات النماذج.
yao-audio
8.3kيساعد وكيلك على تحويل الكلام في الملفات الصوتية، مثل تسجيلات الاجتماعات، إلى نص مكتوب، مع اكتشاف اللغة إذا لم تحددها.
yao-board
8.3kيساعد وكيلك على فحص لوحات كانبان وحالة المهام على منصة Yao، ليقدّم تقدمًا حقيقيًا للمشروع بدل التخمين.
yao-daemon
8.3kيساعد وكيلك على تشغيل الخدمات الطويلة الخلفية وفحصها وإعادة تشغيلها وإيقافها، مثل خوادم التطوير، وقراءة ما تطبعه.
مهارات مشابهة
openclaw-update
394kيساعد وكيلك على تحديث بوابة OpenClaw Gateway الموجودة، مع اختيار طريقة التحديث المناسبة لطريقة تثبيتها والحفاظ على جلستك.
diagnose-gateway
394kيساعد وكيلك على معرفة سبب فشل بوابة OpenClaw Gateway عبر فحص الإعدادات والقنوات والمنافذ دون تغيير أي شيء.
crabbox-apps
394kيساعد وكيلك على فتح تطبيق وتشغيله على جهاز سحابي مؤقت، ثم عرض واجهته في الشريط الجانبي للدردشة.