codex-cli
ما الذي تفعله
توضح هذه المهارة للذكاء الاصطناعي كيف يشغّل Codex في الوضع غير التفاعلي كمساعد للبرمجة والتحليل والمراجعة. وهي موجهة للمطورين الذين يريدون نموذجاً آخر ينفذ مهمة أو يتحقق منها.
متى تستخدمها
- ✓عندما تريد تسليم مهمة برمجة أو إعادة هيكلة إلى Codex وتستلم النتيجة.
- ✓عندما تريد نموذجاً ثانياً يراجع تعديلاتك ويشير إلى المشكلات.
- ✓عندما تريد تشغيل مهمة برمجة طويلة ومتكررة بينما تكمل أنت تخطيط العمل.
رابط المهارة
https://github.com/kortix-ai/suna/blob/dev/.agents/skills/codex-cli/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“سلّم إعادة الهيكلة هذه إلى Codex، وأخبرني بما غيّره حتى أراجعه.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يكتب الذكاء الاصطناعي مهمة واضحة، ويشغّل الأمر codex exec في مجلد مختار مع إعداد حماية (sandbox)، ويحفظ الرسالة الأخيرة في ملف، ثم يفحص الملفات المتغيرة والاختبارات بنفسه.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
The golden rule: Codex's self-report is a claim, not the truth. Always capture its output, then independently verify the artifacts yourself (read the files, re-run the tests) before treating the task as done.
Verified available on this machine: codex-cli 0.137.0, logged in via ChatGPT
(no API key needed). Confirm with codex login status.
</overview>
codex exec \
--cd <workdir> \
--sandbox <read-only|workspace-write|danger-full-access> \
-o /tmp/codex_<rand>.txt \
"your metaprompt here" 2>>/tmp/codex_<rand>.log
- Prompt as the final arg, OR pipe via stdin:
echo "$PROMPT" | codex exec -(good for long/generated prompts). If both are given, stdin is appended. -o, --output-last-message <file>— writes ONLY Codex's final message to a file. This is your clean capture; read it back, don't scrape the TUI stream.2>>/tmp/...log— Codex streams progress/reasoning to stderr; the final message goes to stdout. Redirect stderr to a log so it doesn't bloat your context. Generate the suffix withopenssl rand -hex 4.--cd <dir>— Codex's working root. Scope it to the relevant subdir (e.g.apps/api), not the whole monorepo, so it stays focused.--skip-git-repo-check— only needed when running outside a git repo.</the-core-command>
read-only(default) — Codex can read/grep/run read-only commands but cannot edit files or hit the network. Use for review, analysis, planning, "find the bug", second opinions.workspace-write— can edit files in--cd(and--add-dirpaths) and run commands, but no network by default. Use for real implementation/refactors.danger-full-access— no sandbox at all. Avoid; only for throwaway/ephemeral dirs you fully control.
Approvals: in exec mode Codex does not prompt for approvals. For a fully
autonomous run with no gating at all, add
--dangerously-bypass-approvals-and-sandbox. This is powerful — only use it when
the user has explicitly authorized autonomous edits AND the --cd is scoped, or
when running in an already-sandboxed/throwaway dir. When unsure, ask the user
which sandbox tier before running with write access.
</sandbox-tiers>
codex exec resume --last "now also update the tests" # most recent session
codex exec resume <session-id> "..." # a specific one
The session id is printed at the start of each exec run. Use resume for
multi-turn delegation (draft → refine → fix) instead of re-sending all context.
</session-resume>
الأسئلة الشائعة
هل يحصل Codex على وصول كامل إلى حاسوبي؟
لا. يعمل داخل مستوى حماية يحدده كل تشغيل، مثل القراءة فقط أو الكتابة داخل مساحة العمل.
هل أحتاج إلى مفتاح OpenAI API؟
تقول المهارة إن تسجيل الدخول بحساب ChatGPT يكفي، ويمكن التحقق منه بالأمر codex login status.
هل أثق بتقرير Codex؟
لا. تقول المهارة إن التقرير الذاتي ادعاء، لذلك يجب على الذكاء الاصطناعي التحقق من الملفات وإعادة تشغيل الاختبارات بنفسه.
التفاصيل
الوصف الأصلي من المؤلف
Drive OpenAI's Codex CLI (`codex exec`) as a non-interactive coding sub-agent from inside Claude Code. Load WHENEVER you want to delegate a coding/analysis/refactor task to Codex, get a second opinion / adversarial review from another model, fan out parallel agents across files or worktrees, or run a long mechanical job while you stay the planner. Covers the exact `codex exec` flags, sandbox tiers, output capture, JSON/schema modes, session resume, parallel fan-out, and the mandatory "delegate → capture → independently verify, never trust the self-report" supervision loop.
repo: kortix-ai/suna
الشعبية
- نجوم GitHub
- 20k
- الترتيب
- #10371
- الترخيص
- —
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
claude-code
20kيتيح لوكيلك تسليم مهمة برمجة أو مراجعة أو تخطيط إلى Claude Code CLI من Anthropic، ثم حفظ النتيجة لفحصها.
commit-dis
20kيتيح لوكيلك حفظ التغييرات التي أجريت في هذه المحادثة فقط كعملية commit واحدة على فرع Git الحالي، دون دفع التعديلات أو إنشاء فرع جديد.
composio
20kيساعد وكيلك على استخدام Composio لربط تطبيقات مثل Gmail وSlack وGitHub وNotion، سواء لوكيلك الخاص أو لمنتج تبنيه.
e2e
20kيعلّم وكيلك كتابة اختبارات شاملة من البداية إلى النهاية تشغّل تطبيق ويب أو جوالاً بأهداف مكتوبة بلغة بسيطة وفحوص دقيقة.
مهارات مشابهة
add-model-provider
394kتتيح لوكيلك ربط مزوّد نموذج ذكاء اصطناعي جديد بـ OpenClaw باستخدام أوامر إعداد آمنة، وإبقاء مفاتيح API خارج النص العادي، وإجراء اختبار حي.
acp-router
394kيساعد وكيلك على إرسال مهمة إلى مساعد برمجة مثل Claude Code أو Cursor عبر OpenClaw، فيعمل العمل داخل تلك الأداة.
browser-automation
394kتعلّم وكيلك التحكم في صفحات الويب خطوة بخطوة، بما في ذلك تسجيل الدخول والتبويبات والتعافي عندما تتوقف الصفحة عن الاستجابة.