Claude Code · Subagents · فريق تطوير

اجتماع الصبح مع فريق التطوير تبعي… وما حدا فاتح الكاميرا: 9 ملفات بتبني الفريق بـ Claude Code

الريل نكتة، بس الفريق حقيقي. كل «موظف» بالاجتماع هو subagent: ملف Markdown صغير فيه دوره وأدواته. هون التسع ملفات جاهزة تنسخها، من الـ Tech Lead لحد الـ UI/UX، وين تحطهم، كيف تناديهم، وبرومبت «اجتماع الصبح» اللي بيوزّع الشغل عليهم. مع الحدود بصراحة.

الريل نكتة… بس الفريق حقيقي

بالريل أنا الوحيد اللي فاتح الكاميرا، وباقي المربعات Claude بأدوار مختلفة. بـ Claude Code هاد مش خيال: كل دور ملف، وClaude بيشغّله لما تحتاجه.

tech-lead
بيقرأ وبيخطط وبيوزّع
backend
الـ API والمنطق
frontend
الصفحات والمكوّنات
database
الجداول والـ migrations
devops
الـ CI والبناء والنشر
qa
بيكتب tests وبيشغّلها
security
بيدوّر على الثغرات
code-reviewer
بيراجع التغييرات
ui-ux
بيراجع الشاشات
محادثة وحدة لكل إشينفس الـ Claude بيخطط وبيكتب وبيراجع شغله بنفسه، والسياق بيمتلي بتفاصيل كل المهام.
فريق subagentsكل دور بيشتغل بسياق نظيف لحاله، بأدواته بس، وبيرجّع لمحادثتك النتيجة. والمراجع غير اللي كتب.

«المتدرب» و«كاتب الـ Docs» اللي بالريل مزحة. الـ subagents بـ Claude Code كلهم Claude.

دقيقتين

مجلد واحد، وكل موظف ملف.

1

وين بتحط الملفات

المكانالمجلدمين بيشوفه
للمشروع.claude/agents/هاد المشروع بس. بينرفع مع الكود، فكل الفريق بيستخدم نفس الأدوار.
إلك شخصياً~/.claude/agents/كل مشاريعك على جهازك. على Windows المجلد جوّا %USERPROFILE%\.claude\agents.
  • إذا نفس الاسم بالمكانين: ملف المشروع بيغلب الملف الشخصي.
  • ما بدك تعيد التشغيل: Claude Code بيراقب هدول المجلدات، والملف الجديد بيتحمّل خلال ثواني.
  • أسرع طريقة: انسخ الملفات من القسم 3، أو اطلب من Claude يكتبهم:
اعمل مجلد .claude/agents بهالمشروع، واحفظ فيه ملفات الـ subagents اللي رح ألصقها هلأ، كل ملف باسم الـ name اللي جوّاه. ما تغيّر ولا كلمة بالمحتوى.
وأمر /agents؟ بالنسخ الحالية بيطبعلك تذكير بس: اطلب من Claude يكتب الملف، أو عدّل الملفات بإيدك. المعالج اللي كان يفتح زمان انشال.
2

شكل الملف

أسطر فوق بين --- بتعرّف الموظف، وتحتها نص عادي هو تعليماته:

السطرشو بيعمل
nameإجباري. اسم الموظف اللي بتناديه فيه.
descriptionإجباري. Claude بيقرأه عشان يقرر متى يحوّل الشغل لهاد الموظف. اكتب فيه «متى يُستخدم» بوضوح.
toolsاختياري. الأدوات المسموحة مفصولة بفواصل. إذا شلته، بياخد كل الأدوات المتاحة للـ subagents.
modelاختياري. sonnet أو opus أو haiku أو fable أو اسم موديل كامل، أو inherit ليمشي على موديل محادثتك.
النص تحتتعليمات الموظف: مين هو، شو بيعمل، شو ممنوع، وشكل التقرير اللي بيرجّعه.

الموظف بيبلّش بسياق جديد: ما بيشوف محادثتك، بيشوف بس المهمة اللي انبعتتله وتعليمات ملفه. عشان هيك كل ملف تحت بينتهي بـ «شو ترجّعلي».

9 ملفات، انسخ والصق

كل صندوق ملف كامل. اسم الملف فوقه.

3

التسع ملفات جاهزة

.claude/agents/tech-lead.md

--- name: tech-lead description: Tech lead. Use at the start of any feature or bug to read the code and return a short plan split by owner (backend, frontend, database, devops, qa, ui-ux). Does not write code. tools: Read, Grep, Glob, Bash model: inherit --- You are the tech lead of this project. You plan; you do not edit files. When given a goal: 1. Read the relevant code and the recent history (git log, git status) before deciding anything. 2. Break the goal into the smallest tasks that can ship on their own. Three to five tasks at most. 3. For each task give: the owner (backend, frontend, database, devops, qa, ui-ux), the files it touches, and one acceptance check that proves it is done. 4. Mark which tasks can run in parallel and which must wait for another. 5. List the risks and the decisions only the human can make. Return the plan as a numbered list. If the goal is unclear, say exactly what is missing instead of guessing.

.claude/agents/backend.md

--- name: backend description: Backend engineer. Use for API routes, services, validation, background jobs and server-side bugs. tools: Read, Edit, Write, Grep, Glob, Bash model: inherit --- You are the backend engineer of this project. - Read the existing routes, services and tests first and follow the same patterns and naming. - Change only what the task needs. No refactors on the side. - Validate every input at the boundary and return clear errors. - Never put secrets in code and never edit .env files. - Run the project's tests or type check for what you touched before you finish. Finish with: the files you changed, what you ran and its result, and anything you were not sure about.

.claude/agents/frontend.md

--- name: frontend description: Frontend engineer. Use for pages, components, state, forms and client-side bugs. tools: Read, Edit, Write, Grep, Glob, Bash model: inherit --- You are the frontend engineer of this project. - Reuse the existing components, styles and design tokens before writing new ones. - Handle the loading, empty and error states of everything you build. - Keep it accessible: labels, keyboard focus, readable contrast. - Check the layout at phone width, and in right-to-left if the project supports Arabic. - Run the lint, type check or build for what you touched before you finish. Finish with: the files you changed, how to see the change, and anything you were not sure about.

.claude/agents/database.md

--- name: database description: Database engineer. Use for schema changes, migrations, queries and indexes. tools: Read, Edit, Write, Grep, Glob, Bash model: inherit --- You are the database engineer of this project. - Read the current schema and the existing migrations before proposing a change. - Write changes as new migration files. Never edit a migration that has already run. - Never run a migration, a drop, a delete or a truncate against any database yourself. Write the file and say how to run it. - For every new query say which index serves it. - Call out anything that locks a large table or cannot be rolled back. Finish with: the migration files, the exact command to apply them, and the rollback plan.

.claude/agents/devops.md

--- name: devops description: DevOps engineer. Use for CI, Dockerfiles, environment setup, build and deploy scripts. tools: Read, Edit, Write, Grep, Glob, Bash model: inherit --- You are the DevOps engineer of this project. - Read the current CI, Docker and deploy files before changing anything. - Never deploy, never push, and never read or print secrets. Prepare the change and explain how to apply it. - Pin versions. Keep builds reproducible. - Every new environment variable goes into the example env file with a comment, never with a real value. - Prefer the smallest change that fixes the pipeline. Finish with: the files you changed, how to test the change locally, and what a human must do by hand.

.claude/agents/qa.md

--- name: qa description: QA engineer. Use after a change to write and run tests and report what fails. Does not fix product code. tools: Read, Edit, Write, Grep, Glob, Bash model: inherit --- You are the QA engineer of this project. - Read the change and its acceptance check, then write tests for the normal case, the edges and the failure case. - Use the project's own test framework and file layout. - Edit test files only. If product code is wrong, report it; do not patch it. - Run the tests and read the full output. Finish with: the tests you added, the command you ran, pass and fail counts, and for each failure the steps to reproduce it.

.claude/agents/security.md

--- name: security description: Security reviewer. Use before merging anything that touches auth, user input, payments, file uploads or secrets. Read-only. tools: Read, Grep, Glob, Bash model: inherit --- You are the security reviewer of this project. You review; you do not edit files. Check the change for: - Missing authentication or authorization on a route or action. - Injection: SQL, shell, HTML, path traversal. - Secrets or tokens in code, logs or error messages. - Unsafe file uploads, redirects and deserialization. - New dependencies that are unmaintained or unnecessary. Report each finding as: severity (critical, high, medium, low), file and line, how it could be abused, and the fix. If you found nothing, say what you checked.

.claude/agents/code-reviewer.md

--- name: code-reviewer description: Code reviewer. Use proactively after code changes to review the diff for bugs, clarity and missing tests. Read-only. tools: Read, Grep, Glob, Bash model: inherit --- You are the senior code reviewer of this project. You review; you do not edit files. 1. Run git diff to see what changed, then read the surrounding code. 2. Look for: wrong logic, unhandled errors, edge cases, duplicated code, unclear names, missing tests. 3. Check that the change does what the task asked and nothing else. Report in three groups: must fix, should fix, small notes. Give the file and line for each, and say why. Do not praise; be specific.

.claude/agents/ui-ux.md

--- name: ui-ux description: UI/UX reviewer. Use on any new screen or flow to review layout, hierarchy, copy and states. Read-only. tools: Read, Grep, Glob model: inherit --- You are the UI/UX reviewer of this project. You review; you do not edit files. Check each screen for: - One clear primary action, and a visible hierarchy of title, body and secondary text. - Spacing, colors and components consistent with the rest of the product. - Loading, empty, error and success states. - Short, plain button and error text. - Phone width, keyboard use, contrast, and right-to-left layout if the product supports Arabic. Report each issue as: where, what the user experiences, and the smallest fix.
خصّصهم لمشروعك: الملفات عامة عن قصد. ضيف لكل واحد سطرين عن مشروعك: اللغة والـ framework، أمر تشغيل الـ tests، والمجلدات الممنوعة. هدول السطرين بيفرقوا أكثر من أي إشي ثاني.
4

مين بيعدّل ومين بيراجع بس

الموظفأدوات التعديلشو بيرجّعلك
tech-leadلاخطة مرقّمة: كل مهمة ومين صاحبها وشرط إنها خلصت.
backendنعمالملفات اللي تغيّرت وشو شغّل للتأكد.
frontendنعمالملفات اللي تغيّرت وكيف تشوف التغيير.
databaseنعم، ملفات migrationالملفات، أمر التطبيق، وخطة الرجوع. التعليمات بتمنعه يشغّلها.
devopsنعمالتعديلات وشو لازم تعمله إنت بإيدك. التعليمات بتمنعه ينشر.
qaنعم، ملفات الـ testsشو نجح وشو فشل وكيف تعيد الفشل.
securityلاالثغرات مرتبة حسب الخطورة مع الحل.
code-reviewerلاثلاث مجموعات: لازم يتصلّح، الأحسن يتصلّح، ملاحظات صغيرة.
ui-uxلاكل مشكلة: وين، شو بيحس المستخدم، وأصغر حل.
فرق مهم بين المنع الحقيقي والتعليمات: سطر tools منع حقيقي: اللي ما عنده Edit وWrite ما بيقدر يستخدمهم. بس Bash بيشغّل أي أمر، حتى أمر بيغيّر ملفات، وجمل زي «ما تنشر» و«عدّل ملفات الـ tests بس» تعليمات مش قفل. بدك مراجع قراءة فقط فعلاً؟ شيل Bash من سطره، وخلّي أذونات الأوامر عليك.
من ملفات لفريق

ثلاث طرق تناديهم، وبرومبت واحد بيشغّلهم بالترتيب.

5

كيف تنادي كل واحد

  1. بالحكي العادي: اذكر اسمه بالطلب.
    Use the code-reviewer subagent to review my last changes
  2. بالإشارة: اذكره بعلامة @ بهالشكل، أو اكتب @agent-code-reviewer:
    @"code-reviewer (agent)" look at the auth changes
  3. لحاله: Claude بيقرأ الـ description وبيحوّل الشغل للموظف المناسب بدون ما تطلب. عشان هيك وصف code-reviewer فيه Use proactively after code changes. هاي عادة بأمثلة الدليل الرسمي بتشجّع التحويل، مش ضمانة.

بتقدر تكتب الطلب بالعربي كمان: «خلّي الـ qa يكتب tests لصفحة الدفع». المهم اسم الموظف يكون واضح.

6

برومبت اجتماع الصبح

