yao-daemon
ما الذي تفعله
تدير هذه المهارة الخدمات الطويلة التي تعمل في الخلفية، مثل خوادم التطوير، على منصة Yao. وهي موجهة للمطورين الذين يحتاجون إلى إبقاء خادم يعمل أثناء عملهم.
متى تستخدمها
- ✓عندما تريد تشغيل خادم تطوير في الخلفية.
- ✓عندما تحتاج خدمة خلفية إلى فحص أو إعادة تشغيل.
- ✓عندما تريد إيقاف خدمة ما زالت تعمل.
رابط المهارة
https://github.com/YaoApp/yao/blob/main/tools/skills/yao-daemon/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“شغّل خادم التطوير في الخلفية، وأخبرني بعنوانه حين يصبح جاهزًا.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يشغّل الوكيل الخدمة في الخلفية، ويتتبعها بمعرّف، ويعلن منفذها حين يصبح جاهزًا. ويستطيع فحص الحالة، وقراءة المخرجات، وإعادة التشغيل، أو الإيقاف.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Daemon Management
Tools
yao_daemon_start— Start a long-running service. Always runs in background; returnsdaemon_idimmediately.yao_daemon_list— List daemons. Supports--statusfilter and--limit/--offsetpagination.yao_daemon_status— Get full details for a daemon (daemon_port,daemon_url,started_at,daemon_restarts).yao_daemon_stop— Stop a running daemon.yao_daemon_restart— Restart a daemon (preserves the same ID, incrementsdaemon_restarts).yao_job_output— Read daemon output (passdaemon_idasjob_id).
Parameters
yao_daemon_start
| Param | Required | Default | Description |
|---|---|---|---|
command |
yes | — | Shell command to execute |
description |
yes | — | Concise 5–10 word summary |
port |
no | auto-detect | Expected listen port; the system verifies the port is ready before reporting it |
args |
no | — | Additional arguments |
working_dir |
no | workspace | Working directory |
yao_daemon_list
| Param | Default | Description |
|---|---|---|
status |
all | Filter: running, stopping, completed, failed, cancelled, port_detecting, all |
limit |
20 | Max items per page |
offset |
0 | Skip first N items |
yao_daemon_restart / yao_daemon_status / yao_daemon_stop
| Param | Required | Description |
|---|---|---|
daemon_id |
yes | The daemon ID |
Response Fields
All responses are JSON. Daemon objects contain:
id, kind, session_id, status, description,
command, command_argv, command_line, pid, pgid, user,
started_at, finished_at, duration_ms, exit_code, signal, detail,
daemon_port, daemon_url, daemon_restarts, seq
daemon_port— The verified listen port (0 if not yet detected or not specified).daemon_url—http://localhost:<port>(empty until port is verified as listening by the daemon's own process tree).daemon_restarts— Number of restarts viayao_daemon_restart.started_at— Unix millisecond timestamp of the most recent start.
Port detection behavior:
Both modes start by returning port_detecting with daemon_port: 0 if the port is not confirmed within the initial ~2s settle window. If the port is confirmed within ~2s, start returns running with daemon_port/daemon_url directly.
--port N(explicit): Verifies port N is listening AND owned by this daemon's process tree. If not confirmed within2s, returns60s).status: "port_detecting". Pollyao_daemon_statusuntil status changes torunning— either withdaemon_port: Nanddaemon_url(port confirmed), or withdaemon_port: 0anddetail: "specified port N not detected within timeout"(- No
--port(auto-detect): Scans the daemon's process tree for any listening TCP port. If not found within2s, returns60s); if a port is found, status changes tostatus: "port_detecting". The scan continues in background (runningwithdaemon_port/daemon_urland a<BackgroundJobReceipt>is delivered. If no port is found after ~60s, status changes torunningwithdaemon_port: 0.
List (paginated)
{ "daemons": [...], "total": 5, "offset": 0, "limit": 20, "has_more": false }
Stop (already terminal)
{ "job": { ... }, "detail": "already in terminal state (cancelled); no action taken" }
Errors
Structured JSON with code and message:
{ "error": { "code": "not_found", "message": "daemon \"dmn_xxx\" not found" } }
Codes: invalid_argument, not_found, internal.
Usage Rules
- Always provide a
description. - Specify
portwhen starting a server — the system confirms the port is actually listening before reportingdaemon_url. - Daemons run indefinitely — use
yao_daemon_stopto terminate. - Use
yao_daemon_restartto restart a crashed or misconfigured daemon without losing its ID. - Monitor output with
yao_job_outputpassing thedaemon_idasjob_id.
BackgroundJobReceipt
When a daemon's port becomes ready, the system delivers a <BackgroundJobReceipt> XML message containing the daemon_url. Use that URL for subsequent HTTP requests to the daemon.
الأسئلة الشائعة
هل ستعطّل المحادثة؟
لا، تعمل الخدمات دائمًا في الخلفية، ويحصل الوكيل على معرّف فورًا.
هل يغيّر إعادة التشغيل المعرّف؟
لا، تحتفظ إعادة التشغيل بالمعرّف نفسه، وتحسب عدد مرات إعادة التشغيل.
كيف أرى ما طبعته الخدمة؟
يقرأ الوكيل مخرجاتها بأداة مخرجات منفصلة.
التفاصيل
الوصف الأصلي من المؤلف
Daemon process management — start, monitor, restart, stop long-running services. ALWAYS invoke this skill when the user asks to start, check, restart, or stop background services, dev servers, or daemon processes.
repo: YaoApp/yao
الشعبية
- نجوم GitHub
- 8.3k
- الترتيب
- #12472
- الترخيص
- —
- آخر تحديث
- 19/10/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
yao-agent
8.3kيساعد وكيلك على سرد الوكلاء على خادم Yao، والبحث عن كود الوكلاء أو تنزيله، ونشر التغييرات، والتحقق من قائمة موصلات النماذج.
yao-audio
8.3kيساعد وكيلك على تحويل الكلام في الملفات الصوتية، مثل تسجيلات الاجتماعات، إلى نص مكتوب، مع اكتشاف اللغة إذا لم تحددها.
yao-board
8.3kيساعد وكيلك على فحص لوحات كانبان وحالة المهام على منصة Yao، ليقدّم تقدمًا حقيقيًا للمشروع بدل التخمين.
yao-decision
8.3kيساعد وكيلك على اتخاذ قرارات منظمة، مثل فرز تذاكر الدعم أو تقييم المحتوى أو رصد الرسائل العاجلة، مع مستويات الثقة.
مهارات مشابهة
openclaw-update
394kيساعد وكيلك على تحديث بوابة OpenClaw Gateway الموجودة، مع اختيار طريقة التحديث المناسبة لطريقة تثبيتها والحفاظ على جلستك.
diagnose-gateway
394kيساعد وكيلك على معرفة سبب فشل بوابة OpenClaw Gateway عبر فحص الإعدادات والقنوات والمنافذ دون تغيير أي شيء.
crabbox-apps
394kيساعد وكيلك على فتح تطبيق وتشغيله على جهاز سحابي مؤقت، ثم عرض واجهته في الشريط الجانبي للدردشة.