hyphens
ما الذي تفعله
تتحقق هذه المهارة من عناوين الويب في الموقع، وتقترح الشرطات الوسطى بدلًا من الشرطات السفلية أو المسافات. وهي موجهة لأصحاب المواقع الذين يريدون روابط أوضح للبحث.
متى تستخدمها
- ✓عندما تستخدم عناوين صفحاتك الشرطات السفلية للفصل بين الكلمات.
- ✓عندما تخطط لبنية روابط جديدة أو لصيغة معرّف نصي (slug) جديدة.
- ✓عندما تنقل صفحات من روابط بشرطات سفلية إلى روابط بشرطات وسطى.
رابط المهارة
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/hyphens/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“هل يمكنك فحص عناوين صفحاتي وتغيير الشرطات السفلية إلى شرطات وسطى؟”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يفحص الوكيل مسارات الروابط بحثًا عن الشرطات السفلية والمسافات المشفّرة والفواصل المختلطة. ويقترح نسخًا بشرطات وسطى، وعمليات إعادة التوجيه بـ 301 اللازمة للإبقاء على الروابط القديمة تعمل.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Use hyphens in URLs
Google's search systems interpret hyphens in URLs as word boundaries, enabling it to match the URL against individual keyword queries. Underscores join words into a single token, meaning /seo_practices is seen as one word 'seopractices' rather than two separate words 'seo' and 'practices'.
Quick Reference
- Use hyphens (
-) to separate words in URLs — Google treats hyphens as word separators, underscores as part of the word /best-seo-practicesis better than/best_seo_practicesor/bestseopractices- Changing existing URLs from underscores to hyphens requires 301 redirects to preserve link equity
Check
Inspect the URL path segment of each page. Flag any URL that contains: (1) Underscores (_) as word separators (e.g., /best_practices). (2) Spaces encoded as %20 or + in path segments. (3) Mixed separators in the same URL (e.g., /best-practices_guide). Report the count of non-hyphenated URLs by category.
Fix
- Identify all pages with underscores or spaces in URL path segments.
- Generate the hyphenated equivalent: replace
_with-, spaces/%20with-. - Set up 301 permanent redirects from the old URLs to the new hyphenated URLs.
- Update internal links throughout the site to point to the new URLs.
- Submit the new URLs to Google Search Console for re-indexing.
- Update your sitemap.xml to include only the new hyphenated URLs.
- In your CMS or slug-generation function, enforce hyphens going forward:
- Slug: title.toLowerCase().replace(/\s+/g, '-').replace(/[^a-z0-9-]/g, '')
Explain
Google's John Mueller has confirmed that Google interprets hyphens as word separators in URLs, but treats underscores as word joiners. This means a URL with underscores matches fewer individual keyword queries. For example, /web_design would match 'web_design' as a single token, while /web-design matches both 'web design' and 'webdesign' queries.
Code Review
Parse all URL paths used in the application's router or CMS slug fields. Flag any path segment containing _ characters between words or any %20 space encoding. Verify slug-generation utilities produce lowercase hyphenated output. Check redirect rules to confirm old underscore URLs are permanently (301) redirected to their hyphenated equivalents.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
الأسئلة الشائعة
لماذا الشرطات الوسطى أفضل من الشرطات السفلية؟
تقول المهارة إن Google تعامل الشرطة الوسطى حدًا فاصلًا بين الكلمات، بينما تدمج الشرطة السفلية الكلمات في رمز واحد.
ماذا عن الروابط القديمة بعد التغيير؟
تقترح المهارة إعادة توجيه 301 من العناوين القديمة، مع تحديث الروابط الداخلية وخريطة الموقع.
هل يجب إرسال الروابط الجديدة؟
تقترح المهارة إرسال الروابط الجديدة إلى Google Search Console لإعادة الفهرسة.
التفاصيل
الوصف الأصلي من المؤلف
Use when auditing URL structures for word separator format, generating slugs from titles, or planning a URL migration from underscores or spaces to hyphens with appropriate redirects.
الشعبية
- نجوم GitHub
- 75k
- الترتيب
- #2880
- الترخيص
- MIT
- آخر تحديث
- 31/10/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
frontendchecklist
75kيفحص شيفرة الواجهة الأمامية والصفحات الحية مقابل أكثر من 380 قاعدة للوصول وسرعة الأداء وتحسين محركات البحث والأمان، بأداة سطر أوامر.
frontend-checklist-global
75kيدقق مشروع الواجهة الأمامية وفق كل قواعد Front-End Checklist البالغ عددها 386، ويقدم إصلاحًا محددًا لكل مشكلة وجدت.
404-page
75kيتأكد من أن صفحة الصفحات غير الموجودة تقدم روابط مفيدة وتُرجع رمز حالة 404 حقيقيًا، لمساعدة الزوار التائهين على إيجاد طريقهم.
about-page
75kيراجع ما إذا كان لموقعك صفحة «من نحن» واضحة تشرح من يديره، لبناء الثقة لدى الزوار ومحركات البحث.
مهارات مشابهة
competitive-platform-analysis
280kيساعدك على فهم منافسيك. يحدد الشركات المنافسة ويصنّفها ويصفيها قبل أي تحليل أعمق.
competitive-report-structure
280kينشئ تقارير شاملة عن المنافسين. يجمع المعلومات ليوضح الصورة العامة للسوق والتوصيات، ويساعد على توحيد رؤية الفريق.
lead-intelligence
280kيساعد وكيلك على إيجاد الأشخاص المهمين والتواصل معهم. يحلل العملاء المحتملين، ويقترح أساليب الوصول إليهم، ويدير التواصل عبر البريد ووسائل التواصل الاجتماعي.