omh-refactor-plan
ما الذي تفعله
تحوّل هذه المهارة إعادة هيكلة كود تم تقريرها إلى خطة مرحلية، مع فحوص وتراجع لكل مرحلة. وهي مخصصة للمطورين الذين ينظمون أجزاء كبيرة من قاعدة الكود.
متى تستخدمها
- ✓عندما تقرر تقسيم وحدة كبيرة وتحتاج إلى خطة آمنة.
- ✓عندما تمس إعادة الهيكلة ملفات كثيرة وتريد خطوات تستطيع التوقف عندها في أي وقت.
- ✓عندما تحتاج إلى قائمة بالملفات المتأثرة بالتغيير المخطط قبل تعديل أي شيء.
رابط المهارة
https://github.com/rlaope/oh-my-hermes/blob/main/agent-skills/omh-refactor-plan/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“قررنا فصل كود الفوترة عن وحدة الطلبات. خطط لإعادة الهيكلة على خطوات آمنة.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يرسم وكيلك الملفات المتأثرة، ويرتب العمل في مراحل، ويضيف خطوة اختبار وتراجع لكل مرحلة. ويتوقف للحصول على موافقتك قبل تعديل أي ملف.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Refactor Plan
This is an OMH refactor-plan workflow skill, projected for Agent Skills hosts (Claude Code, Codex, Cursor, opencode, OpenClaw, pi).
Why This Exists
refactor-plan exists because boundary-changing refactors bounced between goal planning and behavior-preserving cleanup with neither owning the execution shape: the phase order, the per-phase rollback, and the files table that make a large refactor reviewable and abortable.
Do Not Use When
- The refactor's direction is still contested or the goal itself needs consensus planning; use
ulw-plan. - The work is deletion-first cleanup with no boundary changes; use
omh-ai-slop-cleaner. - The plan is done and the claim is that work is complete; use
omh-verification-gatefor the evidence close. - The version bump carries a security advisory, a CVE, or a leaked secret; use
omh-security-event-response, which owns containment and closure.
Examples
Good example:
- Prompt: We decided to split the billing module out of orders - plan the refactor so each step is shippable.
- Expected behavior: Map affected files and consumers from the import graph, name hidden coupling and blast radius, order the five phases with per-phase verification and rollback, ship the files table, and stop at the approval gate.
- Why: The direction is decided and the need is a phased, abortable execution shape - exactly this workflow's territory.
Bad example:
- Prompt: Should we even split billing out of orders?
- Expected behavior: Route to
ralplan: the direction is not decided, so consensus planning comes before phase planning. - Why: A phase plan for a contested direction launders a decision through logistics.
Completion Checklist
- Reconnaissance names affected files, boundaries, coupling, and blast radius from observed evidence.
- Every phase carries its verification command and its rollback point, and ends at a shippable commit.
- The files table covers every touched file with action, phase, and dependencies.
- For an upgrade, every breaking change row names its call sites or an observed empty search, and every stage names its rollback.
- The plan stopped at the approval gate; no implementation began without the user's go.
Recovery Notes
- If the import graph is unavailable, build the codegraph first or reduce the plan's confidence and say which files are unverified.
- If a phase cannot be made independently green, split it further; two half-phases beat one unabortable one.
- If reconnaissance finds the direction itself is unsettled, route back to
ralplanbefore ordering phases. - If the module to deepen is chosen but its interface is not, shape it under contrasting constraints and recommend one design before phase 1; that is not a contested direction.
When to Use
Use when a refactor that crosses module boundaries is already decided and needs its execution shaped: which files move in which phase, what verifies each phase, and where each phase rolls back to - before anything is edited.
Strong routing signals: `refactor-plan`, `refactor plan`, `plan this refactor`, `plan the refactor`, `refactor planning`, `refactor phases`, `phased refactor`, `refactor in phases`, `refactor rollback plan`, `blast radius`, `module restructure plan`, `restructure plan`, `dependency upgrade`, `major version upgrade`, `framework upgrade`, `upgrade to the next major`, `breaking change upgrade`, `lockfile`, `리팩터링 계획`, `리팩토링 계획`, `리팩터링 단계`, `단계별 리팩터링`, `리팩터링 계획 세워줘`, `리팩터링 롤백 계획`, `спланируй рефакторинг`, `план рефакторинга`, `рефакторинг по фазам`, `поэтапный рефакторинг`, `рефакторинг по шагам`
Catalog Metadata
Category: planning
Phase: refactor-plan
Quality tier: plan-gated
Reasoning demand: standard
Quality bar:
- Reconnaissance first: affected files, ownership boundaries, hidden coupling, and blast radius are mapped before any phase is ordered; the full contract is
omh-refactor-plan/references/refactor-phases.md. - Order phases contracts-first: types and interfaces, then implementations, then callers in reviewable groups, then tests, then cleanup - and name what verifies each phase and where it rolls back to.
- Ship the files table with the plan: one row per file with action, phase, and blocks/blocked-by; a row without a phase is unplanned work.
- Size verification to the blast radius, not to optimism: a phase touching public surfaces or persisted shapes carries the full gate, not the fast one.
- For a dependency or framework upgrade, read
الأسئلة الشائعة
هل تعدّل هذه المهارة كودي؟
لا. تخطط العمل وتنتظر موافقتك قبل أي تعديل.
ماذا لو لم أكن قد قررت التغيير بعد؟
هذه المهارة مخصصة للتغييرات المقررة. للأسئلة المفتوحة، تناسب مهارة تخطيط أوسع.
ماذا لو كانت حزمة فيها ثغرة أمنية؟
هذا يحتاج إلى مهارة استجابة أمنية منفصلة، لا إلى خطة إعادة هيكلة.
التفاصيل
الوصف الأصلي من المؤلف
[omh] Decided cross-module refactor to phase: refactor planning - turn a decided boundary-changing refactor into a phased plan - reconnaissance, contracts-first phase order, per-phase verification and rollback, a files table, and an explicit approval gate before any edit. Use when the user says: refactor-plan, refactor plan, plan this refactor, plan the refactor, refactor planning, refactor phases, phased refactor, refactor in phases.
repo: rlaope/oh-my-hermes
الشعبية
- نجوم GitHub
- 5.1k
- الترتيب
- #15149
- الترخيص
- MIT
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
omh-accessibility-audit
5.1kيساعد وكيلك على فحص شاشة أو تدفق بحثا عن ثغرات إمكانية الوصول، مثل استخدام لوحة المفاتيح وتسميات قارئ الشاشة والتباين وحجم منطقة اللمس.
omh-adversarial-consensus
5.1kيساعد وكيلك على مهاجمة مقترح تقني من عدة زوايا مستقلة قبل أن تلتزم به، ثم يلخص ما يصمد أمام النقد.
omh-agent-debug
5.1kيساعد وكيلك على معرفة سبب تعثر وكيل ذكاء اصطناعي آخر أو دورانه في حلقة أو انحرافه عن المهمة، ويقترح أصغر طريقة آمنة للتعافي.
omh-agent-instructions
5.1kيساعد وكيلك على كتابة ملف التعليمات، مثل AGENTS.md أو CLAUDE.md، أو تحديثه. وهذا الملف يخبر أدوات الذكاء الاصطناعي كيف تعمل في المشروع.
مهارات مشابهة
diffs
394kيتيح لوكيلك إنتاج فرق تعديلات حقيقي يمكن مشاركته، كرابط عرض أو ملف صورة، بدلاً من ملخص مكتوب يدوياً.
coding-agent
394kيساعد وكيلك على تسليم مهمة برمجة كبيرة إلى Codex أو Claude Code أو OpenCode كعامل في الخلفية، ثم متابعة تقدمها.
gh-issues
394kيساعد وكيلك على إيجاد مشكلات GitHub واختيار ما ستعمل عليه، وفتح طلبات سحب بالإصلاحات، ومتابعة تعليقات المراجعة.