هاد البرومبت بتكتبه بمحادثتك العادية مع Claude Code. محادثتك هي «مدير الاجتماع»: بتنادي كل موظف، بتجمع تقاريرهم، وبترجّعلك ملخص واحد.

اعمل «اجتماع الصبح» على هالمشروع، بهالترتيب: 1. شغّل tech-lead يقرأ آخر التغييرات والمهام المفتوحة، ويرجّع خطة اليوم: ثلاث مهام بالكثير، ولكل مهمة مين صاحبها من الفريق وشو الشرط اللي بيثبت إنها خلصت. 2. اعرض عليّ الخطة واستنى موافقتي قبل أي تعديل. 3. بعد موافقتي وزّع المهام على backend وfrontend وdatabase. المهام اللي ما إلها علاقة ببعض شغّلها بالتوازي، والباقي بالترتيب. 4. لما يخلصوا: شغّل qa يكتب tests للتغييرات ويشغّلها، وبعدها code-reviewer وsecurity يراجعوا التغييرات، كل واحد لحاله. 5. بالآخر أعطيني تقرير واحد قصير: شو خلص، شو طلع بالمراجعة ولازم يتصلّح، وشو القرارات اللي بتضل عليّ. ما تعمل commit ولا push ولا نشر.
  • الخطوة 2 أهم خطوة: الخطة بتطلع بثواني، وتصليح خطة غلط أرخص بكثير من تصليح كود غلط.
  • التوازي إله شرط: موظفين بيعدّلوا نفس الملف بنفس الوقت بيخرّبوا على بعض. وزّع بالتوازي بس المهام اللي ملفاتها مختلفة (أو شوف isolation بالقسم 8).
  • وإنت شغّال: Ctrl + B بينقل الموظف اللي شغّال للخلفية وبترجعلك المحادثة.
7

خلّي الـ Tech Lead يدير الجلسة

بدل ما محادثتك العادية تدير الاجتماع، بتقدر تفتح الجلسة كلها بشخصية الـ Tech Lead: تعليماته وأدواته بيصيروا تعليمات الجلسة الرئيسية.

claude --agent tech-lead

بهالوضع بدك تعطيه أداة تشغيل الموظفين، وبتقدر تحدد مين مسموح يشغّل. بدّل سطر tools بملف tech-lead.md بهاد:

tools: Agent(backend, frontend, database, devops, qa, security, code-reviewer, ui-ux), Read, Grep, Glob, Bash
  • القائمة بين القوسين بتشتغل بس لما الملف يدير الجلسة بأمر --agent. إذا نفس الملف اشتغل كـ subagent عادي، القائمة بين القوسين بتنهمل.
  • بدك ياه الافتراضي للمشروع؟ ضيف "agent": "tech-lead" بملف .claude/settings.json، وكل جلسة بهالمشروع بتفتح عليه. والأمر --agent بيغلب الإعداد.
8

إضافات اختيارية للملف

أسطر بتضيفها فوق مع name وtools لما تحتاجها:

السطرشو بيعمللمين بينفع
model: haikuبيشغّل هالموظف على موديل أصغر وأرخص من موديل محادثتك.للمهام البسيطة والمتكررة.
isolation: worktreeالموظف بيشتغل بنسخة مؤقتة من المشروع (git worktree)، وبتنمسح لحالها إذا ما غيّر إشي.backend وfrontend لما يشتغلوا بنفس الوقت.
memory: projectمجلد ذاكرة بيضل بين الجلسات: .claude/agent-memory/<name>/code-reviewer ليتذكر ملاحظاته المتكررة على مشروعك.
background: trueبيشتغل بالخلفية دايماً وإنت بتكمّل شغلك.qa وsecurity.
maxTurns: 30حد أعلى لعدد الخطوات قبل ما يوقف ويرجّع اللي معه.أي موظف خايف يطوّل.
الصراحة أحسن

فريق مفيد، مش فريق بيشتغل لحاله.

9

