Skillpedia
برمجة عامة33k · #8896

reducing-entropy

ما الذي تفعله

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

متى تستخدمها

  • ✓عندما تطلب صراحة تقليل كمية الشيفرة في مشروع.
  • ✓عندما تصبح قاعدة الشيفرة منتفخة وتريد معرفة ما يمكن حذفه.
  • ✓عندما يضيف تغيير مقترح شيفرة وتريد التحقق من وجود خيار أصغر.

رابط المهارة

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/productivity/reducing-entropy/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/productivity/reducing-entropy/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“أريد معرفة ما يمكنني حذفه في هذه الوحدة. استخدم reducing-entropy واجعل قاعدة الشيفرة النهائية أصغر ما يمكن.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يحمّل وكيلك واحدا من أنماط التفكير في المهارة، ويسأل إن كانت أصغر نتيجة ممكنة هي عدد أقل من الدوال أو لا شيء، ويحسب الأسطر قبل كل تغيير وبعده، ويفضّل الحذف.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

Reducing Entropy

More code begets more code. Entropy accumulates. This skill biases toward the smallest possible codebase.

Core question: "What does the codebase look like after?"

Before You Begin

Load at least one mindset from references/

  1. List the files in the reference directory
  2. Read frontmatter descriptions to pick which applies
  3. Load at least one
  4. State which you loaded and its core principle

Do not proceed until you've done this.

The Goal

The goal is less total code in the final codebase - not less code to write right now.

  • Writing 50 lines that delete 200 lines = net win
  • Keeping 14 functions to avoid writing 2 = net loss
  • "No churn" is not a goal. Less code is the goal.

Measure the end state, not the effort.

Three Questions

1. What's the smallest codebase that solves this?

Not "what's the smallest change" - what's the smallest result.

  • Could this be 2 functions instead of 14?
  • Could this be 0 functions (delete the feature)?
  • What would we delete if we did this?

2. Does the proposed change result in less total code?

Count lines before and after. If after > before, reject it.

  • "Better organized" but more code = more entropy
  • "More flexible" but more code = more entropy
  • "Cleaner separation" but more code = more entropy

3. What can we delete?

Every change is an opportunity to delete. Ask:

  • What does this make obsolete?
  • What was only needed because of what we're replacing?
  • What's the maximum we could remove?

Red Flags

  • "Keep what exists" - Status quo bias. The question is total code, not churn.
  • "This adds flexibility" - Flexibility for what? YAGNI.
  • "Better separation of concerns" - More files/functions = more code. Separation isn't free.
  • "Type safety" - Worth how many lines? Sometimes runtime checks in less code wins.
  • "Easier to understand" - 14 things are not easier than 2 things.

When This Doesn't Apply

  • The codebase is already minimal for what it does
  • You're in a framework with strong conventions (don't fight it)
  • Regulatory/compliance requirements mandate certain structures

Reference Mindsets

See references/ for philosophical grounding.

To add new mindsets, see adding-reference-mindsets.md.


Bias toward deletion. Measure the end state.

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

هل تعمل تلقائيا؟

لا. المهارة يدوية فقط، وتُفعَّل عندما تطلبها صراحة.

هل الشيفرة الأقل تفوز دائما؟

تقيس المهارة النجاح بالكمية النهائية للشيفرة، فقد يُرفض تغيير يضيف أسطرا حتى لو بدا أنظف.

ما السؤال الجوهري الذي تطرحه؟

كيف تبدو قاعدة الشيفرة بعد التغيير؟

التفاصيل

الوصف الأصلي من المؤلف

Manual-only skill for minimizing total codebase size. Only activate when explicitly requested by user. Measures success by final code amount, not effort. Bias toward deletion.

repo: davila7/claude-code-templates

الشعبية

نجوم GitHub
33k
الترتيب
#8896
الترخيص
MIT
آخر تحديث
2‏/11‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة