شعار Prompt Engineering Ui

Prompt Engineering Ui

مؤسسة
Ormus-Solutions
prompt-engineering-ui

أنماط مطالبات لتوليد واجهات مستخدم متسقة: التعبير الدقيق عن مقصود التصميم، وصيغ مواصفات المكونات، وأمثلة few-shot، وحلقات تحسين منظّمة. استخدم هذه المهارة عندما تكون مخرجات الواجهة من LLM غير متسقة أو عامة، أو عند إنشاء قوالب مطالبات قابلة لإعادة الاستخدام لنظام تصميم.

نظرة عامة

الناشرOrmus-Solutions
المستودعLibreUIUX-Claude-Code
اسم المهارةprompt-engineering-ui
النجوم
122
التفريعات
17
الملفات المرفقة
تعليمات فقط
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

  • مفتوحة المصدر

    نشرها Ormus-Solutions على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Prompt Engineering Ui في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/Ormus-Solutions/LibreUIUX-Claude-Code/tree/main/plugins/llm-application-dev/skills/prompt-engineering-ui
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Ormus-Solutions/LibreUIUX-Claude-Code.git /tmp/LibreUIUX-Claude-Code
mkdir -p .claude/skills
cp -r /tmp/LibreUIUX-Claude-Code/plugins/llm-application-dev/skills/prompt-engineering-ui .claude/skills/prompt-engineering-ui
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Prompt Engineering Ui في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Prompt Engineering Ui تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Prompt Engineering Ui بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Prompt Engineering for UI Generation

Master the art of communicating design intent to LLMs. This skill covers prompt patterns specifically optimized for generating consistent, high-quality user interfaces.


When to Use This Skill

  • Writing prompts that generate consistent UI components
  • Describing design intent precisely to AI systems
  • Building reusable prompt templates for design systems
  • Iterating on UI generation with structured feedback
  • Creating few-shot examples for UI patterns
  • Debugging inconsistent UI generation outputs

The UI Prompting Challenge

UI generation is uniquely challenging because it requires:

  1. Visual precision - Exact spacing, colors, typography
  2. Behavioral specification - Interactions, states, animations
  3. Contextual coherence - Fitting within a design system
  4. Accessibility compliance - WCAG, ARIA, keyboard navigation
  5. Responsive adaptation - Multiple breakpoints, devices
  6. Code quality - Clean, maintainable output

Standard prompting techniques often fail because UI is simultaneously visual, behavioral, and technical.


Core Prompt Patterns

Pattern 1: The Component Contract

Define components as contracts with explicit input/output specifications.

markdown
## Component Contract: DataTable

### Purpose
Display tabular data with sorting, filtering, and pagination.

### Props (Inputs)
| Prop | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| data | T[] | Yes | - | Array of data objects |
| columns | ColumnDef[] | Yes | - | Column configuration |
| pageSize | number | No | 10 | Rows per page |
| sortable | boolean | No | true | Enable column sorting |
| filterable | boolean | No | false | Show filter inputs |

### Visual Specification
- **Container**: bg-white rounded-lg shadow-sm border border-gray-200
- **Header row**: bg-gray-50 text-gray-600 text-sm font-medium
- **Data rows**: hover:bg-gray-50 border-b border-gray-100
- **Typography**: Font-sans, body text 14px, headers 12px uppercase
- **Spacing**: Cell padding 12px horizontal, 8px vertical

### States
1. **Loading**: Skeleton rows with pulse animation
2. **Empty**: Centered message with icon
3. **Error**: Red border, error message below
4. **Selected**: bg-blue-50, left border accent

### Accessibility Requirements
- role="table" on container
- Sortable columns announce sort direction
- Focus visible on all interactive elements
- Keyboard navigation: Tab through headers, Enter to sort

### Output Format
React TypeScript component using Tailwind CSS.
Include JSDoc comments and prop types.

Why This Works:

  • Explicit contract eliminates ambiguity
  • Visual specs use actual CSS values
  • States prevent incomplete implementations
  • Accessibility is non-negotiable requirement

Pattern 2: Design Token Injection

