Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

figma-to-android

Pixel-perfect Figma to Android implementation using ADB and Figma MCP. Build Android UIs that match your Figma designs exactly.

Features

  • Automatic Project Detection - Detects Gradle build system, Compose vs XML, Material Design version
  • Pixel-Perfect Implementation - Recursive refinement loop until implementation matches Figma exactly
  • ADB Integration - Screenshots, app deployment, and device interaction
  • Design System Extraction - Reads colors.xml, dimens.xml, themes.xml to match existing tokens
  • Figma MCP Integration - Extracts design specs, tokens, and screenshots directly from Figma

Requirements

Requirement Version Notes
Claude Code 2.0.73+ With plugin support
Figma MCP Latest Must be configured in Claude Code
Android Studio Latest With Android Emulator
ADB - Must be in PATH
Project - Android/Kotlin project

Installation

claude plugin install github:blissito/figma-to-android

Or install from local path:

claude plugin install /path/to/figma-to-android

Setup

1. Configure Figma MCP

Ensure Figma MCP is configured in your Claude Code settings. Verify with:

/ftc-android

The skill will check for Figma MCP connectivity.

2. Android Emulator

The skill automatically starts the emulator if none is running. It will:

  1. Check for connected devices via adb devices
  2. If no emulator is running, list available AVDs
  3. Start the first available AVD (or ask which one to use)
  4. Wait for the device to be ready

You can also start it manually:

emulator -list-avds           # List available AVDs
emulator -avd <avd_name>      # Start specific AVD
adb devices                   # Verify connection

Usage

  1. Open Claude Code in your Android project directory
  2. Run the skill (emulator will auto-start if needed):
/ftc-android
  1. Paste the Figma link when prompted
  2. Watch as the implementation is built, deployed, compared, and refined

Workflow

Figma Link → Extract Design → Implement Kotlin/Compose → Build → Deploy → Screenshot → Compare → Refine → Done

How It Works

Phase 0: Project & Device Discovery

  • Detects Android project structure (build.gradle, AndroidManifest.xml)
  • Identifies build system (Kotlin DSL vs Groovy)
  • Scans design system files (colors.xml, dimens.xml, themes.xml)
  • Auto-starts emulator if none is running
  • Verifies device connection and screen dimensions

Phase 1: Context Gathering

  • Checks if app is installed and running
  • Builds and deploys if necessary
  • Prompts for Figma link

Phase 2: Deep Execution

  • Extracts design from Figma MCP (metadata, layout, tokens, screenshot)
  • Maps Figma units to Android (px → dp/sp)
  • Implements using Jetpack Compose or XML Views
  • Builds, deploys, and captures screenshot

Phase 3: Recursive Refinement

  • Compares implementation screenshot with Figma reference
  • Identifies any discrepancies (colors, spacing, typography, alignment)
  • Corrects and re-deploys until pixel-perfect match

Phase 4: User Review

  • Shows final screenshot for approval
  • Accepts new Figma links for additional components

Supported Technologies

Technology Support
Kotlin Full
Jetpack Compose Full
XML Views Full
Material Design 3 Full
Material Design 2 Full
Vector Drawables Full

Troubleshooting

Emulator Not Starting Automatically

# Check if any AVDs exist
emulator -list-avds

# If no AVDs, create one in Android Studio:
# Tools → Device Manager → Create Device

# If ADB isn't detecting devices, restart it
adb kill-server
adb start-server

# Manual start if needed
emulator -avd <avd_name>

Figma MCP Not Working

Verify Figma MCP is configured in Claude Code settings. The skill calls whoami to verify authentication.

Gradle Build Fails

# Clean and rebuild
./gradlew clean assembleDebug

# Check Java version
java -version

# Sync Gradle wrapper
./gradlew wrapper

Screenshot Comparison Issues

  • Ensure emulator is not rotated
  • Hide system bars if they interfere with comparison
  • Check screen density matches expected values

ADB Commands Reference

# Screenshot
adb shell screencap -p /sdcard/screen.png
adb pull /sdcard/screen.png ./screen.png

# Install APK
adb install -r app/build/outputs/apk/debug/app-debug.apk

# Launch app
adb shell am start -n <package>/<activity>

# Device info
adb shell wm size      # Screen resolution
adb shell wm density   # Screen density

License

MIT

Author

bliss - GitHub

Related

About

Figma to Code for Android - Pixel-perfect implementation using ADB and Figma MCP

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages