incremental-implementation
ما الذي تفعله
تساعد هذه المهارة على تقسيم مهام البرمجة الكبيرة إلى خطوات صغيرة يسهل التعامل معها. تضمن اختبار كل خطوة والتحقق من عملها قبل الانتقال إلى التالية، مما يجعل التطوير أكثر أمانًا وتنظيمًا.
متى تستخدمها
- ✓عند تنفيذ ميزة جديدة تؤثر في عدة أجزاء من الكود.
- ✓عندما تبدو المهمة كبيرة جدًا لإنجازها دفعة واحدة.
- ✓عند إعادة هيكلة الكود الموجود (تحسينه).
رابط المهارة
https://github.com/addyosmani/agent-skills/blob/main/skills/incremental-implementation/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“قسّم تنفيذ ميزة تسجيل الدخول إلى خطوات صغيرة. أولًا أنشئ شاشة تسجيل الدخول. ثم أضف التحقق من البريد الإلكتروني وكلمة المرور. وأخيرًا اربطها بنظام المصادقة.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
الفكرة أن تنجز قطعة صغيرة في كل مرة: تكتب قدرًا قليلًا من الكود، وتختبر إن كان يعمل، وتتحقق من صحته، وتحفظ تقدمك. تكرر ذلك لكل قطعة صغيرة حتى تكتمل المهمة.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Incremental Implementation
Overview
Build in thin vertical slices — implement one piece, test it, verify it, then expand. Avoid implementing an entire feature in one pass. Each increment should leave the system in a working, testable state. This is the execution discipline that makes large features manageable.
When to Use
- Implementing any multi-file change
- Building a new feature from a task breakdown
- Refactoring existing code
- Any time you're tempted to write more than ~100 lines before testing
When NOT to use: Single-file, single-function changes where the scope is already minimal.
The Increment Cycle
┌──────────────────────────────────────┐
│ │
│ Implement ──→ Test ──→ Verify ──┐ │
│ ▲ │ │
│ └───── Commit ◄─────────────┘ │
│ │ │
│ ▼ │
│ Next slice │
│ │
└──────────────────────────────────────┘
For each slice:
- Implement the smallest complete piece of functionality
- Test — run the test suite (or write a test if none exists)
- Verify — confirm the slice works as expected (tests pass, build succeeds, manual check)
- Commit -- save your progress with a descriptive message (see
git-workflow-and-versioningfor atomic commit guidance) - Move to the next slice — carry forward, don't restart
Slicing Strategies
Vertical Slices (Preferred)
Build one complete path through the stack:
Slice 1: Create a task (DB + API + basic UI)
→ Tests pass, user can create a task via the UI
Slice 2: List tasks (query + API + UI)
→ Tests pass, user can see their tasks
Slice 3: Edit a task (update + API + UI)
→ Tests pass, user can modify tasks
Slice 4: Delete a task (delete + API + UI + confirmation)
→ Tests pass, full CRUD complete
Each slice delivers working end-to-end functionality.
Contract-First Slicing
When backend and frontend need to develop in parallel:
Slice 0: Define the API contract (types, interfaces, OpenAPI spec)
Slice 1a: Implement backend against the contract + API tests
Slice 1b: Implement frontend against mock data matching the contract
Slice 2: Integrate and test end-to-end
Risk-First Slicing
Tackle the riskiest or most uncertain piece first:
Slice 1: Prove the WebSocket connection works (highest risk)
Slice 2: Build real-time task updates on the proven connection
Slice 3: Add offline support and reconnection
If Slice 1 fails, you discover it before investing in Slices 2 and 3.
Implementation Rules
Rule 0: Simplicity First
Before writing any code, ask: "What is the simplest thing that could work?"
After writing code, review it against these checks:
- Can this be done in fewer lines?
- Are these abstractions earning their complexity?
- Would a staff engineer look at this and say "why didn't you just..."?
- Am I building for hypothetical future requirements, or the current task?
SIMPLICITY CHECK:
✗ Generic EventBus with middleware pipeline for one notification
✓ Simple function call
✗ Abstract factory pattern for two similar components
✓ Two straightforward components with shared utilities
✗ Config-driven form builder for three forms
✓ Three form components
Three similar lines of code is better than a premature abstraction. Implement the naive, obviously-correct version first. Optimize only after correctness is proven with tests.
Rule 0.5: Scope Discipline
Touch only what the task requires.
Do NOT:
- "Clean up" code adjacent to your change
- Refactor imports in files you're not modifying
- Remove comments you don't fully understand
- Add features not in the spec because they "seem useful"
- Modernize syntax in files you're only reading
If you notice something worth improving outside your task scope, note it — don't fix it:
NOTICED BUT NOT TOUCHING:
- src/utils/format.ts has an unused import (unrelated to this task)
- The auth middleware could use better error messages (separate task)
→ Want me to create tasks for these?
Rule 1: One Thing at a Time
Each increment changes one logical thing. Don't mix concerns:
Bad: One commit that adds a new component, refactors an existing one, and updates the build config.
Good: Three separate commits — one for each change.
Rule 2: Keep It Compilable
…
الأسئلة الشائعة
لماذا أقسّمها إلى خطوات صغيرة؟
لأنه يجعل المهام الكبيرة أقل إرهابًا، ويتيح اكتشاف الأخطاء مبكرًا، ويسهّل التراجع عن التغييرات إذا حدث خطأ.
ماذا يعني « قابل للتحقق »؟
يعني أنه بعد كل خطوة يمكنك التأكد من أن الكود يعمل كما هو متوقع، عادةً عبر تشغيل الاختبارات أو التحقق يدويًا.
هل يمكنني تحسين الكود أثناء تقسيم المهمة؟
الأفضل أن تركز فقط على ما تتطلبه المهمة. وإذا لاحظت شيئًا يحتاج إلى تحسين خارج النطاق، فدوّنه لتعالجه لاحقًا في مهمة أخرى.
التفاصيل
الوصف الأصلي من المؤلف
Delivers changes incrementally in thin, verifiable slices. Use when implementing any feature or change that touches more than one file, or when picking up the next task from a plan. Use when rolling a change out behind a feature flag, when you're about to write a large amount of code at once, or when a task feels too big to land in one step.
repo: addyosmani/agent-skills
الشعبية
- نجوم GitHub
- 107k
- الترتيب
- #775
- الترخيص
- MIT
- آخر تحديث
- 13/10/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
api-and-interface-design
107kيساعد على إنشاء واجهات برمجية (APIs) وواجهات محددة بوضوح. مفيد عند تصميم طريقة تواصل أجزاء البرنامج المختلفة.
browser-testing-with-devtools
107kيساعد وكيلك على اختبار الكود مباشرة في متصفحات حقيقية. مفيد للتحقق من عمل الشيء في البيئة التي سيُستخدم فيها، واكتشاف الأخطاء ومشكلات الأداء.
ci-cd-and-automation
107kيعلّم وكيلك أتمتة المهام المتكررة، وشحن المشاريع، وإدارة البنية التحتية.
code-review-and-quality
107kتجري مراجعات مفصلة للكود من عدة جوانب. مفيد قبل دمج التغييرات الجديدة لضمان الجودة ومنع المشكلات المستقبلية.
مهارات مشابهة
diffs
394kيتيح لوكيلك إنتاج فرق تعديلات حقيقي يمكن مشاركته، كرابط عرض أو ملف صورة، بدلاً من ملخص مكتوب يدوياً.
coding-agent
394kيساعد وكيلك على تسليم مهمة برمجة كبيرة إلى Codex أو Claude Code أو OpenCode كعامل في الخلفية، ثم متابعة تقدمها.
gh-issues
394kيساعد وكيلك على إيجاد مشكلات GitHub واختيار ما ستعمل عليه، وفتح طلبات سحب بالإصلاحات، ومتابعة تعليقات المراجعة.