Skip to content

Biswadipgoj/biswodip / .agents/skills/ui-ux-pro-max

ui-ux-pro-max

Unverified

UI/UX design intelligence for web, mobile, and desktop. This skill should be used when designing, building, reviewing, or fixing interfaces, including pages, components, design systems, accessibility, interaction, responsive layout, typography, color, charts, and stack-specific UI implementation. Searchable local data: 79 searchable styles (50 active), 192 product palettes and reasoning profiles, 74 font pairings, 119 UX guidelines, 105 icons, 17 GSAP presets, 25 chart types, and 22 stacks.

FileKindSize
SKILL.mdskill md15.6 KB
data/app-interface.csvother10.8 KB
data/catalog-summary.jsonconfig2.3 KB
data/charts.csvother22.8 KB
data/colors.csvother37.1 KB
data/data-provenance.jsonconfig35.8 KB
data/google-font-licenses.jsonconfig423.0 KB
data/google-fonts.csvother729.7 KB
data/icons.csvother56.6 KB
data/landing.csvother24.9 KB
data/motion.csvother14.3 KB
data/phosphor-icons-upstream.jsonconfig804.6 KB
data/products.csvother73.9 KB
data/react-performance.csvother14.7 KB
data/stacks/angular.csvother19.4 KB
data/stacks/astro.csvother14.2 KB
data/stacks/avalonia.csvother26.7 KB
data/stacks/flutter.csvother13.9 KB
data/stacks/html-tailwind.csvother16.2 KB
data/stacks/javafx.csvother32.8 KB
data/stacks/jetpack-compose.csvother12.0 KB
data/stacks/laravel.csvother19.7 KB
data/stacks/nextjs.csvother18.2 KB
data/stacks/nuxt-ui.csvother23.5 KB
data/stacks/nuxtjs.csvother22.5 KB
data/stacks/react-native.csvother13.7 KB
data/stacks/react.csvother18.6 KB
data/stacks/shadcn.csvother22.6 KB
data/stacks/svelte.csvother14.7 KB
data/stacks/swiftui.csvother15.0 KB
data/stacks/threejs.csvother45.0 KB
data/stacks/uno.csvother29.4 KB
data/stacks/uwp.csvother24.1 KB
data/stacks/vue.csvother12.5 KB
data/stacks/winui.csvother27.2 KB
data/stacks/wpf.csvother23.6 KB
data/styles.csvother146.0 KB
data/typography.csvother48.8 KB
data/ui-reasoning.csvother75.5 KB
data/ux-guidelines.csvother26.9 KB
references/pro-rules.mdmarkdown10.7 KB
references/quick-reference.mdmarkdown24.0 KB
scripts/core.pyscript40.3 KB
scripts/design_system.pyscript69.3 KB
scripts/reasoning_contract.pyscript5.7 KB
scripts/search.pyscript9.2 KB
scripts/tests/fixtures/catalogs/google-api.jsonconfig1.1 KB
scripts/tests/fixtures/catalogs/google-catalog.jsonconfig1.7 KB
scripts/tests/fixtures/catalogs/google-existing.csvother480 B
scripts/tests/fixtures/catalogs/google-metadata.jsonconfig328 B
scripts/tests/fixtures/catalogs/google-overrides.jsonconfig97 B
scripts/tests/fixtures/catalogs/icons-curated.csvother495 B
scripts/tests/fixtures/catalogs/phosphor-core.jsonconfig571 B
scripts/tests/fixtures/catalogs/phosphor-package.jsonconfig370 B
scripts/tests/fixtures/catalogs/phosphor-react-exports.jsonconfig87 B
scripts/tests/fixtures/catalogs/phosphor-react-package.jsonconfig81 B
scripts/tests/fixtures/relevance-baseline.jsonconfig87.3 KB
scripts/tests/fixtures/relevance-cases.jsonconfig35.9 KB
scripts/tests/fixtures/relevance-thresholds.jsonconfig5.0 KB
scripts/tests/test_catalog_refresh.pyscript19.0 KB
scripts/tests/test_catalog_summary_line_endings.pyscript2.9 KB
scripts/tests/test_core.pyscript16.3 KB
scripts/tests/test_core_data_quality.pyscript8.7 KB
scripts/tests/test_data_contracts.pyscript19.1 KB
scripts/tests/test_design_system_mode.pyscript7.5 KB
scripts/tests/test_design_system_stack.pyscript2.2 KB
scripts/tests/test_native_desktop_stack_freshness.pyscript8.0 KB
scripts/tests/test_relevance_evaluator.pyscript8.2 KB
scripts/tests/test_skill_script_paths.pyscript4.2 KB
scripts/tests/test_style_taxonomy.pyscript7.3 KB
scripts/tests/test_text_layout_resilience.pyscript5.7 KB
scripts/tests/test_web_stack_freshness.pyscript7.5 KB
scripts/validate_data.pyscript51.0 KB

