Skillpedia
برمجة عامة60k · #3169

develop-app

ما الذي تفعله

تساعد هذه المهارة وكيلك على تغيير ما يفعله تطبيق Twenty موجود، مثل نموذج بياناته وشاشاته ومنطقه وسير عمله. وهي مخصصة للمطورين الذين يبنون ميزات مخصصة على Twenty.

متى تستخدمها

  • ✓عندما تريد إضافة كائن جديد أو حقل مخصص إلى تطبيق Twenty موجود.
  • ✓عندما تريد دالة منطق تعمل عند إنشاء سجل.
  • ✓عندما تريد بناء صفحة مخصصة أو مكون واجهة أمامية لتطبيقك.

رابط المهارة

https://github.com/twentyhq/twenty/blob/main/packages/twenty-agent-skills/skills/develop-app/SKILL.md

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

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

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

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

استخدم هذه المهارة لمساعدتي: https://github.com/twentyhq/twenty/blob/main/packages/twenty-agent-skills/skills/develop-app/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

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

“أضف حقلا مخصصا اسمه renewal date إلى كائن الشركة في تطبيق Twenty الخاص بي.”

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

develop-app: دليل كامل

Twenty هو نظام CRM مفتوح المصدر يمكنك توسيعه بتطبيقاتك الخاصة. يستطيع التطبيق أن يضيف كائنات وحقولاً وشاشات ومنطقاً جديداً. إجراء ذلك يدوياً يتطلب معرفة بتنظيم الملفات والمعرّفات وعمليات الاستيراد من SDK. أي خطأ صغير في أيٍّ منها قد يعطل التطبيق.

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

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

حالات الاستخدام

إضافة نموذج بيانات لعملية جديدة

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

التفاعل عند إنشاء سجل

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

التصرف على عدة سجلات محددة

تريد زراً في صفحة قائمة يحدّث كل السجلات المحددة. تفضّل المهارة دالة منطق تقبل مصفوفة من السجلات، ولكل سجل معرّف id، فتعالج نقرة واحدة سجلاً واحداً أو خمسين.

خطوة بخطوة

  1. 1ثبّت المهارة وافتح وكيلك في المجلد الجذري لتطبيق Twenty. يجب أن يحتوي هذا المجلد على package.json وعلى src/application-config.ts.
  2. 2صف التغيير في جملة واحدة. اذكر الكائن أو الحقل أو الدالة أو المكوّن الذي تريده، وحدّد ما إذا كان يحتاج إلى شاشة.
  3. 3إذا كان التغيير يمس عدة كيانات، اقرأ الخطة المكوّنة من 3 إلى 6 أسطر التي يقدمها الوكيل. أجب عن أي خيارات يسألك عنها قبل أن يبدأ التعديل.
  4. 4اترك الوكيل ينشئ الكيانات الجديدة بمولّد Twenty CLI بدلاً من كتابة الملفات يدوياً. هذا يُعدّ بنية الملفات والمعرّفات وعمليات الاستيراد.
  5. 5راجع الملفات المعدّلة وملفات الاختبار الجديدة في مجلدات __tests__. ثم استخدم مهارة manage-app للمزامنة والنشر.

مثال

ماذا تطلب

“أضف مكوناً أمامياً إلى صفحة الصفقة فيه زر يعلّم الصفقات المحددة بأنها تمت مراجعتها. يجب أن يستدعي دالة منطق.”

ما الذي ستحصل عليه

يتأكد الوكيل أنه في جذر التطبيق، ثم يعرض خطة قصيرة: دالة منطق واحدة تأخذ مصفوفة records فيها معرّفات ids، ومكوّن أمامي واحد يستدعيها. يولّد الاثنين باستخدام CLI، ويضع الدوال المساعدة المشتركة في src/utils، ويضيف ملف مواصفات لكل دالة مساعدة.

نصائح

  • ✓شغّل الوكيل من جذر التطبيق. إذا كان package.json أو src/application-config.ts مفقوداً، يجب أن تتوقف المهارة وتبحث عن المجلد الصحيح بدلاً من التعديل.
  • ✓لا تطلب من هذه المهارة النشر أو إصلاح أخطاء المزامنة أو تصحيح المصادقة. هذه المهام تعود إلى manage-app، والخلط بينها يبطئ المهمتين عادةً.
  • ✓إذا كنت تحتاج إلى دالة تعالج سجلاً واحداً فقط، فاذكر ذلك صراحةً. وإلا فستبنيها المهارة لمعالجة سجلات كثيرة ولن تضيف نسخة لسجل واحد.

بدائل

  • skill-creator

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

  • code-review

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

  • karpathy-guidelines

    اختر هذه إذا أردت إرشادات عامة لكتابة كود بسيط وواضح وسهل الفحص في أي مشروع، وليس داخل تطبيق Twenty فقط.

أسئلة وأجوبة

هل أحتاج إلى أن أكون مطوراً لاستخدام هذه المهارة؟

في الغالب نعم. فهي تعدّل كود TypeScript داخل مجلد تطبيق Twenty، وتحتاج إلى قراءة النتائج ونشرها. يكتب الوكيل الكود، لكن عليك أن تفهم ما الذي تغيّر.

