الـ skills هي قدرات قابلة لإعادة الاستخدام، Claude بيكتشفها ويستعملها تلقائيًا بناءً على السياق. مش مجرد أوامر بسيطة — الـ skills بتدعم progressive loading عشان تفضل خفيفة، وحقن dynamic context من الـ shell، وعزل التنفيذ عبر subagents، والتحكم في طريقة الاستدعاء. في الموديول ده، هنتعلم إزاي تصمّم وتبني skills فعّالة.
إزاي الـ Skills بتتحمّل
Claude بيحمّل الـ skills بطريقة خفيفة. الـ descriptions بتتحمّل عشان Claude يبقى عارف إيه الإمكانيات المتاحة. محتوى SKILL.md الكامل مبيتحمّلش غير لما الـ skill تتفعّل فعلًا، والملفات المساعدة مبتتقراش غير لما يحتاجها.
يعني تقدر تثبّت skills كتير من غير ما تزحم الـ context window. Claude بيعرف إنها موجودة من الـ descriptions، وبعدين يحمّل التعليمات الفعلية بس للـ skills اللي قرر يستعملها.
الـ skills بتتخزن في .claude/skills/<name>/SKILL.md لنطاق المشروع (بتتعمل لها commit في git) أو ~/.claude/skills/<name>/SKILL.md للنطاق الشخصي. الـ plugin skills بتستخدم namespace بالشكل plugin-name:skill-name عشان ما تتعارضش مع الـ skills التانية. لو فيه skills بنفس الاسم مش plugins، ترتيب الأولوية بيكون: enterprise > personal > project.
كمان، Claude بيكتشف الـ skills تلقائيًا من مجلدات .claude/skills/ المتداخلة في subdirectories جوة الـ project root. مثلًا، لو بتشتغل جوه packages/frontend/، Claude هيلاقي كمان الـ skills اللي موجودة في packages/frontend/.claude/skills/. ده بيخلّي الـ skills تتوزّع جنب الـ packages أو الـ services في الـ monorepo setups.
.claude/skills/code-review/
├── SKILL.md # Instructions (required)
├── templates/
│ └── review-checklist.md
└── scripts/
└── analyze-metrics.py
كتابة Descriptions فعّالة
الـ description هو أهم جزء في الـ skill. هو اللي بيتحكم إمتى Claude يفعّل الـ skill تلقائيًا، ولازم يكون فيه إشارات كافية عشان Claude يقدر يربطها بطلبات المستخدم الحقيقية. description غامض زي “helps with code” مش هيشتغل أبدًا. لكن description محدد فيه trigger terms واضحة — ده اللي بيفرق:
---
name: security-review
description: Scan code for security vulnerabilities including injection flaws, authentication issues, and data exposure. Use when reviewing code changes, preparing a PR, or when the user mentions security, vulnerabilities, or audit.
---
حط نوع المهمة (“scan”، “generate”، “analyze”)، والمجال (“security”، “API”، “database”)، وعبارات trigger صريحة (“when the user mentions”، “use when”). خلّي الـ descriptions تحت 250 حرف (الحد الأقصى لكل description اعتبارًا من v2.1.86). Claude بيخصص حوالي 1% من الـ context window لمجموع الـ skill descriptions، مع fallback بحد أقصى 8,000 حرف عند الحاجة — شغّل /context عشان تتأكد إن الـ skills مش بتتحذف.
الملفات المساعدة بتوسّع الـ skill من غير ما تنفخ الـ Level 2 context. اعمل لها reference من SKILL.md بمسارات نسبية:
For the full review checklist, see [templates/review-checklist.md](templates/review-checklist.md).
Claude بيقرأ الملفات المساعدة عبر bash لما يحتاجها. خلّي SKILL.md تحت 500 سطر، وحط المراجع التفصيلية في ملفات منفصلة.
الـ Dynamic Context والتحكم في الاستدعاء
صيغة !command` بتنفّذ أوامر shell قبل ما محتوى الـ skill يوصل لـ Claude. الناتج بيتحقن مباشرة — Claude بيشوف النتيجة بس، مش الأمر. بالطريقة دي بتدي الـ skills سياق حي:
---
name: pr-summary
description: Summarize pull request changes. Use when asked to review or summarize a PR.
context: fork
agent: Explore
---
## PR context
- Diff: !`gh pr diff`
- Comments: !`gh pr view --comments`
- Changed files: !`gh pr diff --name-only`
Summarize the intent and key changes in this pull request.
حقل shell بيحدد الـ shell اللي هيتستخدم في كتل !command. حطه powershellبدل الـbash الافتراضي لما تشتغل على Windows والـ PowerShell tool مفعل (CLAUDE_CODE_USE_POWERSHELL_TOOL=1`):
---
name: windows-helper
description: Manage Windows services and configurations
shell: powershell
---
فيه خاصيتين في الـ frontmatter بيتحكموا في مين يقدر يفعّل الـ skill. disable-model-invocation: true معناها إن المستخدم بس يقدر يفعّلها عبر /skill-name — Claude مش هيشغّلها تلقائيًا أبدًا. استعمل ده لأي skill ليها side effects (زي deploy أو push أو إرسال رسائل). user-invocable: false بتخفي الـ skill من قائمة / بس تسيب Claude يشغّلها تلقائيًا — مفيدة للـ skills اللي بتشتغل كمعرفة خلفية مش كأوامر.
paths: بتاخد قائمة YAML من الـ globs اللي بتحدد إمتى الـ skill تنطبق. لما تحطها، الـ skill مبتتحمّلش غير لما الـ working directory يطابق واحد من الـ globs. ده بيمنع الـ skills الخاصة بمشروع معين من التداخل مع sessions تانية:
---
name: api-generator
description: Generate REST API endpoints from schema definitions.
paths: ["src/**/*.ts", "tests/**"]
---
effort بيتحكم في عمق التحليل. القيم المتاحة: low للبحث السريع أو توليد boilerplate، وmedium لأغلب المهام، وhigh للتحليل العميق اللي محتاج تفكير دقيق:
---
name: security-review
description: Scan code for security vulnerabilities.
effort: high
---
context: fork بيشغّل الـ skill في subagent معزول بـ context window خاص بيه. الـ agent field بيحدد نوع الـ agent: Explore للبحث القراءة فقط، Plan للتخطيط، general-purpose لأي حاجة محتاجة كل الأدوات. المحادثة الأساسية بتفضل نضيفة والـ subagent هو اللي بيشيل الحمل التقيل.
حقل model بيحدد الـ model اللي هيتستخدم لما الـ skill تتفعّل. ده مفيد لما المهمة بتستفيد من نقاط قوة model معين (مثلاً، opus للاستدلال المعقد، sonnet للتنفيذ السريع):
---
name: deep-analysis
description: Thoroughly analyze the codebase for a specific pattern or issue
context: fork
agent: Explore
model: opus
disable-model-invocation: true
---
Analyze $ARGUMENTS across the entire codebase:
1. Use Glob and Grep to find all occurrences
2. Read each file and understand context
3. Summarize patterns, inconsistencies, and recommendations
الـ Arguments والوصول للأدوات
الـ skills بتقبل arguments بطريقتين. $ARGUMENTS بيمسك كل حاجة بعد اسم الأمر كـ string واحد. $0، $1، $2 بيمسكوا الـ arguments الفردية المفصولة بمسافات. الاتنين بيتبدلوا قبل ما الـ prompt يوصل لـ Claude. argument-hint بيحسّن الـ autocomplete في قائمة الـ slash عن طريق عرض الـ arguments المتوقعة:
---
name: review-pr
description: Review a GitHub PR by number
argument-hint: "<pr-number> <priority>"
allowed-tools: Bash(gh *), Read, Grep, Glob
---
Review PR #$0 with priority $1. Focus on security and performance.
Reference our standards in [standards/code-review.md](standards/code-review.md).
الاستخدام: /review-pr 456 high — $0 بتبقى 456، و$1 بتبقى high.
allowed-tools بيقيّد الأدوات اللي الـ skill تقدر تستعملها وقت التشغيل، بنفس صيغة الـ patterns بتاعت صلاحيات الأدوات. ده مفيد للـ skills اللي المفروض تقرأ بس أو تتعامل مع أدوات CLI معينة.
ملفات الأوامر القديمة في .claude/commands/*.md لسه شغّالة بس الـ skills هي الصيغة المنصوح بيها. لو الاتنين موجودين بنفس الاسم، الـ skill بتاخد الأولوية.