Embed design tokens directly in prompts for consistency.

markdown
Generate a Card component following these design tokens:

## Tokens
```json
{
  "spacing": {
    "xs": "4px",
    "sm": "8px",
    "md": "16px",
    "lg": "24px",
    "xl": "32px"
  },
  "colors": {
    "surface": {
      "primary": "#FFFFFF",
      "secondary": "#F9FAFB",
      "elevated": "#FFFFFF"
    },
    "border": {
      "subtle": "#E5E7EB",
      "default": "#D1D5DB"
    },
    "shadow": {
      "sm": "0 1px 2px rgba(0,0,0,0.05)",
      "md": "0 4px 6px rgba(0,0,0,0.1)"
    }
  },
  "radius": {
    "sm": "4px",
    "md": "8px",
    "lg": "12px"
  }
}

Requirements

  • Card uses surface.elevated background
  • Border uses border.subtle
  • Padding uses spacing.lg
  • Border radius uses radius.lg
  • Shadow uses shadow.md

Map these tokens to Tailwind classes where possible.


**Token Mapping Strategy**:
```typescript
// Prompt can include this mapping guide
const tokenToTailwind = {
  "spacing.xs": "p-1",
  "spacing.sm": "p-2",
  "spacing.md": "p-4",
  "spacing.lg": "p-6",
  "spacing.xl": "p-8",
  "colors.surface.primary": "bg-white",
  "colors.surface.secondary": "bg-gray-50",
  "colors.border.subtle": "border-gray-200",
  "radius.lg": "rounded-xl",
  "shadow.md": "shadow-md",
};

Pattern 3: Visual Reference Chain

Chain visual descriptions from abstract to concrete.

markdown
## Component: Hero Section

### Mood (Abstract)
Confident, minimal, focused. The user should feel capable and unintimidated.

### Aesthetic (Semi-Abstract)
- Clean sans-serif typography
- Generous whitespace (40% of viewport)
- Single accent color for CTAs
- Photography: abstract, not literal

### Visual Details (Concrete)
- **Layout**: Centered, max-width 1200px, py-24
- **Headline**: text-5xl font-bold tracking-tight text-gray-900
- **Subheadline**: text-xl text-gray-600 max-w-2xl mx-auto mt-6
- **CTA Group**: mt-10 flex gap-4 justify-center
- **Primary CTA**: bg-indigo-600 hover:bg-indigo-700 text-white px-8 py-4 rounded-lg
- **Secondary CTA**: border border-gray-300 text-gray-700 px-8 py-4 rounded-lg

### Content
- Headline: "Build interfaces that inspire"
- Subheadline: "The design system that empowers creators to ship beautiful products faster."
- Primary CTA: "Get Started"
- Secondary CTA: "Learn More"

The Chain:

Mood → Aesthetic → Visual Details → Content
 ↓         ↓            ↓            ↓
Emotion   Style     CSS Values    Text

This pattern works because it builds from intention to implementation.


Pattern 4: State Machine Specification

Define component states as a state machine.

markdown
## Button Component States

### State Machine

idle → hover → pressed → idle ↓ ↓ ↓ focus focus focus ↓ ↓ ↓ disabled (terminal) loading (blocks all transitions)


### State Definitions

| State | Visual Treatment | Tailwind Classes |
|-------|------------------|------------------|
| idle | Default appearance | bg-blue-600 text-white |
| hover | Slightly darker | hover:bg-blue-700 |
| focus | Ring indicator | focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 |
| pressed | Darker, slight scale | active:bg-blue-800 active:scale-[0.98] |
| disabled | Muted, no pointer | disabled:bg-gray-300 disabled:cursor-not-allowed |
| loading | Spinner, no text | Spinner SVG, opacity-50, pointer-events-none |

### Transitions
- All transitions: `transition-all duration-150 ease-in-out`
- Scale transitions: spring-like (use framer-motion if available)

### Implementation Notes
- Use `<button>` element, never `<div>`
- disabled state must be set via HTML attribute
- loading should set aria-busy="true"

Pattern 5: Constraint-First Prompting

