writing-skills
ما الذي تفعله
يشرح كيفية إنشاء مهارة لوكيل ذكاء اصطناعي أو تعديلها، والتأكد من أنها تعمل قبل الاعتماد عليها. وهي موجهة لمن يبنون مهارات الوكلاء أو يحسّنونها.
متى تستخدمها
- ✓عندما تريد إنشاء مهارة جديدة لوكيلك من الصفر.
- ✓عندما تحتاج إلى تعديل مهارة موجودة والتأكد من أنها ما زالت تعمل.
- ✓عندما تريد التحقق من أن المهارة تعمل قبل نشرها.
رابط المهارة
https://github.com/obra/superpowers/blob/main/skills/writing-skills/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“أريد كتابة مهارة جديدة لمساعدي الذكي، وأريد أن أتحقق من أنها تعمل فعلًا.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
تتعامل المهارة مع كل مهارة كاختبار. يرى الوكيل أولًا المهمة تفشل دون المهارة، ثم تُكتب المهارة، ثم يتأكد أن الوكيل يتبعها.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Writing Skills
Overview
Writing skills IS Test-Driven Development applied to process documentation.
Personal skills live in your runtime's skills directory (~/.claude/skills/ on Claude Code) — see codex-tools.md or gemini-tools.md for the path on those runtimes. Codex, Copilot CLI, and Gemini CLI all also recognize ~/.agents/skills/ as a cross-runtime alias.
You write test cases (pressure scenarios with subagents), watch them fail (baseline behavior), write the skill (documentation), watch tests pass (agents comply), and refactor (close loopholes).
Core principle: If you didn't watch an agent fail without the skill, you don't know if the skill teaches the right thing.
REQUIRED BACKGROUND: You MUST understand superpowers:test-driven-development before using this skill. That skill defines the fundamental RED-GREEN-REFACTOR cycle. This skill adapts TDD to documentation.
Official guidance: For Anthropic's official skill authoring best practices, see references/anthropic-best-practices.md. This document provides additional patterns and guidelines that complement the TDD-focused approach in this skill.
What is a Skill?
A skill is a reference guide for proven techniques, patterns, or tools. Skills help future agents find and apply effective approaches.
Skills are: Reusable techniques, patterns, tools, reference guides
Skills are NOT: Narratives about how you solved a problem once
TDD Mapping for Skills
| TDD Concept | Skill Creation |
|---|---|
| Test case | Pressure scenario with subagent |
| Production code | Skill document (SKILL.md) |
| Test fails (RED) | Agent violates rule without skill (baseline) |
| Test passes (GREEN) | Agent complies with skill present |
| Refactor | Close loopholes while maintaining compliance |
| Write test first | Run baseline scenario BEFORE writing skill |
| Watch it fail | Document exact rationalizations agent uses |
| Minimal code | Write skill addressing those specific violations |
| Watch it pass | Verify agent now complies |
| Refactor cycle | Find new rationalizations → plug → re-verify |
The entire skill creation process follows RED-GREEN-REFACTOR.
When to Create a Skill
Create when:
- Technique wasn't intuitively obvious to you
- You'd reference this again across projects
- Pattern applies broadly (not project-specific)
- Others would benefit
Don't create for:
- One-off solutions
- Standard practices well-documented elsewhere
- Project-specific conventions (put in your instructions file)
- Mechanical constraints (if it's enforceable with regex/validation, automate it—save documentation for judgment calls)
Skill Types
Technique
Concrete method with steps to follow (condition-based-waiting, root-cause-tracing)
Pattern
Way of thinking about problems (flatten-with-flags, test-invariants)
Reference
API docs, syntax guides, tool documentation (office docs)
Directory Structure
skills/
skill-name/
SKILL.md # Main reference (required)
supporting-file.* # Only if needed
Flat namespace - all skills in one searchable namespace
Separate files for:
- Heavy reference (100+ lines) - API docs, comprehensive syntax
- Reusable tools - Scripts, utilities, templates
Keep inline:
- Principles and concepts
- Code patterns (< 50 lines)
- Everything else
Writing SKILL.md
A skill's description says only when to use it: triggering conditions and
symptoms, starting with "Use when...". It never summarizes the skill's
workflow, because an agent that reads a workflow summary follows it instead
of reading the skill.
When you write or change a skill's frontmatter, name or description, or need to cut its size, read references/discovery.md: the SKILL.md template, description and keyword guidance, naming, token budgets, and cross-referencing other skills.
Flowcharts
When you add or change a flowchart in a skill, read references/flowcharts.md first: when a flowchart earns its place, the graphviz conventions, and how to render one.
Code Examples
One excellent example beats many mediocre ones
Choose most relevant language:
- Testing techniques → TypeScript/JavaScript
- System debugging → Shell/Python
- Data processing → Python
الأسئلة الشائعة
هل أحتاج إلى معرفة البرمجة لاستخدام هذه المهارة؟
ليس بالضرورة. المهارات تعليمات نصية عادية، لذلك كُتبت لمن يستطيعون كتابة خطوات واضحة.
هل تشرح المهارة كيف أختبر مهارة؟
نعم. تطلب منك تشغيل الوكيل مع المهارة وبدونها، ومقارنة النتائج قبل الانتهاء.
أين تُحفظ المهارة الشخصية؟
تنص المهارة على أن المهارات الشخصية تُحفظ في مجلد المهارات الخاص بالبيئة، مثل مجلد المهارات ضمن إعدادات Claude Code.
التفاصيل
الوصف الأصلي من المؤلف
Use when creating new skills, editing existing skills, or verifying skills work before deployment
repo: obra/superpowers
الشعبية
- نجوم GitHub
- 311k
- الترتيب
- #99
- الترخيص
- MIT
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
brainstorming
311kيساعد وكيلك على معرفة ما تريده فعلًا قبل بناء أي شيء جديد، عبر أسئلة مركّزة وعرض خيارات واضحة.
executing-plans
311kيساعد وكيلك على تنفيذ خطة تنفيذ مكتوبة خطوة بخطوة داخل الجلسة الحالية، مع اختبار كل خطوة قبل الانتقال إلى التالية.
finishing-a-development-branch
311kيساعد وكيلك على إنهاء شيفرة مكتملة بتشغيل الاختبارات، ثم عرض خيارات واضحة للدمج أو فتح طلب سحب أو الإبقاء على الفرع.
receiving-code-review
311kيساعد وكيلك على تقييم ملاحظات مراجعة الشيفرة بعناية، والتحقق من كل نقطة مقابل الشيفرة قبل تغيير أي شيء.
مهارات مشابهة
writing-for-agents
310kيشرح كيفية كتابة تعليمات واضحة لوكلاء الذكاء الاصطناعي، بما في ذلك ملفات المهارات وAGENTS.md وCLAUDE.md، ليتصرف الوكيل بشكل متوقع.
bengali-nlp
280kيعالج وكيلك النصوص البنغالية، فيفهمها ويتعامل معها، ويعيد تنسيقها ويعالج خصائصها اللغوية الخاصة.
prompt-caching-strategy
280kيساعد وكيلك على تحسين الأوامر الموجهة لنماذج اللغة. يحلل بنيتها لتقليل التكاليف وتسريع الردود بإعادة استخدام المعلومات.