gemini-visual

Analyze UI screenshots and generate frontend code and assets using Google Gemini models.

1|Updated May 6, 2026
One-click install
npx skills add https://github.com/surfingalien/FinSurfing --skill gemini-visual-surfingalien
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gemini-visual
Source: https://github.com/surfingalien/FinSurfing/tree/main/.claude/skills/gemini-visual
Command: npx skills add https://github.com/surfingalien/FinSurfing --skill gemini-visual-surfingalien

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires google-genai, and includes scripts (resource) components.

What problem does it solve? Front-end developers and designers often need to audit UI screenshots for accessibility issues, extract color palettes, compare design iterations, or convert mockups into code, which is slow and error-prone when done manually. This Skill uses Google Gemini's multimodal models to automate these visual analysis and generation tasks from the command line. ## Core Features & Use Cases - UI Analysis & Accessibility Audits: Analyze screenshots for layout issues, WCAG contrast compliance, visual hierarchy, and UX patterns with multiple analysis modes. - Screenshot to Code: Convert UI mockups into HTML/CSS using Tailwind, Bootstrap, React, Vue, Svelte, or vanilla CSS, with responsive and component-based output options. - Design Comparison & Color Extraction: Compare two design versions for visual, content, or accessibility differences, and extract color palettes as CSS variables, Tailwind config, or SCSS. - Asset Generation & Text-Based Design: Generate icons, backgrounds, patterns, and illustrations with Gemini image models, or produce designs and code from text briefs including interactive multi-turn sessions. - Use Case: Given a landing page mockup PNG, extract its color palette as a Tailwind config, run an accessibility audit, then convert the screenshot into responsive Tailwind components. ## Quick Start Set your GEMINI_API_KEY environment variable, then ask the assistant to analyze a UI screenshot such as "run an accessibility audit on mockup.png" or "convert this screenshot to Tailwind code".

Frequently Asked Questions about gemini-visual

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

FAQPage Schema
How do I convert a UI screenshot to HTML/CSS code?

Run screenshot_to_code.py with the image path and choose a framework such as Tailwind, Bootstrap, React, Vue, Svelte, or vanilla CSS. Use the --responsive flag for responsive output and -c to extract reusable components.

How do I extract a color palette from an image?

Run extract_colors.py with your image to get HEX, RGB, and HSL values for the most prominent colors. Output formats include text, JSON, CSS custom properties, Tailwind config, and SCSS variables, with optional contrast ratio calculations.

What Gemini models are used for image analysis versus generation?

Analysis tasks like UI audits and screenshot-to-code use text-and-vision models such as gemini-2.5-flash or gemini-2.5-pro. Asset generation uses image-output models like gemini-3-pro-image-preview or gemini-2.5-flash-image.

Why does the script say GEMINI_API_KEY environment variable not set?

The scripts require a Gemini API key stored in the GEMINI_API_KEY environment variable. Create a key at Google AI Studio, then export it in your shell or add it to your shell profile for persistence.

What image formats and sizes are supported for UI analysis?

Supported input formats are PNG, JPEG, WebP, HEIC, and HEIF, with a 20MB inline limit. You can control token usage with the --resolution flag, from low (about 70 tokens) to high (about 1120 tokens) for detailed analysis.

Why was my asset generation request blocked?

Gemini's content moderation may block certain prompts, returning no image content. Simplify or rephrase the prompt, remove brand names or copyrighted references, and use more generic descriptions.