Lead with constraints to narrow the solution space.

markdown
## Constraints (Non-Negotiable)

### Technical Constraints
- React 18+ with TypeScript strict mode
- Tailwind CSS only (no CSS-in-JS)
- No external component libraries
- Bundle size: component must be < 5KB gzipped

### Design Constraints
- Must pass WCAG 2.1 AA
- Must work without JavaScript (progressive enhancement)
- Must support RTL layouts
- Color contrast ratio >= 4.5:1

### Browser Support
- Chrome 90+, Firefox 88+, Safari 14+, Edge 90+
- No IE11 support required

### Performance Constraints
- First paint < 100ms
- No layout shift on load
- Images must be lazy-loaded

---

## Now, generate a Modal component that satisfies all constraints above.

Why Constraints First:

  • Eliminates invalid solutions immediately
  • Focuses generation on viable approaches
  • Makes review easier (checklist validation)
  • Prevents "creative" solutions that break requirements

Iterative Refinement Patterns

The Feedback Loop Protocol

Structure feedback for effective iteration:

markdown
## Iteration 1 Feedback

### What Works
- Component structure is correct
- Props interface is well-typed
- Basic styling matches tokens

### What Needs Fixing

#### Critical (Must Fix)
1. **Missing keyboard navigation**
   - Current: Only mouse interaction works
   - Required: Arrow keys to navigate, Enter to select
   - Reference: WAI-ARIA Listbox pattern

2. **Color contrast failure**
   - Current: text-gray-400 on bg-white (ratio 2.5:1)
   - Required: Minimum 4.5:1 for body text
   - Fix: Use text-gray-600 (ratio 5.7:1)

#### Important (Should Fix)
3. **Animation too fast**
   - Current: duration-75
   - Recommended: duration-150 for better perception

#### Nice to Have
4. Consider adding subtle shadow on hover

### Revised Requirements
Regenerate the component addressing Critical and Important items.

The Diff-Based Refinement

Request specific changes rather than full regeneration:

markdown
## Current Component

```tsx
<button className="bg-blue-500 text-white px-4 py-2 rounded">
  Click me
</button>

Requested Changes

  1. Add hover state: bg-blue-600 on hover
  2. Add focus ring: ring-2 ring-blue-500 ring-offset-2 on focus
  3. Add disabled state: Prop + visual treatment
  4. Add loading state: Spinner + loading prop

Output Format

Show only the modified code with inline comments explaining each change.


---

### The A/B Variant Request

Request multiple options for comparison:

```markdown
Generate 3 variants of a Card component:

## Variant A: Minimal
- No shadow
- Hairline border only
- Maximum whitespace

## Variant B: Elevated
- Pronounced shadow
- No visible border
- Subtle hover lift effect

## Variant C: Outlined
- Thick left accent border
- Light background fill
- Category color coding

## Common Requirements (All Variants)
- Same prop interface
- Same content structure
- Same responsive behavior
- Same accessibility

## Output
Provide all three variants as separate components.
Include a brief rationale for when to use each.

Few-Shot Examples for UI

Example: Button Variants

markdown
## Few-Shot Examples: Button Component

### Example 1: Primary Button
Input: Primary action button with "Submit" text
Output:
```tsx
<button className="bg-indigo-600 hover:bg-indigo-700 text-white font-medium py-2.5 px-5 rounded-lg transition-colors focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2">
  Submit
</button>

Example 2: Secondary Button

Input: Secondary action button with "Cancel" text Output:

tsx
<button className="bg-white hover:bg-gray-50 text-gray-700 font-medium py-2.5 px-5 rounded-lg border border-gray-300 transition-colors focus:ring-2 focus:ring-gray-500 focus:ring-offset-2">
  Cancel
</button>

Example 3: Danger Button

Input: Destructive action button with "Delete" text Output:

tsx
<button className="bg-red-600 hover:bg-red-700 text-white font-medium py-2.5 px-5 rounded-lg transition-colors focus:ring-2 focus:ring-red-500 focus:ring-offset-2">
  Delete
</button>

Now generate: Ghost button with "Learn More" text


**Pattern Recognition**:
- Consistent class structure across examples
- Clear input-output mapping
- Similar complexity level
- Demonstrates the pattern, not just the answer

---

## Prompt Templates

### Template: Component Generation

```markdown
# Generate: {ComponentName}

