design-engineer-mindset
Understand the Design Engineer role - bridging design and implementation. Learn to think about design as code, understand rendering pipelines, optimize animation performance, and ensure design fidelity through implementation. Use when translating designs to code, optimizing performance, or ensuring quality through development.
What this skill does
# The Design Engineer Mindset
## Overview
The **Design Engineer** is a unified role that bridges the traditional gap between design and implementation. Unlike a designer who hands off static mockups, or a developer who approximates designs, the Design Engineer understands that **the medium of digital design is code**.
This skill teaches you to think like a design engineer: understanding rendering pipelines, animation performance, and the physics of the browser as your design material.
## The Implementation Gap
### The Traditional Problem
In traditional workflows:
1. Designer creates static mockup in Figma
2. Designer hands off to developer
3. Developer approximates the design in code
4. Details are lost in translation
**Result:** The final product never matches the design. Subtle animations are removed. Spacing is approximated. Interactions feel wrong.
### The Design Engineer Solution
The Design Engineer understands that:
- The medium is code, not pixels
- Rendering pipelines matter
- Animation performance is design
- Implementation fidelity is non-negotiable
**Result:** Design is preserved through implementation. Quality is baked in.
## Understanding the Browser as Design Material
### The Rendering Pipeline
To design with code, you must understand how browsers render.
```
1. Parse HTML/CSS/JS
2. Build DOM tree
3. Compute styles (CSSOM)
4. Layout (calculate positions)
5. Paint (rasterize pixels)
6. Composite (combine layers)
```
Each step takes time. Understanding this pipeline lets you optimize.
### Layout Thrashing
Avoid reading and writing layout properties in rapid succession.
```javascript
// Bad - Layout thrashing
for (let i = 0; i < 100; i++) {
element.style.width = (i * 10) + 'px'; // Triggers layout
const width = element.offsetWidth; // Reads layout
}
// Good - Batch reads and writes
const widths = [];
for (let i = 0; i < 100; i++) {
widths.push((i * 10) + 'px');
}
widths.forEach((width, i) => {
elements[i].style.width = width; // Batch writes
});
```
### GPU Acceleration
Use transforms and opacity for animations (GPU-accelerated) instead of position/size changes (CPU-intensive).
```css
/* Bad - CPU-intensive */
.box {
animation: moveLeft 1s;
}
@keyframes moveLeft {
from { left: 0; }
to { left: 100px; }
}
/* Good - GPU-accelerated */
.box {
animation: moveLeft 1s;
}
@keyframes moveLeft {
from { transform: translateX(0); }
to { transform: translateX(100px); }
}
```
## Animation Performance
### Measuring Animation Performance
Use DevTools to measure frame rate.
```javascript
// Measure FPS
let lastTime = performance.now();
let frames = 0;
const measureFPS = () => {
const currentTime = performance.now();
if (currentTime >= lastTime + 1000) {
console.log(`FPS: ${frames}`);
frames = 0;
lastTime = currentTime;
}
frames++;
requestAnimationFrame(measureFPS);
};
measureFPS();
```
### 60fps Target
Aim for 60 frames per second (16.67ms per frame).
```javascript
// Use requestAnimationFrame for smooth animations
const animate = () => {
// Do animation work here (must complete in < 16.67ms)
requestAnimationFrame(animate);
};
animate();
```
### Easing Functions
Choose easing functions that match the physics of the interaction.
```javascript
// Linear - constant speed
const linear = (t) => t;
// Ease-out - starts fast, slows down (natural deceleration)
const easeOut = (t) => 1 - Math.pow(1 - t, 3);
// Ease-in - starts slow, speeds up (natural acceleration)
const easeIn = (t) => Math.pow(t, 3);
// Ease-in-out - accelerates then decelerates
const easeInOut = (t) => t < 0.5
? 4 * t * t * t
: 1 - Math.pow(-2 * t + 2, 3) / 2;
```
## Design Tokens as Code
### Tokens Define the System
Design tokens are the single source of truth for design decisions.
```javascript
// Design tokens
const tokens = {
spacing: {
xs: '4px',
sm: '8px',
md: '16px',
lg: '24px',
xl: '32px',
xxl: '48px',
},
colors: {
primary: '#0EA5E9',
secondary: '#64748B',
error: '#EF4444',
success: '#10B981',
},
typography: {
h1: {
fontSize: '48px',
fontWeight: 700,
lineHeight: 1.2,
},
body: {
fontSize: '16px',
fontWeight: 400,
lineHeight: 1.6,
},
},
shadows: {
sm: '0 1px 2px rgba(0, 0, 0, 0.05)',
md: '0 4px 6px rgba(0, 0, 0, 0.1)',
lg: '0 10px 15px rgba(0, 0, 0, 0.1)',
},
};
```
### Tokens in CSS
Use CSS variables to implement tokens.
```css
:root {
/* Spacing */
--spacing-xs: 4px;
--spacing-sm: 8px;
--spacing-md: 16px;
--spacing-lg: 24px;
--spacing-xl: 32px;
--spacing-xxl: 48px;
/* Colors */
--color-primary: #0EA5E9;
--color-secondary: #64748B;
--color-error: #EF4444;
--color-success: #10B981;
/* Typography */
--font-size-h1: 48px;
--font-size-body: 16px;
--font-weight-bold: 700;
--font-weight-normal: 400;
/* Shadows */
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
--shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
--shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}
/* Use tokens */
.button {
padding: var(--spacing-md) var(--spacing-lg);
background: var(--color-primary);
font-size: var(--font-size-body);
font-weight: var(--font-weight-bold);
box-shadow: var(--shadow-md);
}
```
## Component Architecture from a Design Engineer Perspective
### Atomic Design with Performance in Mind
```javascript
// Atoms - Single, indivisible elements
const Button = ({ variant = 'primary', ...props }) => (
<button className={`button button-${variant}`} {...props} />
);
// Molecules - Simple groups of atoms
const FormField = ({ label, ...props }) => (
<div className="form-field">
<label>{label}</label>
<input {...props} />
</div>
);
// Organisms - Complex groups of molecules
const Form = ({ onSubmit, fields }) => (
<form onSubmit={onSubmit}>
{fields.map(field => <FormField key={field.name} {...field} />)}
<Button type="submit">Submit</Button>
</form>
);
```
### Performance-Conscious Components
```javascript
// Memoize to prevent unnecessary re-renders
const MemoizedButton = React.memo(Button);
// Use useCallback to preserve function identity
const handleClick = useCallback(() => {
// Handle click
}, []);
// Use useMemo for expensive calculations
const memoizedValue = useMemo(() => {
return expensiveCalculation(data);
}, [data]);
```
## Interaction Fidelity
### Translating Animations to Code
When a designer creates an animation in Figma, the Design Engineer must translate it to code with precision.
**Designer's Animation:**
- Duration: 300ms
- Easing: ease-out
- From: opacity 0, translateY(-20px)
- To: opacity 1, translateY(0)
**Design Engineer's Code:**
```css
@keyframes slideIn {
from {
opacity: 0;
transform: translateY(-20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.element {
animation: slideIn 300ms cubic-bezier(0.16, 1, 0.3, 1);
}
```
### Micro-interactions with Precision
```javascript
// Precise micro-interaction
const handleButtonClick = () => {
// 1. Immediate visual feedback (ripple effect)
showRipple();
// 2. Optimistic state update
setIsLoading(true);
// 3. Network request
fetch('/api/action')
.then(() => {
// 4. Success feedback
showSuccess();
setIsLoading(false);
})
.catch(() => {
// 5. Error recovery
showError();
setIsLoading(false);
});
};
```
## Design System Implementation
### Living Design Systems
A Design Engineer maintains a living design system where code is the source of truth.
```javascript
// Design system component library
export const Button = ({ variant, size, ...props }) => {
const variantStyles = {
primary: 'bg-blue-600 text-white',
secondary: 'bg-gray-200 text-gray-900',
};
const sizeStyles = {
sm: 'px-3 py-1 text-sm',
md: 'px-4 py-2 text-base',
lg: 'px-6 py-3 text-lg',
};
return (
<button
className={`${variantStyles[variant]} ${sizeStylesRelated in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.