lemmaly
ما الذي تفعله
Lemmaly أداة تساعدك على التفكير في كفاءة الكود قبل كتابته. تضمن أن تحدد التعقيد (سرعة تشغيل الكود)، وبنية البيانات (كيفية تنظيم البيانات)، ونوع الخوارزمية (الاستراتيجية المستخدمة) قبل أن تبدأ البرمجة.
متى تستخدمها
- ✓عندما تكتب كوداً جديداً يتضمن قوائم أو عمليات بحث أو تكرارات.
- ✓عندما تراجع كوداً يبدو بطيئاً أو غير فعال.
- ✓عندما لا تعرف أفضل طريقة لتنظيم بياناتك وخوارزمياتك.
رابط المهارة
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/lemmaly/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“أحتاج إلى كتابة دالة لإيجاد العنصر الأكثر تكراراً في قائمة من مليون رقم. ما التعقيد وبنية البيانات والخوارزمية التي يجب أن أستخدمها قبل أن أبدأ؟”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
تتطلب منك Lemmaly أن تذكر التعقيد الزمني والمكاني، وبنية البيانات المختارة مع تبرير لها، وعائلة الخوارزمية. وهذا يفرض تحليلاً مسبقاً لتفادي الحلول غير الفعالة.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
lemmaly — Algorithm-First Proof
The model already knows Big-O, hash tables, divide-and-conquer, dynamic programming, sorting, graph algorithms, and amortized analysis. It just does not apply them spontaneously. lemmaly fixes the behavior, not the knowledge.
This skill is the gateway for an algorithm-discipline suite of four skills (lemmaly, mathguard, invariant-guard, complexity-cuts). It enforces the hard rules that every other guard in the suite assumes.
Violating the letter of these rules is violating the spirit of the skill. "Just this once" is how O(n²) ships to production.
When to Use This Skill
Use lemmaly when:
- Writing, editing, or reviewing code that involves loops, collections, lookups, searches, joins, recursion, graphs, queries, or any computation over more than a handful of items.
- About to write a
forinside afor,.find/.includes/.indexOfinside a loop,awaitinsidefor/map/forEachover independent items, or one query per item in a collection. - Auditing a codebase / PR for known anti-patterns (await-in-loop,
.includesinside.filter, string-concat in loop,SELECT *, N+1, etc.). - Reviewing AI-generated code that "looks idiomatic" but might hide O(n²) or N+1.
When in doubt, start at lemmaly — it is the gateway and will tell you when to escalate to its three sibling skills.
| If you are about to… | Use | Why |
|---|---|---|
| Write new code that loops, queries, joins, recurses, or processes a collection | lemmaly | Forces complexity + data structure + algorithm family before code is written. |
| Refactor existing code that is already slow, OOMs, times out, or has nested loops / N+1 / repeated work | complexity-cuts | Corrective playbook for code that already shipped with bad Big-O. |
| Implement an algorithm where the obvious version is subtly wrong (binary search variants, in-place dedup, Boyer–Moore, QuickSelect partition, recursion with accumulators, fixed-point / termination concerns) | invariant-guard | Forces writing the function contract + loop invariant before code. The trap is in the contract, not the loop body. |
| Work with n ≥ 10⁶, similarity search, dedup at scale, top-K, streaming analytics, cardinality estimation, embeddings, FFT/NTT, dimensionality reduction, computational geometry, randomized algorithms | mathguard | Classical algorithms have hit their lower bound; an approximate or math-heavy technique (Bloom, HLL, Count-Min, MinHash/LSH, FFT, JL projection, sweep line, kd-tree) gives the asymptotic win. |
Routing flow
Are you writing new code?
├── yes → lemmaly (state complexity, structure, family BEFORE coding)
│ ├── classical algorithm at its lower bound AND n is large? → mathguard
│ └── subtle correctness trap (invariant, base case, off-by-one)? → invariant-guard
└── no, refactoring existing slow / OOM / timed-out code → complexity-cuts
└── still slow after classical fixes? → mathguard
One-line mental model
- lemmaly = think first (prevention).
- complexity-cuts = clean up bad Big-O (correction).
- invariant-guard = prove it's correct (verification).
- mathguard = beat the classical floor (acceleration).
The Iron Law
NO NON-TRIVIAL CODE WITHOUT STATED COMPLEXITY, DATA STRUCTURE, AND ALGORITHM FAMILY
Before you write a loop, a recursion, a query, or any computation over more than a handful of items, three things must appear in your message — in this order:
time = O(?),space = O(?), with the dominant input dimension named.- The data structure you will use, with a one-phrase reason.
- The algorithm family (one of: linear scan, two-pointer, sliding window, binary search, sort+sweep, hash join, BFS/DFS, topo sort, Dijkstra/A*, union-find, DP, greedy, recursion+memo, prefix sum, segment tree, monoid reduction).
If you cannot state all three, you do not understand the problem yet. Ask, or read more code. Do not write code.
Non-negotiable rules
- State complexity before writing any non-trivial code. In one line:
time = O(?),space = O(?)- Dominant input dimension:
n = what, with realistic magnitude (e.g.n ~ 10^6 rows) - If you cannot state these, you do not yet understand the problem. Ask, or read more code.
…
الأسئلة الشائعة
ما هو «Big-O»؟
Big-O (أو التعقيد) طريقة لوصف مدى سرعة تشغيل الخوارزمية مع نمو حجم البيانات. فمثلاً O(n) تعني أن زمن التشغيل ينمو بشكل خطي مع حجم البيانات.
لماذا أحدد بنية البيانات أولاً؟
يؤثر اختيار بنية البيانات (مثل القوائم أو الخرائط أو المجموعات) تأثيراً مباشراً على الكفاءة. وتحديدها مسبقاً يضمن استخدام الأداة المناسبة للمهمة، مثل الخريطة للبحث السريع.
ما هي «عائلات الخوارزميات»؟
هي فئات عامة من استراتيجيات حل المشكلات، مثل البحث الثنائي، والترتيب، والبرمجة الديناميكية. ويساعد تحديد العائلة على التفكير في حلول معروفة وفعالة.
التفاصيل
الوصف الأصلي من المؤلف
Algorithm-first discipline: state Big-O, data structure, and algorithm family BEFORE writing loops, queries, or recursion. Catches O(n^2), N+1, and brute-force defaults.
الشعبية
- نجوم GitHub
- 48k
- الترتيب
- #5047
- الترخيص
- MIT
- آخر تحديث
- 15/10/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
00-andruia-consultant
48kيساعد وكيلك على بدء مشاريع الذكاء الاصطناعي أو تحسينها. يحلل الكود ويقترح الأدوات ويُعد خطط عمل بالإسبانية.
007
48kيتيح لوكيلك إجراء تدقيقات أمنية ونمذجة التهديدات. مفيد لحماية المشاريع من الهجمات والثغرات الأمنية.
10-andruia-skill-smith
48kيساعد وكيلك على إنشاء أدوات الذكاء الاصطناعي أو تحسينها. يحدد طريقة عملها، ويكتب توثيقها، ويتحقق من بنيتها.
20-andruia-niche-intelligence
48kيتيح لوكيلك إعداد ملخص عن صناعة محددة. مفيد لفهم السياق والقواعد وأنماط الاستخدام والمخاطر لمشروع ما، باستخدام مصادر موثوقة.
مهارات مشابهة
diffs
394kيتيح لوكيلك إنتاج فرق تعديلات حقيقي يمكن مشاركته، كرابط عرض أو ملف صورة، بدلاً من ملخص مكتوب يدوياً.
coding-agent
394kيساعد وكيلك على تسليم مهمة برمجة كبيرة إلى Codex أو Claude Code أو OpenCode كعامل في الخلفية، ثم متابعة تقدمها.
gh-issues
394kيساعد وكيلك على إيجاد مشكلات GitHub واختيار ما ستعمل عليه، وفتح طلبات سحب بالإصلاحات، ومتابعة تعليقات المراجعة.