scripts/tests/test_design_system_mode.py

View on GitHub
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Regression tests for color-mode coherence in design_system.py (issue #428).

Style, palette and anti-patterns used to be resolved independently, so a
dark-primary style could be returned alongside a light palette and a
"Dark mode by default" anti-pattern.

Stdlib-only (unittest, not pytest) to match test_core.py -- this project ships
with zero external dependencies.

Run with:
    python -m unittest discover -s scripts/tests -v
or directly:
    python scripts/tests/test_design_system_mode.py
"""

import sys
import unittest
from pathlib import Path

SCRIPTS_DIR = Path(__file__).resolve().parent.parent
sys.path.insert(0, str(SCRIPTS_DIR))

from design_system import (  # noqa: E402
    _filter_anti_patterns_for_mode,
    _contrast_ratio,
    _palette_is_dark,
    _query_wants_dark,
    _relative_luminance,
    _resolve_color_mode,
    _select_palette_for_mode,
    _style_is_dark_primary,
    DesignSystemGenerator,
)  # noqa: I001 - private helpers first, public class last

LIGHT_PALETTE = {"Product Type": "SaaS", "Background": "#F8FAFC", "Foreground": "#020617"}
DARK_PALETTE = {"Product Type": "Fintech/Crypto", "Background": "#0F172A", "Foreground": "#F8FAFC"}

# Verbatim from styles.csv row "Modern Dark (Cinema Mobile)".
DARK_PRIMARY_STYLE = {
    "Style Category": "Modern Dark (Cinema Mobile)",
    "Light Mode ✓": "✓ Light mode only as exception",
    "Dark Mode ✓": "✓ Dark Mode Primary",
}
DUAL_MODE_STYLE = {
    "Style Category": "Minimalism",
    "Light Mode ✓": "✓ Full",
    "Dark Mode ✓": "✓ Full",
}


class TestLuminance(unittest.TestCase):
    def test_parses_six_and_three_digit_hex(self):
        self.assertAlmostEqual(_relative_luminance("#FFFFFF"), 1.0, places=6)
        self.assertAlmostEqual(_relative_luminance("#000000"), 0.0, places=6)
        self.assertAlmostEqual(_relative_luminance("#FFF"), 1.0, places=6)

    def test_returns_none_for_unparseable(self):
        for value in ("", "nope", "#12", "#GGGGGG", None):
            self.assertIsNone(_relative_luminance(value))

    def test_classifies_backgrounds_from_the_shipped_data(self):
        # Lightest dark background and darkest light background in colors.csv.
        self.assertTrue(_palette_is_dark({"Background": "#1F2937"}))
        self.assertFalse(_palette_is_dark({"Background": "#E8ECF1"}))

    def test_missing_background_is_not_dark(self):
        self.assertFalse(_palette_is_dark({}))
        self.assertFalse(_palette_is_dark(None))


class TestModeResolution(unittest.TestCase):
    def test_dark_primary_style_detected(self):
        self.assertTrue(_style_is_dark_primary(DARK_PRIMARY_STYLE))

    def test_dual_mode_style_is_not_dark_primary(self):
        self.assertFalse(_style_is_dark_primary(DUAL_MODE_STYLE))
        self.assertFalse(_style_is_dark_primary({}))

    def test_query_keywords(self):
        self.assertTrue(_query_wants_dark("fintech B2B professional dark mode"))
        self.assertTrue(_query_wants_dark("gaming app OLED"))
        self.assertFalse(_query_wants_dark("healthcare clinic booking app"))
        self.assertFalse(_query_wants_dark(""))

    def test_either_signal_resolves_dark(self):
        self.assertEqual(_resolve_color_mode("saas dark mode", DUAL_MODE_STYLE), "dark")
        self.assertEqual(_resolve_color_mode("saas", DARK_PRIMARY_STYLE), "dark")
        self.assertEqual(_resolve_color_mode("saas", DUAL_MODE_STYLE), "light")


class TestPaletteSelection(unittest.TestCase):
    def test_dark_mode_skips_light_palettes(self):
        chosen = _select_palette_for_mode([LIGHT_PALETTE, DARK_PALETTE], "dark")
        self.assertEqual(chosen["Background"], "#0F172A")

    def test_dark_mode_falls_back_to_top_hit_when_no_dark_ramp_exists(self):
        chosen = _select_palette_for_mode([LIGHT_PALETTE], "dark")
        self.assertEqual(chosen["Background"], "#F8FAFC")

    def test_light_mode_keeps_the_existing_top_hit_behaviour(self):
        chosen = _select_palette_for_mode([DARK_PALETTE, LIGHT_PALETTE], "light")
        self.assertEqual(chosen["Background"], "#0F172A")

    def test_empty_results(self):
        self.assertEqual(_select_palette_for_mode([], "dark"), {})

    def test_category_identity_wins_over_unrelated_dark_palette(self):
        chosen = _select_palette_for_mode(
            [LIGHT_PALETTE, DARK_PALETTE], "dark", "SaaS")
        self.assertEqual("SaaS", chosen["Product Type"])
        self.assertEqual("derived-dark", chosen["_mode_derivation"])
        self.assertTrue(_palette_is_dark(chosen))
        self.assertGreaterEqual(
            _contrast_ratio(chosen["Ring"], chosen["Background"]), 3.0)


class TestAntiPatternGating(unittest.TestCase):
    def test_dark_clause_dropped_others_kept(self):
        result = _filter_anti_patterns_for_mode(
            "Excessive animation + Dark mode by default", "dark")
        self.assertEqual(result, "Excessive animation")

    def test_light_mode_is_a_no_op(self):
        original = "Excessive animation + Dark mode by default"
        self.assertEqual(_filter_anti_patterns_for_mode(original, "light"), original)

    def test_unrelated_anti_patterns_survive_dark_mode(self):
        original = "Complex jargon + Tiny tap targets"
        self.assertEqual(_filter_anti_patterns_for_mode(original, "dark"), original)

    def test_empty_input(self):
        self.assertEqual(_filter_anti_patterns_for_mode("", "dark"), "")


class TestEndToEndCoherence(unittest.TestCase):
    """The exact reproduction from issue #428."""

    QUERY = "SaaS invoicing fintech B2B professional dark mode"

    def test_dark_query_gets_a_dark_background(self):
        ds = DesignSystemGenerator().generate(self.QUERY)
        background = ds["colors"]["background"]
        self.assertTrue(
            _palette_is_dark({"Background": background}),
            "dark-mode query returned a light background: {}".format(background),
        )

    def test_generator_exports_every_semantic_foreground_pair(self):
        colors = DesignSystemGenerator().generate("SaaS dashboard")["colors"]
        pairs = (
            ("on_primary", "primary"),
            ("on_secondary", "secondary"),
            ("on_accent", "accent"),
            ("foreground", "background"),
            ("card_foreground", "card"),
            ("muted_foreground", "muted"),
            ("on_destructive", "destructive"),
        )
        for foreground, background in pairs:
            with self.subTest(pair=foreground):
                self.assertTrue(colors[foreground])
                self.assertTrue(colors[background])
                self.assertGreaterEqual(
                    _contrast_ratio(colors[foreground], colors[background]), 4.5
                )
        self.assertEqual(colors["on_cta"], colors["on_accent"])

    def test_dark_query_foreground_is_lighter_than_background(self):
        ds = DesignSystemGenerator().generate(self.QUERY)
        background = _relative_luminance(ds["colors"]["background"])
        foreground = _relative_luminance(ds["colors"]["foreground"])
        self.assertIsNotNone(background)
        self.assertIsNotNone(foreground)
        self.assertGreater(foreground, background)

    def test_dark_query_does_not_advise_against_dark_mode(self):
        ds = DesignSystemGenerator().generate(self.QUERY)
        self.assertNotIn("dark mode", ds["anti_patterns"].lower())

    def test_light_query_keeps_a_light_background(self):
        ds = DesignSystemGenerator().generate("healthcare clinic booking app")
        self.assertFalse(_palette_is_dark({"Background": ds["colors"]["background"]}))


if __name__ == "__main__":
    unittest.main(verbosity=2)
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall