شعار Melech Smart Comments

Melech Smart Comments

المجتمع
AdirD
melech-smart-comments

Preserve code intent with selective comments and protect meaningful existing comments.

نظرة عامة

الناشرAdirD
المستودعagent-shell-hamelech
اسم المهارةmelech-smart-comments
النجوم
46
التفريعات
5
الملفات المرفقة
تعليمات فقط
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

  • مفتوحة المصدر

    نشرها AdirD على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Melech Smart Comments في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى الإضافات → المهارات.
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/AdirD/agent-shell-hamelech/tree/main/skills/melech-smart-comments
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات → المهارات → إضافة مهارة → من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AdirD/agent-shell-hamelech.git /tmp/agent-shell-hamelech
mkdir -p .claude/skills
cp -r /tmp/agent-shell-hamelech/skills/melech-smart-comments .claude/skills/melech-smart-comments
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Melech Smart Comments في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج Melech Smart Comments تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Melech Smart Comments بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تترتب أي تكلفة على المهارة غير المستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Smart Comments

You are often the first reader of this code. You do not carry the scar tissue a human teammate would — you did not live through the incident that caused a function to look the way it does, and you cannot smell the landmine from the shape of the code alone.

Comments are the spec layer closest to the code. They are the last thing a model reads before producing the next token, and they are the cheapest, highest-signal way for a human to hand you constraints, warnings, and intent. Treat them accordingly.

This skill governs how you write new comments and how you treat existing ones.

When to Write a Comment

Write an inline comment when one of these is true. Otherwise do not.

  1. Landmines. Code that looks wrong, redundant, or removable but is not. State the reason — the past bug, the ordering constraint, the external-system quirk — so the next reader (human or agent) knows the cost of touching it.
  2. Non-obvious WHY. When the chosen approach was picked over a cleaner-looking alternative, name the tradeoff. "We could do X, but Y happens under load" is load-bearing; without it the next reader will try X.
  3. Hidden invariants and contracts. Implicit assumptions not visible in types, names, or the local function body — ordering between calls, idempotency guarantees, state a caller must have already set up, fields that must be populated together.
  4. Workarounds. Bugs in external systems, race conditions, temporary version pins, polyfills, hacks waiting on an upstream fix. Link or name the issue if one exists.

When NOT to Write a Comment

Do not write a comment when:

  • It narrates WHAT the code does and the identifiers already say it. // increment counter above counter++ is noise.
  • It refers to the current task, ticket, PR, author, or review round. Those belong in the commit message or PR description. They rot in the code.
  • It is a banner, section divider, or restatement of the function signature.
  • It describes intent the code itself will carry forward reliably through refactors — if a rename makes the comment wrong, the comment was redundant.

If the WHY is obvious from the name of the function and its arguments, the comment is not paying for its space.

How to Write Them

  • Inline. Directly above or beside the line they protect. Not at the top of the file, not in external docs, not in a commit message.
  • Short. Lead with the constraint or the warning. No wind-up.
  • Imperative where it matters. Prefer "Do not reorder — must run before X" over "This runs before X."
  • Name the cost. "Removing this early-return reopens the N+1 we fixed" beats "important early return."
  • Close the reasoning gap. Give enough of the causal chain for an unfamiliar reader to answer: what change would violate this, and what would break? Labels such as "race," "security issue," or "data leak" are not explanations by themselves.
  • Stay near three lines, not at their expense. Use the shortest comment that preserves the reason. If that takes substantially more, make the code express more of the constraint.

Respecting Existing Comments

This section is the reason this skill exists.

  • Treat every existing comment as load-bearing until proven otherwise. Someone — human or past agent — paid a cost to leave it there. Assume that cost was real.
  • Do not delete a comment during a refactor unless the code the comment describes is also being removed. Moving code does not justify dropping its comment.
  • "Looks redundant" is not sufficient justification for removal. The comment may be the only surviving trace of a past incident that the code itself no longer advertises.
  • If a comment looks stale or wrong, flag it in your response to the user. Do not silently fix or remove it. The user is the only one who can confirm whether the comment still reflects reality.
  • Never rewrite a comment just to change voice or tone. If it reads as a warning, keep it as a warning.

Calibration Examples

Bad — narrates what the code already says:

python
# Increment the retry counter
retries += 1

Good — names the landmine:

python
# Do not switch to exponential backoff here; upstream rate-limits on burst, not on average.
retries += 1

Bad — rots on the next refactor:

ts
// Added in PR #4821 by @alice to handle the new billing webhook
if (event.type === "invoice.paid") { ... }

Good — preserves the WHY:

ts
// Stripe fires invoice.paid before invoice.finalized for auto-advancing subs; handle both orderings.
if (event.type === "invoice.paid") { ... }

Bad — decorative, adds no signal:

go
// ---------- Helpers ----------

Good — encodes a hidden contract:

go
// Caller must hold s.mu. Returns the unwrapped value; safe only until the next Set().
func (s *state) peek() T { ... }

Bad — labels the failure without explaining it:

ts
// Keep this order to avoid a race.
await save(job);
await publish(job);

Good — gives the minimum reason needed to preserve the order:

ts
// Persist before publishing: a worker may consume immediately and must find the job.
await save(job);
await publish(job);

Summary

Code shows movement. Comments preserve memory. You are the reader that will most often decide whether that memory survives the next edit. When in doubt, leave the comment, and ask the human whether it should go.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Melech Smart Comments؟

Preserve code intent with selective comments and protect meaningful existing comments.

لماذا تستخدم Melech Smart Comments على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Melech Smart Comments عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Melech Smart Comments في TypingMind؟

افتح الإضافات → المهارات → التثبيت من GitHub في TypingMind والصق https://github.com/AdirD/agent-shell-hamelech/tree/main/skills/melech-smart-comments. يقرأ TypingMind ملف SKILL.md الخاص بها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Melech Smart Comments؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Melech Smart Comments؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Melech Smart Comments معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Melech Smart Comments مجانية؟

نعم. نشرها AdirD على GitHub بموجب ترخيص MIT. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا البريدية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