codex
ما الذي تفعله
تشغّل هذه المهارة أداة Codex من OpenAI كعامل آلي لمهام البرمجة. وهي موجهة للمطورين الذين يريدون أتمتة تعديلات الكود والفحوص أو كتابة سكربتات لها.
متى تستخدمها
- ✓عندما تريد تشغيل مهمة برمجية في الخلفية دون نافذة محادثة.
- ✓عندما تحتاج إلى إعداد Codex في سكربت أو مهمة CI أو خادم.
- ✓عندما تريد تحليلًا للقراءة فقط لقاعدة كود دون أي تغيير في الملفات.
رابط المهارة
https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/cli/src/skill/builtin/.bundle/codex/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“أريد أن تراجع Codex مستودعي بوضع القراءة فقط، وتسرد الأجزاء الخطرة دون تغيير أي ملف.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يستخدم الوكيل الأمر codex exec بإعدادات صندوق رمل آمنة، ويمرر المهمة كطلب، ثم يعيد النتائج. ويتحقق من تثبيت الأداة قبل تشغيل أي شيء.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Codex CLI
Use Codex CLI as a deterministic, non-interactive worker suitable for automation and agent orchestration.
Operating Rules
- Use
codex exec, not the interactivecodexTUI. - Pass the task as the positional
PROMPTargument. Do not use-pfor the prompt;-pselects a profile. - For ordinary unattended code changes, prefer:
codex exec \
-C /path/to/repo \
--sandbox workspace-write \
--ask-for-approval never \
"<TASK>"
- Use
--yoloonly inside an externally hardened and disposable runner. It disables Codex approvals and sandboxing. - For harnesses and CI, prefer
--jsonplus--output-last-message. - Do not make the run depend on a human answering questions. Resolve ambiguity using repository evidence and conservative defaults.
- Treat credentials as secrets. Inject
CODEX_API_KEYonly into the singlecodex execprocess when possible. - Before giving version-sensitive advice, inspect
codex exec --helpor current official Codex documentation if available. - On Windows, choose one execution environment per task: native PowerShell for Windows toolchains or WSL2 for Linux toolchains. Do not casually mix paths, installations, or authentication across them.
Choose the Execution Mode
Read-only analysis
Use when the task must not modify files:
codex exec \
-C /path/to/repo \
--sandbox read-only \
--ask-for-approval never \
"Analyze the repository and report risks. Do not modify files."
Workspace-scoped implementation
Use as the default for autonomous repository work:
codex exec \
-C /path/to/repo \
--sandbox workspace-write \
--ask-for-approval never \
"Implement the task, run relevant tests, and report unresolved blockers."
Externally isolated unrestricted execution
Use only when the enclosing container, VM, or sandbox enforces the real security boundary:
codex exec \
-C /workspace/repo \
--yolo \
"Implement the task and validate the result."
Never recommend --yolo on a normal developer machine or a runner containing unrelated secrets, host mounts, SSH keys, cloud credentials, or a Docker socket.
Construct an Autonomous Prompt
When headless execution could encounter choices, prepend these instructions:
Work fully autonomously.
Do not ask the user questions and do not request interactive input.
Inspect the repository and available context before making assumptions.
When several valid approaches exist, choose the option that:
1. minimizes unrelated changes,
2. preserves backward compatibility,
3. introduces the fewest new dependencies,
4. avoids destructive or irreversible actions.
Continue until the task is complete or a concrete blocking error is reached.
Record assumptions, validation performed, and unresolved blockers in the final response.
Do not simulate "always select the first option." Option ordering is not a safety or quality policy. Apply the explicit decision rules above instead.
Handle request_user_input Failures
When Codex reports that request_user_input is unavailable in Default mode or non-interactive mode:
- Confirm the invocation uses
codex execand is intentionally headless. - Add the autonomous prompt policy above.
- Supply missing decisions in the task prompt or
AGENTS.mdwhen they are known in advance. - Replace open-ended requests such as "ask me which approach" with deterministic selection criteria.
- If the choice is safety-critical, destructive, or impossible to infer, make the run fail clearly rather than selecting randomly.
- Do not attempt to emulate terminal keystrokes unless the subprocess itself, rather than Codex, requires input and the workflow explicitly defines the safe answer.
Pass Prompts and Context
Use a direct positional prompt:
codex exec "Summarize the repository structure."
Read the prompt from stdin:
codex exec - < prompt.md
Pipe dynamic context while retaining an explicit task:
npm test 2>&1 | codex exec "Analyze this test output and fix the repository."
Use --skip-git-repo-check only for intentional one-off directories outside Git:
codex exec \
--skip-git-repo-check \
-C /tmp/task \
"Analyze the files in this directory."
Produce Harness-Friendly Output
Capture only the final message
codex exec \
-C /workspace/repo \
--output-last-message /output/final.md \
"Review the codebase."
Stream JSONL ev
الأسئلة الشائعة
هل تسألني أسئلة أثناء التشغيل؟
المهارة مصممة للتشغيل بلا إشراف، فتحسم النقاط غير الواضحة من المستودع والإعدادات الآمنة الافتراضية.
هل مفتاح API الخاص بي آمن؟
تنص المهارة على معاملة بيانات الاعتماد كأسرار، وتمرير المفتاح فقط للعملية التي تحتاجه.
هل تعمل على Windows؟
نعم. تغطي المهارة PowerShell الأصلي وWSL2، وتنص على اختيار بيئة واحدة لكل مهمة.
التفاصيل
الوصف الأصلي من المؤلف
Operate OpenAI Codex CLI in non-interactive headless environments. Load only when the user explicitly authorizes this skill or names Codex / codex. Before any command, confirm the `codex` binary is available; if missing, stop and give install or auth guidance. Covers `codex exec` automation in Bash or PowerShell, native Windows or WSL2, scripts, CI/CD, Docker, Kubernetes, remote servers, agent harnesses, sandbox and approval modes, JSONL events, session resume, and stdin prompts.
repo: XiaomiMiMo/MiMo-Code
الشعبية
- نجوم GitHub
- 14k
- الترتيب
- #11305
- الترخيص
- MIT
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
effect
14kيساعد وكيلك على الإجابة عن أسئلة إطار Effect لـ TypeScript بفحص كوده المصدري ووثائقه، بدلًا من الاعتماد على الذاكرة.
arxiv
14kيساعد وكيلك على البحث في الأوراق الأكاديمية على arXiv وقراءتها واستشهادها وتتبعها، ويشمل الملخصات واستشهادات BibTeX وتحميل ملفات PDF وروابط الاستشهاد.
claude-code
14kيساعد وكيلك على تسليم مهمة برمجية إلى أداة سطر الأوامر Claude Code، سواء كتشغيل لمرة واحدة أو جلسة تفاعلية أو مهمة في الخلفية.
compose-next
14kيشغّل سير عمل كاملًا لميزة عند طلبك: توضيح المتطلبات، وكتابة المواصفات، والتنفيذ، والتحقق، والمراجعة، ثم إنهاء التغيير.
مهارات مشابهة
add-model-provider
394kتتيح لوكيلك ربط مزوّد نموذج ذكاء اصطناعي جديد بـ OpenClaw باستخدام أوامر إعداد آمنة، وإبقاء مفاتيح API خارج النص العادي، وإجراء اختبار حي.
acp-router
394kيساعد وكيلك على إرسال مهمة إلى مساعد برمجة مثل Claude Code أو Cursor عبر OpenClaw، فيعمل العمل داخل تلك الأداة.
browser-automation
394kتعلّم وكيلك التحكم في صفحات الويب خطوة بخطوة، بما في ذلك تسجيل الدخول والتبويبات والتعافي عندما تتوقف الصفحة عن الاستجابة.