prompt-engineering-ui

Define UI component contracts and inject design tokens into prompts.

89|14|Updated Nov 15, 2025
One-click install
npx skills add https://github.com/HermeticOrmus/LibreUIUX-Claude-Code --skill prompt-engineering-ui
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prompt-engineering-ui
Source: https://github.com/HermeticOrmus/LibreUIUX-Claude-Code/tree/main/plugins/llm-application-dev/skills/prompt-engineering-ui
Command: npx skills add https://github.com/HermeticOrmus/LibreUIUX-Claude-Code --skill prompt-engineering-ui

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the challenge of generating consistent, high-quality user interfaces with AI by providing structured prompt patterns and best practices.

Core Features & Use Cases

  • Component Contracts: Define UI components with explicit props, states, and visual specifications.
  • Design Token Integration: Embed design tokens directly into prompts for brand consistency.
  • Iterative Refinement: Utilize structured feedback loops and diff-based changes for effective UI adjustments.
  • Use Case: Generate a React button component that adheres to your design system's tokens, including hover, focus, and disabled states, by using the "Component Contract" and "Design Token Injection" patterns.

Quick Start

Use the prompt-engineering-ui skill to generate a Card component using the provided design tokens.

Frequently Asked Questions about prompt-engineering-ui

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate UI components with an LLM that match my design system?

Generate design-consistent UI components by injecting design tokens and using component contract patterns to specify explicit props and states for the LLM. This ensures brand consistency and precise visual specifications in the generated output.

What are component contracts in AI UI generation?

Component contracts define UI components with explicit props, states, and visual specifications before prompting the LLM. This pattern provides a structured boundary that ensures the generated component meets exact functional and visual requirements.

How do I refine AI-generated UI when the initial output is inconsistent?

Refine inconsistent AI UI output using structured feedback loops, diff-based changes, and A/B variant requests. Constraint-first prompting and visual reference chaining help iteratively guide the LLM toward precise visual adjustments.

Can I use prompt engineering for UI generation without external dependencies?

Yes, UI prompt engineering requires no external dependencies. It provides self-contained prompt patterns and reference structures to define state machine specifications and constraints directly within your text prompts.

What is the best way to prompt an LLM for component states like hover or disabled?

The best way to prompt for component states is using component contracts to explicitly list hover, focus, and disabled states, combined with design token injection to enforce exact visual styling rules.

Why does the LLM ignore my design tokens during UI component generation?

LLMs ignore design tokens when prompts lack constraint-first structuring. Embed tokens directly using design token injection patterns and specify component contracts to force the model to recognize and apply brand styling.