frontend-ui-engineering
ما الذي تفعله
تساعد هذه المهارة على بناء واجهات المستخدم (الشاشات والمكونات) للمواقع والتطبيقات، بحيث تبدو كأن مهندسين ذوي خبرة صنعوها. تضمن أن يكون كل شيء في متناول الجميع، وأن يعمل جيدًا على مختلف أحجام الشاشات، وأن يبدو مظهره احترافيًا.
متى تستخدمها
- ✓عند إنشاء شاشات أو أزرار جديدة.
- ✓عند تعديل مظهر صفحة موجودة.
- ✓عندما تحتاج إلى أن يعمل الموقع جيدًا على الهاتف وسطح المكتب.
رابط المهارة
https://github.com/addyosmani/agent-skills/blob/main/skills/frontend-ui-engineering/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“أنشئ زر « حفظ » لنموذج التسجيل، مع التأكد من أنه سهل النقر عليه في الهواتف المحمولة.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
تنظم المهارة الكود بطريقة منطقية، فتفصل المظهر عن المنطق. كما تستخدم أنماط تصميم معروفة وتتبع قواعد إمكانية الوصول لضمان الجودة.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Frontend UI Engineering
Overview
Build production-quality user interfaces that are accessible, performant, and visually polished. The goal is UI that looks like it was built by a design-aware engineer at a top company — not like it was generated by an AI. This means real design system adherence, proper accessibility, thoughtful interaction patterns, and no generic "AI aesthetic."
When to Use
- Building new UI components or pages
- Modifying existing user-facing interfaces
- Implementing responsive layouts
- Adding interactivity or state management
- Fixing visual or UX issues
Component Architecture
File Structure
Colocate everything related to a component:
src/components/
TaskList/
TaskList.tsx # Component implementation
TaskList.test.tsx # Tests
TaskList.stories.tsx # Storybook stories (if using)
use-task-list.ts # Custom hook (if complex state)
types.ts # Component-specific types (if needed)
Component Patterns
Prefer composition over configuration:
// Good: Composable
<Card>
<CardHeader>
<CardTitle>Tasks</CardTitle>
</CardHeader>
<CardBody>
<TaskList tasks={tasks} />
</CardBody>
</Card>
// Avoid: Over-configured
<Card
title="Tasks"
headerVariant="large"
bodyPadding="md"
content={<TaskList tasks={tasks} />}
/>
Keep components focused:
// Good: Does one thing
export function TaskItem({ task, onToggle, onDelete }: TaskItemProps) {
return (
<li className="flex items-center gap-3 p-3">
<Checkbox checked={task.done} onChange={() => onToggle(task.id)} />
<span className={task.done ? 'line-through text-muted' : ''}>{task.title}</span>
<Button variant="ghost" size="sm" onClick={() => onDelete(task.id)}>
<TrashIcon />
</Button>
</li>
);
}
Separate data fetching from presentation:
// Container: handles data
export function TaskListContainer() {
const { tasks, isLoading, error, refetch } = useTasks();
if (isLoading) return <TaskListSkeleton />;
if (error) return <ErrorState message="Failed to load tasks" retry={refetch} />;
if (tasks.length === 0) return <EmptyState message="No tasks yet" />;
return <TaskList tasks={tasks} />;
}
// Presentation: handles rendering
export function TaskList({ tasks }: { tasks: Task[] }) {
return (
<ul role="list" className="divide-y">
{tasks.map(task => <TaskItem key={task.id} task={task} />)}
</ul>
);
}
State Management
Choose the simplest approach that works:
Local state (useState) → Component-specific UI state
Lifted state → Shared between 2-3 sibling components
Context → Theme, auth, locale (read-heavy, write-rare)
URL state (searchParams) → Filters, pagination, shareable UI state
Server state (React Query, SWR) → Remote data with caching
Global store (Zustand, Redux) → Complex client state shared app-wide
Avoid prop drilling deeper than 3 levels. If you're passing props through components that don't use them, introduce context or restructure the component tree.
Design System Adherence
Reference-led UI quality
When the product needs a distinct visual direction, collect evidence before choosing a layout:
- Search a trusted reference catalogue or use references supplied by the product team.
- Study two or three relevant screens. Record decisions about hierarchy, density, navigation, controls, responsive behavior, and interaction states.
- Turn those decisions into a short design contract before implementation. Name the screen's job, primary action, required states, responsive rules, and patterns to reject.
- Rebuild the useful structure in the product's own components, tokens, content, and visual language. Never copy another product's branding, proprietary text, imagery, or exact layout.
Use references as evidence, not as templates. If references are unavailable, document the assumptions and verify the result against the product's existing design system.
Avoid the AI Aesthetic
AI-generated UI has recognizable patterns. Avoid all of them:
| AI Default | Why It Is a Problem | Production Quality |
|---|---|---|
| Purple/indigo everything | Models default to visually "safe" palettes, making every app look identical | Use the project's actual color palette |
…
الأسئلة الشائعة
ماذا يعني « accessible »؟
يعني أن الواجهة يمكن أن يستخدمها الجميع، بمن فيهم ذوو الإعاقات البصرية أو الحركية، باستخدام قارئات الشاشة أو غيرها من التقنيات المساعدة.
ماذا يعني « responsive »؟
يعني أن الواجهة تتكيف تلقائيًا مع أحجام الشاشات المختلفة، مثل الهواتف والأجهزة اللوحية وأجهزة الحاسوب، بحيث يبقى كل شيء مقروءًا وقابلًا للاستخدام.
لماذا يجب تجنب « الطابع الجمالي للذكاء الاصطناعي »؟
غالبًا ما تستخدم واجهات الذكاء الاصطناعي ألوانًا وأشكالًا ومسافات عامة لا تناسب التصميم الاحترافي. تركز هذه المهارة على إنشاء شيء يبدو عالي الجودة ومتناسقًا مع المشروع.
التفاصيل
الوصف الأصلي من المؤلف
Builds production-quality, accessible, responsive user-facing UIs. Use when building or modifying interfaces and pages, creating components, implementing layouts, meeting WCAG accessibility requirements, managing state, or when the output needs to look and feel production-quality rather than AI-generated.
repo: addyosmani/agent-skills
الشعبية
- نجوم GitHub
- 107k
- الترتيب
- #772
- الترخيص
- 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تجري مراجعات مفصلة للكود من عدة جوانب. مفيد قبل دمج التغييرات الجديدة لضمان الجودة ومنع المشكلات المستقبلية.
مهارات مشابهة
angular-developer
280kيساعد وكيلك على كتابة شيفرة Angular وتقديم نصائح لبنية المشروع، ويفيد في بدء المشاريع الجديدة وإنشاء المكونات وتحسين الأداء وإمكانية الوصول.
frontend-a11y
280kيساعد وكيلك على جعل واجهات الويب متاحة للجميع، فيضمن أن المواقع والتطبيقات تعمل جيدًا مع قارئات الشاشة والتنقل بلوحة المفاتيح.
frontend-patterns
280kيطبّق وكيلك أنماط تطوير الواجهات الحديثة، فيحسّن الأداء ويدير الحالة ويتبع أفضل الممارسات في React وNext.js.