android-design-to-code
Skill11 starsChanged 8 months agoMITView on GitHub
Use when translating Figma, Sketch, or Adobe XD designs into Jetpack Compose code for Android.
In this repository40 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- android-accessibilitySkill
- android-adaptive-layoutsSkill
- android-adb-terminalSkill
- android-background-executionSkill
- android-bluetooth-bleSkill
- android-build-verificationSkill
- android-camerax-mlkitSkill
- android-ci-cd-expertSkill
- android-clean-architectureSkill
- android-code-review-expertSkill
- android-coroutines-expertSkill
- android-custom-drawing-canvasSkill
- android-design-system-m3Skill
- android-detekt-expertSkill
- android-enterprise-securitySkill
- android-gemini-nanoSkill
- android-google-workspace-expertSkill
- android-gradle-expertSkill
- android-hardware-testingSkill
- android-jetpack-composeSkill
- android-kmp-compose-uiSkill
- android-kmp-platform-channelsSkill
- android-kmp-sharedSkill
- android-ktlint-formattingSkill
- android-lint-and-qualitySkill
- android-local-stt-ttsSkill
- android-location-mapsSkill
- android-macrobenchmarkSkill
- android-media3-exoplayerSkill
- android-media-and-image-expertSkill
- android-motion-animationsSkill
- android-navigation-expertSkill
- android-offline-firstSkill
- android-performance-auditSkill
- android-rag-localSkill
- android-screenshot-testingSkill
- android-security-hardenedSkill
- android-unit-testingSkill
- android-wear-os-composeSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
Semantic Match: Use MaterialTheme tokens (Primary, BodyLarge) instead of raw hex/pixel values.
- Distinctive: line 32
Interaction Fidelity: Add the correct hover, press, and click ripple effects.
- Very specific: line 39
Use 8.dp, 16.dp, 24.dp, etc.
- Very specific: line 43
Don't just copy the 0xFFAABBCC.
- Distinctive: line 44
Use the M3 Typography scale (HeadlineLarge, BodyMedium) to match the designer's intent.
- Very specific: line 58
Ripple Effects: Ensure all clickable modifiers have the standard ripple or custom Indication.
- Very specific: line 60
Haptics: Add LocalHapticFeedback for tactile confirmation on success/error.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Android Design to Code (The Bridge) 📐🌉
Professional strategies for translating high-fidelity design specifications into clean, semantic, and pixel-perfect Jetpack Compose code.
⚡ When to Use
- UI Handover: Implementing a new screen from Figma/Sketch.
- Micro-Copy: Translating exact text styles and case formatting.
- Grid Alignment: Replicating specific spacing and layout grids.
- Component Building: Creating atoms/molecules from design symbols.
- Pixel Perfection: Verifying accuracy through developer tools.
🏗️ The 4 Principles of High-Fidelity Translation
- Semantic Match: Use MaterialTheme tokens (Primary, BodyLarge) instead of raw hex/pixel values.
- Structural Accuracy: Replicate Flexbox (Row, Column) and Constraint systems as intended.
- Interaction Fidelity: Add the correct hover, press, and click ripple effects.
- Responsive Layouts: Handle how the design should shrink or grow beyond the mock's dimensions.
🛠️ Translation Workflow
1. Spacing & Grids (The 8dp Rule)
- Rule: Most modern Android designs use an 8dp grid.
- Use
8.dp,16.dp,24.dp, etc. - In Compose:
Spacer(Modifier.height(16.dp))orPaddingValues(16.dp).
2. Colors & Typography
- Don't just copy the
0xFFAABBCC. Check if it's already in thecolorScheme.primaryorsurface. - Use the M3 Typography scale (HeadlineLarge, BodyMedium) to match the designer's intent.
3. Shadows & Elevation
- Designs often have custom "Soft Shadows".
- Rule: In Android, use
Modifier.shadow()with a highelevationfor M2, or useMaterialTheme.colorScheme.surfaceColorAtElevation()for modern M3 designs.
🚀 Speeding Up Implementation
- Figma Plugins: Use "Relay" or "Copy as Compose" plugins to generate base code.
- Lottie/Rive: Export complex animations as JSON or RIV files for pixel-perfect motion.
- Vector Assets: Export as SVG or VectorDrawable (AVD) for sharp rendering.
📐 Interaction Best Practices
- Ripple Effects: Ensure all
clickablemodifiers have the standard ripple or customIndication. - States: Implement all design states (Enabled, Disabled, Pressed, Hovered).
- Haptics: Add
LocalHapticFeedbackfor tactile confirmation on success/error.
🧪 Verification & Checklist
- The "Overlay" Test: Use a semi-transparent screen capture of the design overlaid on the running app.
- Layout Inspector: Verify all margins, paddings, and alignment match the specs.
- Dynamic Font Scales: Does the design survive a 200% font size increase?
- Localization: Does the layout break with long German or Russian strings?
📜 Key Terms for Designers
- dp: Density-independent pixels (The standard).
- sp: Scalable pixels (For text only).
- Material 3: The framework we use to build.
- Composable: The UI function we are creating.
🔗 Related Resources
- Android Adaptive Layouts
- Design System (M3) Skill
- Accessibility Skill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

