شعار Comment Discipline

Comment Discipline

المجتمع
Dark-Alex-17
comment-discipline

اضبط كثافة التعليقات وأسلوبها بما يتوافق مع الأعراف السائدة في المستودع قبل كتابة الشيفرة. تحدد هذه المهارة أسلوب التعليقات في المستودع (موثّق ذاتيًا / موثّق عبر API / كثيف التعليقات) استنادًا إلى الملفات النظيرة التي قرأتها بالفعل لمطابقة الأنماط، أو إلى سياسة معلنة في تعليمات مساحة العمل، ثم تحدد متى يكون التعليق مبررًا. عند ضعف المؤشرات، اعتمد الخيار الافتراضي: لا تكتب أي تعليق. تكمل مهارة ai-slop-remover، التي تحظر التعليقات التي تكرر ما توضحه الشيفرة في جميع الأساليب.

نظرة عامة

الناشرDark-Alex-17
المستودعcoyote
اسم المهارةcomment-discipline
النجوم
56
التفريعات
2
الملفات المرفقة
تعليمات فقط
الترخيصAGPL-3.0
الروابط
  • تعليمات بصيغة Markdown

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

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

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

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

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

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

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

التثبيت

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

1

التثبيت في TypingMind

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

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/Dark-Alex-17/coyote/tree/main/assets/skills/comment-discipline
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

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

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

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Dark-Alex-17/coyote.git /tmp/coyote
mkdir -p .claude/skills
cp -r /tmp/coyote/assets/skills/comment-discipline .claude/skills/comment-discipline
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

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

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

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

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

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

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

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

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

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

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

You are about to write or modify code. LLMs systematically over-comment — narrating every block, restating signatures, banner-ing sections — and that default is wrong in most repositories. Before writing, determine the repo's comment register and match it, exactly the way you already match imports, naming, and error handling. Across every register, one test governs each comment you write: it must earn its keep. If the code already tells the reader, the comment doesn't get written — don't add comments you don't need; make the code tell them instead.

Step 0: Check for a declared policy first

Detection is a heuristic; a repo owner's declaration is ground truth. Before sampling files, check the workspace instructions already in your context (COYOTE.md / AGENTS.md / CLAUDE.md) for a stated comment policy (e.g. a "Comments" or "Style" section). If one exists, obey it and skip detection entirely.

Step 1: Detect the register (during reads you already do)

Pattern-matching discipline already requires you to find and read 2-3 similar existing files before writing. While reading them, observe:

  1. Density — roughly what fraction of lines are comments? Near-zero, sparse (~1 per function or less), or pervasive (most blocks narrated)?
  2. Types present — doc comments on public items (///, /** */, docstrings)? Inline "why" comments? Section banners (// ===== Handlers =====)? Commented-out code (a smell, not a convention — never imitate it)?
  3. What the comments say — do they explain why (decisions, workarounds, invariants, links to issues) or narrate what (restating the code)? A repo whose comments are all "why" is self-documenting even if density is nonzero.
  4. Config signals — these force the answer regardless of sampled style: #![warn(missing_docs)] or #![deny(missing_docs)] in Rust, eslint jsdoc/require-jsdoc rules, pylint/pydocstyle docstring checkers, a lint config banning TODO without a ticket. Lint-enforced conventions are mandatory.
  5. TODO/FIXME conventions — bare TODO:, or TODO(name):, or ticket-linked TODO(#123):? Match the observed form if you must leave one.

Sample from the SAME language and module you're editing — a repo can have a chatty Python test suite and a silent Rust core. The nearest siblings win.

Step 2: Classify into a register

RegisterYou observedYour rule when writing
self-documentingNear-zero density; the comments that exist explain decisions, temp fixes, or non-obvious behaviorComment ONLY for: why a non-obvious approach was chosen, documented workarounds/temp fixes (with issue link if the repo does that), safety/concurrency invariants, regex or math explanations. Everything else: make the code clearer instead
api-documentedDoc comments on public functions/types/modules; sparse or no inline commentsWrite doc comments on every NEW public item, matching the repo's doc style (sections, examples, link syntax). Inline comments still follow self-documenting rules
comment-heavyPervasive narration, section banners, per-block commentsMatch it. Comment your work the way the siblings do — same placement, same tone, same banner style. Under-commenting here is a convention violation just like over-commenting elsewhere

Mixed signals (e.g. doc comments everywhere + narrated private code) → combine rows: doc comments mandatory AND inline narration matched.

Step 3: The tiebreak

When the signal is weak or files disagree: write NO comment. Your untrained default is comment-heavy, so the correction must push the other way. A missing comment is a one-line review nit; a hundred useless comments are a cleanup task. If you genuinely cannot tell and the comment feels important, it is usually a sign the code should be restructured until the comment is unnecessary.

Invariants that do NOT bend with register

  1. Never restate the code. // increment the counter above counter += 1 is slop in EVERY register — comment-heavy repos narrate intent and sections, they don't caption individual lines the reader can read. (This is ai-slop-remover's rule; it applies unconditionally.)
  2. Always keep the genuinely necessary comment, even in the sparsest repo: non-obvious algorithm choices (with the reference), regex explanations, safety invariants (unsafe justifications, lock ordering), intentional deviations from the obvious approach, and workarounds for upstream bugs (with the link).
  3. Never leave commented-out code, regardless of what the repo tolerates.
  4. Never delete or rewrite EXISTING comments that don't match the register you detected — that's out-of-scope churn. Register calibration governs comments YOU write.
  5. Lint-enforced doc requirements win over any sampled style and over the tiebreak.

Anti-patterns

  • Narrating your implementation (// First we parse the config, then...) in a repo whose functions are bare.
  • Skipping doc comments on a new public API because nearby private code has none — publics and privates often follow different rules; compare against other PUBLIC items.
  • Writing doc comments that restate the signature (/// Gets the user. Returns the user.) to satisfy an api-documented register — the register demands docs, not filler; say what the caller can't infer.
  • Section banners in a repo that has none.
  • Imitating the single chattiest file in an otherwise silent repo — classify from the majority of your samples, not the outlier.
  • Treating this skill as license to argue with a declared policy: COYOTE.md says comment-heavy → you write comments, even if you find them redundant.

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

ماذا تفعل مهارة الذكاء الاصطناعي Comment Discipline؟

اضبط كثافة التعليقات وأسلوبها بما يتوافق مع الأعراف السائدة في المستودع قبل كتابة الشيفرة. تحدد هذه المهارة أسلوب التعليقات في المستودع (موثّق ذاتيًا / موثّق عبر API / كثيف التعليقات) استنادًا إلى الملفات النظيرة التي قرأتها بالفعل لمطابقة الأنماط، أو إلى سياسة معلنة في تعليمات مساحة العمل، ثم تحدد متى يكون التعليق مبررًا. عند ضعف المؤشرات، اعتمد الخيار الافتراضي: لا تكتب أي تعليق. تكمل مهارة ai-slop-remover، التي تحظر التعليقات التي تكرر ما توضحه الشيفرة في جميع الأساليب.

لماذا تستخدم Comment Discipline على TypingMind؟

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

كيف أثبّت Comment Discipline في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/Dark-Alex-17/coyote/tree/main/assets/skills/comment-discipline. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Comment Discipline؟

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

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Comment Discipline؟

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

هل مهارة الذكاء الاصطناعي Comment Discipline مجانية؟

نعم. نشرها Dark-Alex-17 على GitHub بموجب ترخيص AGPL-3.0. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

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

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

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

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

عرض الكل

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

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