Refero Design Skill and MCP

repository·master·Indexed 41 days ago

https://github.com/referodesign/refero_skill

A design skill and Model Context Protocol (MCP) connection that enhances AI design workflows by integrating curated visual styles, real-world app screens, and user flows. It enforces a research-first approach to prevent 'AI slop'—generic, AI-generated design patterns—by providing mandatory research, pattern extraction, and evidence-based decision making. Compatible with ChatGPT, Codex, Claude Code, Gemini CLI, and Cursor.

Tokens
24.5K
Snippets
57
Records
110
Agent score
45%

What's inside Refero

  1. What Refero Design Skill does

    master

    The Refero skill is designed to enforce a research-first approach to AI design work. It provides:

    • Mandatory Research: Forces visual style research before implementation.
    • Pattern Extraction: Extracts concrete patterns and locks references before coding.
    • Bundled Guidance: Applies specific guidance for typography, color, spacing, motion, icons, and copywriting.
    • Evidence-Based Decisions: Ties design decisions to real-world evidence (150,000+ app screens and 6,000+ user flows) instead of generic AI defaults.
    • Visual Validation: Checks substantial visual work against the selected direction before handoff.
  2. Apply the Core Principles of Great Copywriting

    master

    To write effective copy, follow the hierarchy of Clarity > Respect > Character.

    • Clarity: The highest priority. Without it, the copy fails to communicate.
    • Respect: The second priority. Avoid irritating the user with fluff or ambiguity.
    • Character: The final layer. Use this to make the copy memorable, but never at the expense of clarity.

    Core Belief: Copy is an interface between a person and a next step. If text does not help someone understand, choose, or act, it hurts the design.

  3. Avoid AI-slop typography anti-patterns

    master

    Identify and avoid common amateur or AI-generated design mistakes:

    • Excessive scales: Using more than 8 distinct font sizes.
    • Low contrast: Gray text on gray backgrounds.
    • Flattened hierarchy: Using bold text in body paragraphs or too many font weights.
    • Poor formatting: Centered paragraphs (except for marketing copy) or ALL CAPS without increased letter-spacing (tracking).
    • Inconsistency: Random gaps or spacing between elements.
  4. Use the Visual Workflow for design exploration and QA

    master

    The Visual Workflow is a specialized reference used when a task requires visual exploration, generated mockups, bitmap assets, or post-build visual QA.

    When to use this workflow:

    • Visual exploration or generating mockups.
    • Creating bitmap assets (hero imagery, textures, etc.).
    • Performing post-build visual QA.

    When to use the main Refero workflow instead:

    • Researching styles for taste.
    • Researching screens for product patterns.
    • Researching flows for user journeys.
  5. Structure a UI color palette

    master

    A professional UI palette should consist of four distinct layers rather than a large collection of random colors:

    1. Neutrals (70–90% of UI): The most critical layer. Requires 10-12 steps (50, 100, ..., 950). Use slight warm or cool character rather than high saturation.
      • 50: Near-white backgrounds.
      • 100-200: Surfaces and cards.
      • 300-400: Borders and dividers.
      • 500: Placeholder text.
      • 600-700: Secondary text.
      • 800-900: Primary text.
      • 950: Near-black.
    2. Primary Accent: One brand color with a full scale (50–950) used sparingly for default, hover, and active states.
    3. Semantic Colors: 3-4 colors for specific meanings (Success, Warning, Danger, Info). These should be implemented as pairs (color + background + border + text-on-color).
    4. Effects: Rare, localized use of gradients or glows (primarily for marketing, not product UI).
  6. Understand the purpose of motion in UI

    master

    Motion in product UI should only be used if it serves one of these three functional purposes. If an animation does not fulfill at least one, it should be removed to avoid noise.

    1. Feedback: Confirms user actions (e.g., "I pressed this and it worked").
    2. Continuity: Explains spatial relationships (e.g., "Here is where the element came from and where it went").
    3. Hierarchy: Directs user attention (e.g., "Look here, this is important").
  7. Choose the correct Refero research layer

    master

    Refero provides three distinct research layers. Choosing the right one depends on the nature of your design task:

    1. Styles: Use for visual direction, brand direction, and "look and feel". This includes typography, color palettes, layout/composition, spacing, and elevation. Note: Styles currently focus on web marketing/product pages (landing pages, SaaS sites) rather than in-app dashboards or iOS screens.
    2. Screens: Use for concrete UI patterns, specific screen types (dashboards, settings, modals, tables), page layouts, content hierarchy, and form/state examples.
    3. Flows: Use for multi-step user journeys and sequences, such as onboarding, signup, checkout, or subscription management.
  8. Create a Reference Lock for Visual Implementation

    master

    To prevent implementation drift and ensure distinctive traits are not 'softened' into generic defaults, create a Reference Lock before coding. This document defines the boundaries of what to preserve and what to borrow.

    Key components of a Reference Lock:

    • Primary reference/direction: The dominant source.
    • Preserve: 3-5 mandatory traits (e.g., canvas, type, accent, layout, density, media).
    • Borrow only: 1-2 specific secondary details.
    • Role rules: Specific meanings for tokens/components (e.g., CTA-only, code-only).
    • Media strategy: The type of assets to use (real, generated, stock, code-native, or placeholder) including aspect ratios.
    • Reject: Defaults or averages that would collapse the unique direction.
    • Token commitments: Specific roles for background, type, accent, radius, border/shadow, and imagery treatment.

    Constraint: If implementation drifts from this lock, stop and correct it. Do not normalize distinctive traits into safer colors, fonts, or radii.

    Primary reference/direction: [one dominant source]
    Preserve: [3-5 traits that must survive: canvas, type, accent, layout, density, media]
    Borrow only: [1-2 specific secondary details]
    Role rules: [source token/component meanings to preserve, e.g. CTA-only, code-only, decorative-only]
    Media strategy: [real/generated/stock/code-native/placeholder, with aspect ratio and art direction]
    Reject: [defaults/averages that would collapse the direction]
    Token commitments: [background, type, accent, radius, border/shadow, imagery treatment, with roles]
  9. Apply the Motion Pyramid hierarchy

    master

    Use the Motion Pyramid to prioritize animation types from essential to risky. Start with Level 1 and only add higher levels when functionally justified.

    • Level 1: Micro Feedback (Essential): Focuses on responsiveness for high-frequency interactions like hover, press, focus states, toggles, and checkboxes.
    • Level 2: State Transitions: Handles movement instead of "teleportation" for elements like accordions, tabs, modals, drawers, and popovers.
    • Level 3: Layout Continuity: Maintains cognitive economy during resizing, repositioning, reordering, or filtering (e.g., drag-and-drop, list item changes).
    • Level 4: Expressive (Risky): Reserved for marketing, onboarding, or hero animations. Use sparingly in product UI as it easily becomes noise.
  10. Use OKLCH for perceptually uniform color scales

    master

    When building color scales, avoid HSL because it does not represent perceptual brightness consistently (e.g., a 50% lightness yellow looks much brighter than a 50% lightness blue).

    Use OKLCH (or LCH) to ensure that steps in a palette (e.g., 50→950) look visually even.

    Workflow:

    1. Generate and adjust palettes using OKLCH.
    2. Store production values as hex.
    3. Use OKLCH logic as the source of truth for scaling.

    For MVPs, you may use curated palettes like Tailwind, Radix, or Open Color, but understand that they rely on these perceptual principles.

    /* OKLCH example */
    --primary-500: oklch(0.55 0.2 250);  /* Base */
    --primary-600: oklch(0.48 0.2 250);  /* Hover */
    --primary-700: oklch(0.41 0.2 250);  /* Active */