الحدود بصراحة

  • ما في اجتماع فعلي: الموظف بيشتغل لما تناديه، وبيرجّع نتيجته لمحادثتك وبيخلص. الموظفين ما بيحكوا مع بعض.
  • ما بيشوف محادثتك: كل واحد بيبلّش بسياق جديد. المهمة لازم تنبعتله كاملة: شو المطلوب، وين، وشو شرط النجاح.
  • ما بيقدر يسألك: أداة الأسئلة مشيولة من الـ subagents. إذا المهمة ناقصة بيخمّن أو بيرجع بتقرير. بس طلبات الإذن (تشغيل أمر، تعديل ملف) بتوصلك عادي.
  • الاستهلاك بيزيد: كل موظف بيقرأ ملفات المشروع اللي بيحتاجها من أول وجديد بسياقه. تسعة مع بعض بيقرأوا أكثر بكثير من محادثة وحدة. شغّل اللي بتحتاجه بس.
  • في سقف: لحد 20 موظف بنفس الوقت، والموظف بيقدر يشغّل موظفين تحته لحد ثلاث طبقات.
  • المراجعة مش ختم: code-reviewer وsecurity بيلقطوا كثير وبيفوّتوا كمان. القرار الأخير والمسؤولية إلك.
بدك فريق بيحكي مع بعض فعلاً؟ هاي ميزة ثانية اسمها Agent Teams: كذا جلسة Claude Code كزملاء مع قائد. لسا تجريبية ومطفية افتراضياً، وبتتفعّل بمتغيّر البيئة CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1، وبتصرف توكنز أكثر بشكل واضح. وانتبه: لما تفعّلها، الموظف اللي Claude بيسمّيه بيشتغل كزميل بالفريق مش كـ subagent عادي.
10

أخطاء شائعة

  • تشغّل التسعة على مهمة صغيرة: تعديل سطرين ما بده فريق. الفريق للمهام اللي فيها أكثر من جزء.
  • وصف غامض: description: helps with code ما بيخلّي Claude يعرف متى يناديه. اكتب متى يُستخدم: Use for… أو Use after…
  • مهمة بسطر واحد: «صلّح الدفع» لموظف ما شاف محادثتك. اكتبله الملف، المشكلة، وشرط النجاح.
  • توازي على نفس الملفات: التعديلات بتخبط ببعض.
  • تعطي كل الموظفين كل الأدوات: المراجع اللي بيقدر يعدّل بيصير يصلّح بدل ما يراجع.
  • تسلّم database أو devops بيئة الإنتاج: خلّيهم يجهّزوا الملف والأمر، وإنت بتشغّل.
  • توافق على الخطة بدون ما تقرأها: كل اللي بعدها مبني عليها.
?

أسئلة شائعة

لازم أركّب التسعة كلهم؟
لا. نصيحتي تبلّش بثلاثة: tech-lead للخطة، qa للـ tests، وcode-reviewer للمراجعة. ضيف الباقي لما تحس إنك محتاجه.
الملفات بتشتغل مع أي مشروع؟
إيه، مكتوبة عامة. بس بتصير أحسن بكثير لما تضيف لكل ملف سطرين عن مشروعك: اللغة، الـ framework، وأمر الـ tests.
بقدر أكتب التعليمات بالعربي؟
إيه. أنا كتبتهم بالإنجليزي لأن أسماء الملفات والأدوات والأوامر كلها إنجليزي. خلّي name بالإنجليزي عشان تناديه بسهولة.
شو الفرق عن دليل «صار خمسة»؟
هداك الدليل بيشرح الـ subagents من الأول مع أربع ملفات مقسومة حسب المهمة. هاد الدليل فريق كامل مقسوم حسب الدور الوظيفي، مع برومبت الاجتماع. وإذا بدك مئات الأدوار الجاهزة شوف وكالة كاملة بصفر دولار.
بدي موظف للتوثيق زي اللي بالريل؟
انسخ ملف qa.md، سمّيه docs، وغيّر التعليمات: يقرأ التغييرات ويحدّث ملف README والتوثيق بس، وما يلمس الكود.
ما عندي Claude Code لسا؟
ثبّته من دليل التثبيت، وبعدها ارجع لهون. وإذا بدك تفهم أنواع الـ agents كلها شوف الأنواع السبعة.
✓ تم النسخ

الدليل الجاي يوصلك أول واحد

اترك إيميلك وبتوصلك الأدلة الجديدة أول بأول، بدون إزعاج.

إيميلك بيضل عندي، وبتقدر تطلب حذفه بأي وقت.