coding-agent
ما الذي تفعله
يرشد وكيل الذكاء الاصطناعي إلى تشغيل أداة برمجة مثل Codex أو Claude Code أو OpenCode لبناء ميزة أو مراجعة طلب سحب أو إجراء إعادة هيكلة كبيرة في الخلفية. وهي موجهة لمن يريدون تسليم مهام البرمجة الكبيرة.
متى تستخدمها
- ✓عندما تريد بناء ميزة كبيرة في الخلفية بينما تعمل على شيء آخر.
- ✓عندما تحتاج إلى مراجعة طلب سحب أو تنفيذ إعادة هيكلة كبيرة بواسطة أداة برمجة.
- ✓عندما تريد تحويل مشكلة إلى طلب سحب يُنفّذه عامل برمجة.
رابط المهارة
https://github.com/openclaw/openclaw/blob/main/skills/coding-agent/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“اطلب من Codex بناء ميزة التصدير الجديدة في نسخة منفصلة من المشروع، وأخبرني عندما تنتهي.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
تشغّل المهارة الأداة البرمجية المختارة كعملية في الخلفية، وتعمل في نسخة معزولة من المشروع. تراقب التقدم وتبلغ عند انتهاء العامل أو فشله.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Coding Agent
Use for background feature builds, PR reviews, large refactors, and issue-to-PR loops. Do not use for simple edits, read-only lookup, ACP thread-bound work, or any run inside ~/.openclaw, $OPENCLAW_STATE_DIR, or active OpenClaw state dirs.
Hard rules
- Always launch with
background:true. - Codex and OpenCode: use
pty:true. - Codex: never inherit ambient
CODEX_HOMEor the default~/.codex. Use a separately authenticated coding-agent home and scope it to each Codex command. - Claude Code: no PTY; use
claude --permission-mode bypassPermissions --print. - Capture a real notification route before spawning.
- Worker must send completion/failure via
openclaw message send. - Do not rely on heartbeat, system events, or notify-on-exit.
- Monitor with
process; do not kill slow workers without cause. - If user asked for a specific agent, use that agent.
- If worker fails/hangs, respawn or ask; do not silently hand-code instead.
- Never checkout branches or run background coding agents in
~/Projects/openclaw; use an isolated checkout. - Classify the source ref as trusted or untrusted before any checkout or worktree creation. Never materialize a contributor-controlled ref outside the repository's approved untrusted-PR sandbox/review workflow, and never launch a permission-bypassed worker in it.
- For tasks that modify a Git-backed project, prepare and verify the Git worktree before launch, then include the exact Git preparation block below in the worker prompt.
Mandatory Git preparation
Before launching Codex, Claude Code, or OpenCode for work that modifies a Git-backed project:
- Establish the intended target repository, then select its canonical remote. Prefer
upstreamwhen it exists and matches that target; otherwise verifyorigin. Resolve the selected remote's default branch dynamically. Determine the target base from an explicit task branch or authoritative existing-PR metadata; for other shared branches, prove the configured/tracked base or ask. Use the canonical default only for new work with no other specified base. Stop if the repository, remote, or target base cannot be proven. - Classify the source ref as trusted or untrusted before any checkout or worktree creation. For contributor-controlled refs, use the repository's approved untrusted-PR sandbox/review workflow, which must own ref materialization inside the sandbox, or stop. The remaining steps and launch forms are for trusted refs only.
- For trusted new work, run
git fetch --prune <canonical>immediately before creating a new isolated worktree and branch from<canonical>/<targetBaseBranch>. - For trusted new work, verify the worktree's initial
HEADequals the fetched target-base SHA. Record the canonical remote, canonical default branch, target base branch, base SHA, worktree path, and branch. - For a trusted existing PR or shared branch, fetch the canonical target base and source branch immediately before creating an isolated worktree from the fetched source branch. Record that source ref and starting SHA, report its divergence from the refreshed target base, and do not automatically rebase, merge, reset, force-push, or otherwise rewrite shared history.
- Launch the worker in the isolated worktree, never the primary checkout. For OpenClaw, the primary checkout under
~/Projects/openclawremains forbidden.
For tasks that modify a Git-backed project, append this block to the worker prompt with real values:
Git preparation (mandatory before edits):
- canonical remote: <canonicalRemote>
- canonical default branch: <canonicalDefaultBranch>
- target base branch: <targetBaseBranch>
- fetched target base SHA: <targetBaseSha>
- preparation mode: <new work | existing PR/shared branch>
- checkout trust: trusted
- prepared source ref: <canonicalRemote/targetBaseBranch | fetched trusted source ref>
- prepared start SHA: <preparedStartSha>
- isolated worktree: <worktreePath>
- working branch: <branch>
- preparation receipt: <new work: `git fetch --prune <canonicalRemote>` ran immediately before creation from `<canonicalRemote>/<targetBaseBranch>` | existing branch: the canonical target base and trusted source ref were fetched immediately before the worktree was created from `<preparedSourceRef>` at `<preparedStartSha>`>
Before editing, verify the current directory is the isolated worktree and its initial HEAD equals <preparedStartSha>. For new work, that SHA must equal <targetBaseSha>. Never edit the
الأسئلة الشائعة
هل ستعدّل مجلد المشروع الرئيسي مباشرة؟
لا. يتم العمل في نسخة معزولة، لا مباشرة في مجلد المشروع الأساسي.
هل تتعامل مع التعديلات البسيطة أيضًا؟
لا. التعديلات البسيطة وعمليات البحث في الشيفرة للقراءة فقط أفضل إنجازها مباشرة، لذلك هذه المهارة للمهام الكبيرة.
ماذا يحدث إذا تعطّل العامل؟
تراقب المهارة العامل، ويمكنها إعادة تشغيله أو سؤالك، بدلًا من إنجاز العمل يدويًا بصمت.
التفاصيل
الوصف الأصلي من المؤلف
Delegate coding work to Codex, Claude Code, or OpenCode as background workers; not simple edits or read-only code lookup.
repo: openclaw/openclaw
الشعبية
- نجوم GitHub
- 394k
- الترتيب
- #49
- الترخيص
- MIT
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
discord-user-post
394kتتيح لوكيلك نشر رسالة وافقت عليها في Discord باسمك عبر تطبيق Discord على سطح المكتب، بعد التأكد من القناة المحددة.
discrawl
394kيتيح لوكيلك البحث في أرشيف محلي محفوظ لرسائل Discord وتلخيصه، والتحقق من مدى حداثته، وقراءة الرسائل المباشرة.
gitcrawl
394kيتيح لوكيلك البحث في أرشيف محفوظ لمشكلات GitHub وطلبات السحب، وتجميع المكرر منها، والتحقق من حالتها الحالية على GitHub.
graincrawl
394kيتيح لوكيلك البحث في ملاحظات اجتماعات Granola المحفوظة ونصوصها، والتحقق من حداثتها، وعدّها خلال فترة محددة.
مهارات مشابهة
executing-plans
311kيساعد وكيلك على تنفيذ خطة تنفيذ مكتوبة خطوة بخطوة داخل الجلسة الحالية، مع اختبار كل خطوة قبل الانتقال إلى التالية.
finishing-a-development-branch
311kيساعد وكيلك على إنهاء شيفرة مكتملة بتشغيل الاختبارات، ثم عرض خيارات واضحة للدمج أو فتح طلب سحب أو الإبقاء على الفرع.
receiving-code-review
311kيساعد وكيلك على تقييم ملاحظات مراجعة الشيفرة بعناية، والتحقق من كل نقطة مقابل الشيفرة قبل تغيير أي شيء.