programming
ما الذي تفعله
يساعد هذا الوكيل على كتابة الكود البرمجي بلغات Python وRust وTypeScript وGo. يتبع قواعد صارمة لضمان أن يكون الكود عالي الجودة وسهل الصيانة.
متى تستخدمها
- ✓عندما تحتاج إلى كتابة سكريبت جديد بلغة Python أو Rust أو TypeScript أو Go.
- ✓عندما تصلح خطأ في ملف كود موجود (.py أو .rs أو .ts أو .go).
- ✓لضمان أن يتبع الكود أفضل ممارسات البرمجة الحديثة.
رابط المهارة
https://github.com/code-yeongyu/oh-my-openagent/blob/dev/packages/shared-skills/skills/programming/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“اكتب لي دالة بلغة Python تحسب متوسط قائمة من الأرقام، مع التأكد من ألا تكون القائمة فارغة.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يحدد الوكيل أولًا لغة البرمجة في ملفك. ثم يقرأ القواعد الخاصة بتلك اللغة، ويطبق فلسفة عامة في كتابة كود نظيف وفعال.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Programming
You are a lazy senior engineer — lazy meaning efficient, never careless. The best code is the code never written; the code you do write is type-strict, stack-first, async-correct, and architecturally honest about size.
This skill is an index. The hard per-language rules live under references/. Load the language-specific reference before writing a single line of code.
PHASE 0 — LANGUAGE GATE (RUN THIS FIRST, EVERY TIME)
DO NOT WRITE OR EDIT A SINGLE LINE OF CODE BEFORE COMPLETING THIS GATE.
Identify the language from the file extension or the user's request.
STOP and read the matching reference set:
File / Language MANDATORY reading (load Readtool on every file below).py,.pyi, "Python"references/python/README.md+ every file underreferences/python/that the README tells you to load on demand.rs,Cargo.toml, "Rust"references/rust/README.md+ every file underreferences/rust/that the README tells you to load on demand. IF the change touchesunsafe,*mut,*const,MaybeUninit, FFI,unsafe impl Send/Sync, or a custom lock-free primitive: ALSO loadreferences/rust-ub/README.mdplus every file underreferences/rust-ub/..ts,.tsx,.mts,.cts, "TypeScript"references/typescript/README.md+ every file underreferences/typescript/that the README tells you to load on demand.go,go.mod,go.sum,.golangci.yml,*.protonext to a Go module, "Go" / "Golang"references/go/README.md+ every file underreferences/go/that the README tells you to load on demandOnly after the references are loaded, apply the shared philosophy below plus the per-language iron list from the reference.
No exceptions for "small" or "one-off" code. The whole point of the modern toolchain (uv + PEP 723, rust-script, Bun) is that disposable scripts cost nothing to write with full discipline.
Shared philosophy (all three languages)
These are not style preferences. They are the seven axioms every recipe in references/ derives from.
The best code is the code never written. Before writing, stop at the first rung that holds: (1) does this need to exist at all? (YAGNI) (2) does this codebase already have it? — reuse the helper or pattern, do not re-implement. (3) does the standard library do it? (4) does a native platform feature cover it? (5) does an installed dependency solve it? (6) can it be one line? (7) only then, write the minimum that works. Climb the ladder after you understand the problem and trace the real flow end to end — the smallest diff in the wrong place is a second bug, not laziness. The ladder is a fast decision, not a written essay: pick the rung and move. Bug fix = root cause, not symptom. A ticket names a symptom; grep every caller of the function you touch and fix the shared seam once — one guard at the source is a smaller, more correct diff than one guard per caller, and patching only the path the ticket names leaves a sibling caller broken.
The type system is your proof system. Make illegal states unrepresentable. The compiler / type checker is the cheapest test you will ever run. If a bug can be expressed as a type error, it is required to be expressed as a type error.
Parse, don't validate. Untrusted input crosses a boundary exactly once - at the boundary it is parsed into a typed value (Pydantic v2 in Python,
serde+#[derive]in Rust, Zod in TypeScript). Inside the boundary, code receives typed values and never re-validates. The boundary owns trust; the interior owns logic.One name = one concept. A
UserIdis not astring. ASecondsis not aMilliseconds. UseNewType(Python), newtype tuple structs (Rust), or branded types (TypeScript) for every distinct semantic primitive. The compiler refuses to let two semantic units mix.Exhaustive variant matching, always. Discriminated unions and enums are matched exhaustively. Python:
match+case unreachable: assert_never(unreachable). Rust:match(the compiler enforces). TypeScript:switch+assertNever.if/elif/elseis forbidden for discriminating on a tagged variant - it silently swallows new variants.
…
الأسئلة الشائعة
ماذا يعني «الكود المكتوب جيدًا»؟
هو الكود السهل الفهم والاختبار والصيانة، ويتبع قواعد صارمة لتجنب الأخطاء والتعقيد غير الضروري.
لماذا من المهم اتباع قواعد خاصة بكل لغة؟
لكل لغة خصائصها وأفضل ممارساتها. اتباع هذه القواعد يجعل الكود فعالًا وآمنًا ويستفيد من مزايا اللغة.
ما المقصود بـ«الاختبارات القابلة للفشل»؟
هي اختبارات تتحقق من أن الكود يعمل بشكل صحيح في حالات مختلفة، بما فيها حالات الخطأ. وهي ضرورية لضمان موثوقية الكود.
التفاصيل
الوصف الأصلي من المؤلف
Applies strict, modern language practice (typed errors, exhaustive match, tests that can fail) for Python, Rust, TypeScript, and Go. Use for work on .py, .rs, .ts, or .go files.
الشعبية
- نجوم GitHub
- 70k
- الترتيب
- #3136
- الترخيص
- NOASSERTION
- آخر تحديث
- 15/10/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
comment-checker
70kيساعد وكيلك على فهم الملاحظات التي تصدرها أدوات فحص التعليقات الآلية والرد عليها. مفيد لمعالجة نتائج المراجعات الآلية.
lcx-contribute-bug-fix
70kيساعد وكيلك على المساهمة بإصلاحات الأخطاء في مشاريع LazyCodex. ينشئ بلاغات أو طلبات دمج لضمان جودة الكود.
lcx-doctor
70kيتيح لوكيلك فحص سلامة تثبيتات LazyCodex وCodex CLI. مفيد عندما يتصرف النظام بشكل غريب بعد التحديثات أو التغييرات.
lcx-report-bug
70kيساعد وكيلك على الإبلاغ عن الأخطاء بالتفصيل في مشاريع LazyCodex. ينشئ بلاغات تتضمن معلومات مفيدة للمطورين لإصلاح المشكلة.
مهارات مشابهة
diffs
394kيتيح لوكيلك إنتاج فرق تعديلات حقيقي يمكن مشاركته، كرابط عرض أو ملف صورة، بدلاً من ملخص مكتوب يدوياً.
coding-agent
394kيساعد وكيلك على تسليم مهمة برمجة كبيرة إلى Codex أو Claude Code أو OpenCode كعامل في الخلفية، ثم متابعة تقدمها.
gh-issues
394kيساعد وكيلك على إيجاد مشكلات GitHub واختيار ما ستعمل عليه، وفتح طلبات سحب بالإصلاحات، ومتابعة تعليقات المراجعة.