Skillpedia
التوثيق48k · #4098

c4-code

ما الذي تفعله

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

متى تستخدمها

  • ✓عندما تبدأ العمل على جزء جديد من الشيفرة.
  • ✓عندما تحتاج إلى فهم كيفية عمل قسم محدد من الشيفرة.
  • ✓عندما توثّق مشروعًا لمطورين آخرين.

رابط المهارة

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

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

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

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

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

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

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

“وثّق مجلد « utils » في المشروع، مع عرض الدوال ومعاملاتها وتبعياتها.”

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

كيف تعمل

تفحص هذه المهارة ملفات الشيفرة في المجلد المحدد. تحدد الدوال والأصناف ومعاملاتها وما تُرجعه، وأي أجزاء أخرى من الشيفرة تستخدمها. ثم تنظم هذه المعلومات بوضوح.

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

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

C4 Code Level: [Directory Name]

Use this skill when

  • Working on c4 code level: [directory name] tasks or workflows
  • Needing guidance, best practices, or checklists for c4 code level: [directory name]

Do not use this skill when

  • The task is unrelated to c4 code level: [directory name]
  • 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.

Overview

  • Name: [Descriptive name for this code directory]
  • Description: [Short description of what this code does]
  • Location: [Link to actual directory path]
  • Language: [Primary programming language(s)]
  • Purpose: [What this code accomplishes]

Code Elements

Functions/Methods

  • functionName(param1: Type, param2: Type): ReturnType
    • Description: [What this function does]
    • Location: [file path:line number]
    • Dependencies: [what this function depends on]

Classes/Modules

  • ClassName
    • Description: [What this class does]
    • Location: [file path]
    • Methods: [list of methods]
    • Dependencies: [what this class depends on]

Dependencies

Internal Dependencies

  • [List of internal code dependencies]

External Dependencies

  • [List of external libraries, frameworks, services]

Relationships

Optional Mermaid diagrams for complex code structures. Choose the diagram type based on the programming paradigm. Code diagrams show the internal structure of a single component.

Object-Oriented Code (Classes, Interfaces)

Use classDiagram for OOP code with classes, interfaces, and inheritance:

---
title: Code Diagram for [Component Name]
---
classDiagram
    namespace ComponentName {
        class Class1 {
            +attribute1 Type
            +method1() ReturnType
        }
        class Class2 {
            -privateAttr Type
            +publicMethod() void
        }
        class Interface1 {
            <<interface>>
            +requiredMethod() ReturnType
        }
    }

    Class1 ..|> Interface1 : implements
    Class1 --> Class2 : uses

### Functional/Procedural Code (Modules, Functions)

For functional or procedural code, you have two options:

**Option A: Module Structure Diagram** - Use `classDiagram` to show modules and their exported functions:

```mermaid
---
title: Module Structure for [Component Name]
---
classDiagram
    namespace DataProcessing {
        class validators {
            <<module>>
            +validateInput(data) Result~Data, Error~
            +validateSchema(schema, data) bool
            +sanitize(input) string
        }
        class transformers {
            <<module>>
            +parseJSON(raw) Record
            +normalize(data) NormalizedData
            +aggregate(items) Summary
        }
        class io {
            <<module>>
            +readFile(path) string
            +writeFile(path, content) void
        }
    }

    transformers --> validators : uses
    transformers --> io : reads from
```

**Option B: Data Flow Diagram** - Use `flowchart` to show function pipelines and data transformations:

```mermaid
---
title: Data Pipeline for [Component Name]
---
flowchart LR
    subgraph Input
        A[readFile]
    end
    subgraph Transform
        B[parseJSON]
        C[validateInput]
        D[normalize]
        E[aggregate]
    end
    subgraph Output
        F[writeFile]
    end

    A -->|raw string| B
    B -->|parsed data| C
    C -->|valid data| D
    D -->|normalized| E
    E -->|summary| F
```

**Option C: Function Dependency Graph** - Use `flowchart` to show which functions call which:

```mermaid
---
title: Function Dependencies for [Component Name]
---
flowchart TB
    subgraph Public API
        processData[processData]
        exportReport[exportReport]
    end
    subgraph Internal Functions
        validate[validate]
        transform[transform]
        format[format]
        cache[memoize]
    end
    subgraph Pure Utilities
        compose[compose]
        pipe[pipe]
        curry[curry]
    end

    processData --> validate
    processData --> transform
    processData --> cache
    transform --> compose
    transform --> pipe
    exportReport --> format
    exportReport --> processData
```

### Choosing the Right Diagram


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

ما هو « C4 على مستوى الشيفرة »؟

هو طريقة لتوثيق الشيفرة مع التركيز على التفاصيل الداخلية مثل الدوال والأصناف، لفهم بنية مكوّن معيّن.

ما أنواع المخططات التي يمكنها إنشاؤها؟

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

هل أحتاج إلى معرفة نموذج C4 لاستخدام هذه المهارة؟

ليس بالضرورة. تركز المهارة على تفاصيل الشيفرة، وهي مستوى واحد من نموذج C4، ولا تحتاج إلى أن تكون خبيرًا فيه لاستخدامها.

التفاصيل

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

Expert C4 Code-level documentation specialist. Analyzes code directories to create comprehensive C4 code-level documentation including function signatures, arguments, dependencies, and code structure.

repo: sickn33/agentic-awesome-skills

الشعبية

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

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

0

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

التعليقات

  • …

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

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