Subagents are specialized AI assistants defined as Markdown files with YAML frontmatter. Each subagent runs in its own context window with a custom system prompt, specific tool access, and independent permissions. When a task matches a subagent's description, the parent conversation delegates to it automatically, preserving main context while enforcing constraints.
When to use: Isolating high-volume operations (tests, logs), enforcing read-only access for reviewers, routing simple tasks to cheaper models, running parallel research, creating reusable team workflows.
When NOT to use: Tasks requiring frequent back-and-forth, quick targeted changes, workflows needing nested delegation (subagents cannot spawn subagents), latency-sensitive operations where fresh context gathering is costly.
يقوم بإنشاء وكلاء فرعيين مخصصين لـ Claude Code مع تكوين المادة الأمامية YAML في ملفات Markdown. يغطي نطاق الوكيل (المشروع، المستخدم، واجهة سطر الأوامر، البرنامج المساعد)، التحكم في الوصول إلى الأداة، اختيار النموذج، أوضاع الأذونات، التحميل المسبق للمهارات، وخطافات دورة الحياة. يُستخدم عند إنشاء وكلاء فرعيين متخصصين، أو تكوين الوصول إلى الأدوات، أو تحديد النماذج، أو تعيين أوضاع الأذونات، أو تصميم أنماط التفويض. يستخدم لإنشاء الوكيل، وتكوين الوكيل الفرعي، وإعداد الوكيل المخصص. المصدر: oakoss/agent-skills.