أين يضع الوكيل كود المساعدة والاختبارات؟

توضع الدوال المساعدة في src/utils، والأنواع في src/types، والأغلفة الخاصة بالخدمات الخارجية في مجلد لكل خدمة. تستخدم أسماء الملفات بصيغة kebab-case، مع تصدير واحد في كل ملف. لكل دالة مساعدة اختبار في مجلد __tests__ مجاور.

ماذا لو لم يتعرف على مجلد التطبيق الخاص بي؟

تتحقق المهارة من وجود package.json وsrc/application-config.ts. إذا غاب أيٌّ منهما فلن تعدّل شيئاً. تبحث في المجلدات القريبة عن جذر التطبيق، أو توجهك إلى create-app إذا لم يكن هناك تطبيق أصلاً.

كيف تعمل

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

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

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

When To Use

Pick this skill when the user wants to change what an existing Twenty app does — its data model, UI, logic, or workflows. Representative triggers:

  • "add a new object to my Twenty app"
  • "create a logic function that runs on record create"
  • "add a custom field to the company object"
  • "build a front component for the deal page"
  • "modify an existing entity / object / field"
  • "add a workflow with a manual trigger"
  • "add roles and permissions to my app"
  • "create a standalone page in my app"

Do not use this skill to scaffold a brand-new app (use create-app), to sync/deploy/troubleshoot (use manage-app), to prepare marketplace assets (use publish-app), or to query workspace records (use use-twenty-mcp).

Boundaries

For background on how Twenty apps work — the SDK packages, remotes, sync lifecycle, and rendering model — read ../../references/concepts/how-apps-work.md. Cross-skill operating rules that apply to every Twenty app task are in ../../references/concepts/operating-rules.md; they are authoritative and not restated per skill.

Do not scaffold a new app here. Use create-app first when the app does not exist.

Workflow

First, confirm the setup is sane before changing entities. The current directory should be the root of an existing Twenty app:

test -f package.json
test -f src/application-config.ts

If either file is missing, do not edit blindly. Inspect nearby folders to find the app root, or use create-app when the app does not exist.

If setup, dependencies, remotes, authentication, sync, build, deploy, logs, or CI/CD are failing, switch to manage-app before continuing with entity work.

For app shape and entity file structure, read ../../references/develop-app/app-structure.md.

Plan Before Editing

For any change involving more than one entity, state the plan back in 3–6 lines before editing: objects extended, fields added, logic functions and post-install hooks declared, whether the app needs UI. Confirm with the user when there is a real choice.

Skip for single-entity edits, renames, and copy fixes.

Code Organization

Keep logic functions, post-install hooks, and front components narrow. Extract everything that is not the trigger, inputs, writes, rendering shell, or external call:

  • src/utils/<name>.util.ts — pure helpers (parsers, mappers, formatters).
  • src/front-components/utils/<name>.util.ts — front-component runtime helpers that are reusable and testable.
  • src/types/<name>.ts — external API and internal DTO types (one PascalCase type per file).
  • src/<service>-client/<name>.ts — wrappers around external SDKs or shared HTTP clients. One folder per service, matching Twenty's *-client convention.

Kebab-case filenames. One export per file is mandatory for every helper, type, and client file in src/ — never multiple function exports in one file. The rule counts exports: a local (non-exported) type may stay alongside the util, but once a type is exported or reused it splits into a src/types/<name>.ts file separate from the src/utils/<name>.util.ts file. See app-structure.md for the canonical rule and the full suffix convention.

Refactor when:

  • A *.logic-function.ts or *.post-install.ts file exceeds the soft cap (see ../../references/develop-app/logic.md).
  • A front component contains duplicated command execution, record loading, logic-function lookup, payload building, result parsing, or snackbar formatting.
  • The same parsing or mapping logic appears across object types.
  • Multiple field files differ only by name and identifier — use a factory under src/fields/.

Always create a *.spec.ts test file in a sibling __tests__/ folder for every util/function you add or change, one spec file per source file. See ../../references/develop-app/tests.md.

When a front component triggers a logic function for selected records, always prefer a bulk-capable logic function unless the user explicitly states that the function is only for one record. The default payload shape is records: Array<{ id: string; ...fields }>: inside records, use id for the Twenty record ID because the array name already establishes the record context. Do not add flat single-record compatibility payloads unless the user explicitly asks to preserve an existing single-record API.

Adding New Entities

Use a CLI to add new entities. It generates the correct file structure, UUIDs, SDK imports, and boilerplate. Check first for the standalone

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

ماذا يمكنها أن تغيّر في التطبيق؟

يمكنها تغيير الكائنات والحقول ودوال المنطق والأدوار والعروض والتخطيطات ومكونات الواجهة الأمامية.

هل تنشئ تطبيقا جديدا؟

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

هل تنشر تغييراتي؟

لا، المزامنة والنشر يتولاهما مهارة manage-app.

التفاصيل

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

Use when the user wants to add or modify Twenty app entities, including objects, layouts, logic functions, and front components inside an existing Twenty app.

repo: twentyhq/twenty

الشعبية

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

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

0

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

التعليقات

  • …

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

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