بنقرة واحدة
component
Create reusable, accessible, and well-typed UI components following design system
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Create reusable, accessible, and well-typed UI components following design system
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Consult and write the ARAYA postoffice — the operational-directive channel. Advisory, never a gate: read it at cycle start, append your entry at cycle end, consider its directives, never be blocked by it. Governance acts never travel the postoffice.
Audit and enforce brand compliance across all projects and platforms — logo,
Design REST and GraphQL APIs following OpenAPI 3.1 standards. Produce complete
Connect frontend to backend — type-safe API clients, request/response handling,
Implement authentication and authorization middleware — JWT validation, role-based
Design scalable component architectures — design systems, component libraries,
| name | component |
| description | Create reusable, accessible, and well-typed UI components following design system |
| governance | Constitution ENG-004: Engineering Excellence & Software Craftsmanship Standard |
Create reusable, accessible, and well-typed UI components following design system patterns. Each component handles its own state, props, styling, and edge cases.
Copy-pasting UI code leads to inconsistencies, bugs, and maintenance nightmares. This skill produces components that are self-contained, composable, and consistent — built once, used everywhere, tested thoroughly.
When building any new UI element: buttons, inputs, cards, modals, tables, forms. When refactoring duplicated UI code into shared components.
Design mockup, component requirements, accessibility level (WCAG AA default).
// src/components/Button/Button.tsx
import { type ButtonHTMLAttributes, type ReactNode } from "react";
import styles from "./Button.module.css";
type ButtonVariant = "primary" | "secondary" | "danger" | "ghost";
type ButtonSize = "sm" | "md" | "lg";
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
variant?: ButtonVariant;
size?: ButtonSize;
loading?: boolean;
icon?: ReactNode;
children: ReactNode;
}
export function Button({
variant = "primary",
size = "md",
loading = false,
icon,
children,
disabled,
className = "",
...props
}: ButtonProps) {
const isDisabled = disabled || loading;
return (
<button
className={`${styles.button} ${styles[variant]} ${styles[size]} ${className}`}
disabled={isDisabled}
aria-busy={loading}
{...props}
>
{loading ? (
<span className={styles.spinner} aria-hidden="true" />
) : icon ? (
<span className={styles.icon} aria-hidden="true">{icon}</span>
) : null}
<span className={loading ? styles.loadingText : undefined}>
{loading ? "Loading..." : children}
</span>
</button>
);
}
aria-label, aria-busy, aria-expanded, etc.src/components/<ComponentName>/ with co-located styles and testsaria-label required when visual label is not sufficientdata-testid attributes for test selection — never rely on CSS classes in testsclassName prop for consumer customization