## Context
Project: {ProjectDescription}
Design System: {DesignSystemName}
Framework: React + TypeScript + Tailwind

## Design Tokens
{DesignTokensJSON}

## Component Specification
Purpose: {ComponentPurpose}
Props: {PropsTable}
States: {StatesList}
Variants: {VariantsList}

## Visual Requirements
Layout: {LayoutDescription}
Typography: {TypographySpecs}
Colors: {ColorSpecs}
Spacing: {SpacingSpecs}

## Behavior
Interactions: {InteractionList}
Animations: {AnimationSpecs}
Accessibility: {A11yRequirements}

## Constraints
{ConstraintsList}

## Output
Provide production-ready React TypeScript component.
Include prop types, JSDoc comments, and usage example.

Template: Design Review

markdown
# Review: {ComponentCode}

## Review Criteria

### Design Fidelity
- Does it match the design tokens?
- Is spacing consistent?
- Are colors correct?

### Accessibility
- Keyboard navigable?
- Screen reader friendly?
- Color contrast sufficient?

### Code Quality
- Types correct?
- Props well-named?
- Logic clear?

### Performance
- Unnecessary re-renders?
- Bundle size reasonable?
- Animations performant?

## Output Format
For each criterion, provide:
- Score (1-5)
- Issues found
- Specific fixes needed

Anti-Patterns in UI Prompting

1. Vague Aesthetic Descriptions

Bad: "Make it look modern and clean" Good: "Use Inter font, 16px base, 1.5 line-height, 24px vertical rhythm"

2. Missing State Coverage

Bad: "Create a button" Good: "Create a button with idle, hover, focus, active, disabled, and loading states"

3. No Design System Context

Bad: "Use a nice blue" Good: "Use the primary color from the design tokens: #4F46E5"

4. Implicit Accessibility

Bad: "Make it accessible" Good: "Include ARIA labels, keyboard navigation per WAI-ARIA Listbox pattern, focus indicators"

5. One-Shot Expectation

Bad: Expecting perfect output on first try Good: Plan for 2-3 refinement iterations with structured feedback


Quick Reference

SituationPattern to Use
New componentComponent Contract
Ensure consistencyDesign Token Injection
Explain visual intentVisual Reference Chain
Complex interactionsState Machine Specification
Avoid reworkConstraint-First Prompting
Improving outputFeedback Loop Protocol
Minor adjustmentsDiff-Based Refinement
Exploring optionsA/B Variant Request

Integration with Other Skills

This skill pairs well with:

  • agent-orchestration/ui-agent-patterns - Prompt patterns for agent delegation
  • context-management/design-system-context - Loading tokens into prompts
  • llm-application-dev/prompt-engineering-patterns - General prompting foundations
  • design-mastery/design-principles - Visual vocabulary for descriptions

"A precise prompt is a precise thought. The UI emerges from the clarity of intention."

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Prompt Engineering Ui؟

أنماط مطالبات لتوليد واجهات مستخدم متسقة: التعبير الدقيق عن مقصود التصميم، وصيغ مواصفات المكونات، وأمثلة few-shot، وحلقات تحسين منظّمة. استخدم هذه المهارة عندما تكون مخرجات الواجهة من LLM غير متسقة أو عامة، أو عند إنشاء قوالب مطالبات قابلة لإعادة الاستخدام لنظام تصميم.

لماذا تستخدم Prompt Engineering Ui على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Prompt Engineering Ui عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Prompt Engineering Ui في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/Ormus-Solutions/LibreUIUX-Claude-Code/tree/main/plugins/llm-application-dev/skills/prompt-engineering-ui. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Prompt Engineering Ui؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Prompt Engineering Ui؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Prompt Engineering Ui معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Prompt Engineering Ui مجانية؟

نعم. نشرها Ormus-Solutions على GitHub بموجب ترخيص MIT. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