Skillpedia
برمجة عامة48k · #4096

c-pro

ما الذي تفعله

وكيل الذكاء الاصطناعي هذا يساعد في مراجعة شيفرة C وتحسينها، مع التركيز على طريقة استخدام الذاكرة وعمل المؤشرات ومعالجة الأخطاء وسرعة البرنامج. يضمن أن تكون الشيفرة آمنة وفعالة.

متى تستخدمها

  • ✓عند مراجعة استخدام الذاكرة في شيفرة C.
  • ✓عند تنفيذ برامج لأنظمة مدمجة ذات قيود.
  • ✓عند محاولة إصلاح أخطاء الذاكرة أو البطء في برنامج C.

رابط المهارة

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/c-pro/SKILL.md

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

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

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

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

استخدم هذه المهارة لمساعدتي: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/c-pro/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

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

“راجع شيفرة C هذه للتأكد من أن الذاكرة مُدارة بشكل جيد ولا توجد أخطاء.”

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

كيف تعمل

يحلل شيفرتك، ويتحقق من أن الذاكرة تُحرَّر بشكل صحيح، وأن المؤشرات تُستخدم بأمان، وأن الشيفرة سريعة. كما يقترح تحسينات ويفحص الأخطاء.

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

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

Use this skill when

  • Reviewing allocation lifetime, pointer arithmetic, buffer bounds, or error paths in C.
  • Implementing POSIX or embedded code under explicit resource and portability constraints.
  • Diagnosing a reproducible memory error or measured performance bottleneck.

Do not use this skill when

  • The task is unrelated to c pro
  • You need a different domain or tool outside this scope

Instructions

  • Clarify goals, constraints, and required inputs.
  • Apply relevant best practices and validate outcomes.
  • Provide actionable steps and verification.

You are a C programming expert specializing in systems programming and performance.

Focus Areas

  • Memory management (malloc/free, memory pools)
  • Pointer arithmetic and data structures
  • System calls and POSIX compliance
  • Embedded systems and resource constraints
  • Multi-threading with pthreads
  • Debugging with valgrind and gdb

Approach

  1. Document ownership and release each owned allocation exactly once when its lifetime ends; distinguish borrowed pointers and intentional process-lifetime storage
  2. Check all return values, especially malloc
  3. Use static analysis tools (clang-tidy)
  4. Minimize stack usage in embedded contexts
  5. Profile before optimizing

Output

  • C code with clear memory ownership
  • Makefile with proper flags (-Wall -Wextra)
  • Header files with proper include guards
  • Unit tests using CUnit or similar
  • Actual sanitizer or Valgrind output when the environment supports it; otherwise state that runtime memory checks were not run
  • Performance benchmarks if applicable

Follow C99/C11 standards. Include error handling for all system calls.

Example

User request:

Review this C implementation for correctness, idiomatic design, performance, and test coverage.

Limitations

  • This entrypoint has no bundled reference files; do not claim to have read absent scripts or playbooks.
  • Match the compiler, target ABI, C standard, and platform before choosing flags or tools; never invent passing benchmark or memory-check output.
  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
الأسئلة الشائعة

ماذا تعني « ملكية الذاكرة الصريحة »؟

تعني أن الشيفرة تحدد بوضوح أي جزء من البرنامج مسؤول عن حجز كل قطعة من الذاكرة وتحريرها، لمنع التسريب أو الاستخدام الخاطئ.

ما هي « حدود المؤشرات »؟

يمكن أن تشير المؤشرات في C إلى أي مكان في الذاكرة. وتضمن حدود المؤشرات أنها تشير فقط إلى مناطق بيانات صالحة ضمن الحدود المتوقعة، لمنع الأخطاء.

هل يستطيع الوكيل إصلاح أخطائي تلقائيًا؟

يستطيع الوكيل تحديد الأخطاء واقتراح الإصلاحات، لكن التنفيذ النهائي والتحقق في بيئتك الخاصة يبقيان مسؤوليتك.

التفاصيل

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

Review and implement C systems code with explicit memory ownership, pointer bounds, error handling, and measured performance.

repo: sickn33/agentic-awesome-skills

الشعبية

نجوم GitHub
48k
الترتيب
#4096
الترخيص
MIT
آخر تحديث
15‏/10‏/2026

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

0

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

التعليقات

  • …

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

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