Paper to code
Claude Code plugin: Convert Paper designs into production-ready websites with scroll animations, responsive breakpoints, and polished motion
npx -y skills add galangster/paper-to-code --skill paper-to-codeAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Convert Paper designs into production-ready websites with animations. Use when the user wants to build a website from a Paper design, convert Paper frames to code, implement a landing page from Paper, or says "build this from Paper", "convert my Paper design", "paper to code". Reads designs via Paper MCP, generates React + Tailwind + Framer Motion code with responsive breakpoints and polished scroll animations.
SKILL.md
12.4 KB, ~3.0k tokens by cl100k_base, as published. Nobody here has run it
Paper-to-Code: Design to Production Website
You are converting a Paper design into a production-ready, animated, responsive website. Paper is a code-native design tool where the canvas IS real HTML/CSS — every element maps 1:1 to code. You have access to the Paper MCP server which lets you read the design programmatically.
Prerequisites Check
Before starting, verify:
- Paper Desktop is running — the MCP server starts automatically on port 29979
- The design file is open in Paper
- Test MCP connection — call
get_basic_infoto confirm connectivity
If MCP fails, tell the user: "Please open Paper Desktop with your design file, then try again."
Phase 1: Design Reconnaissance
Step 1.1 — Get the Big Picture
Tools to call (in order):
1. get_basic_info → file name, page info, artboard count
2. get_tree_summary (depth: 2) → top-level section hierarchy
3. get_screenshot (root artboard, scale: 1) → full design visual
Step 1.2 — Map Sections
From the tree summary, identify each major section of the page. For a typical landing page:
- Navigation / Header
- Hero section
- Feature sections (may be multiple)
- Social proof / testimonials
- Pricing
- CTA / conversion section
- Footer
For each section identified:
1. get_screenshot (section node) → visual reference
2. get_jsx (section node, tailwind: true) → 1:1 code
3. get_computed_styles (key child nodes) → exact CSS values
4. get_children (section node) → component breakdown
Step 1.3 — Extract Design Tokens
From the collected data, document:
- Color palette — all unique colors (hex/oklch)
- Typography — font families, sizes, weights, line heights
- Spacing — padding, gaps, margins used
- Border radii — corner radius values
- Shadows — box-shadow definitions
- Gradients — any gradient fills
Create a design-tokens.ts or add to Tailwind config.
Step 1.4 — Catalog Assets
Identify all images, icons, illustrations, and decorative elements:
For each image node:
1. get_fill_image (node) → base64 image data
2. Save to /public/images/ with descriptive names
Phase 2: Architecture Plan
Step 2.1 — Section-by-Section Breakdown
Create a structured plan document (in memory, not a file) with:
Section: [Name]
├── Paper Node ID: [id]
├── Purpose: [what this section communicates]
├── Components needed: [list]
├── Scroll animation plan:
│ ├── Entry: [how it enters viewport]
│ ├── Internal: [any scroll-linked animations within]
│ └── Exit: [if applicable]
├── Responsive strategy:
│ ├── Desktop (1280px+): [from Paper design]
│ ├── Tablet (768-1279px): [adaptation plan]
│ └── Mobile (< 768px): [adaptation plan]
└── Interactive elements: [hover states, clicks, etc.]
Step 2.2 — Animation Design
For EVERY section, design animations following these principles:
Duration Rules (from Emil Kowalski):
| Context | Duration |
|---|---|
| Micro-interactions | 100-150ms |
| Tooltips, hover states | 150-250ms |
| Section reveals, modals | 200-300ms |
| Page transitions | 300-500ms |
| Exit = 75-80% of entrance |
Easing Rules:
- Element entering viewport →
ease-out(fast start, smooth settle) - Element moving on screen →
ease-in-out - Hover/color change →
ease - NEVER use
ease-inalone (feels sluggish)
Spring Configs (preferred for organic feel):
// Apple-style (recommended default)
{ type: "spring", duration: 0.5, bounce: 0.2 }
// Snappy UI
{ type: "spring", stiffness: 300, damping: 30 }
// Gentle float
{ type: "spring", stiffness: 100, damping: 20 }
// Bouncy entrance (use sparingly)
{ type: "spring", stiffness: 200, damping: 15, bounce: 0.3 }
Common Section Animation Patterns:
-
Hero Section: No scroll trigger — animate on page load
- Headline: fade up + slight scale (0.97 → 1), staggered words
- Subtitle: fade up, 100ms delay after headline
- CTA button: fade up + slight bounce, 200ms delay
- Background: subtle gradient animation or shader
-
Feature Cards: Viewport entry triggered
- Staggered fade-up with 80ms delay between cards
- Slight y-offset (20-30px, not more)
- Scale from 0.97 → 1 (NOT from 0 — elements should feel "inflated")
-
Card Stack on Scroll (special pattern):
- See "Card Stack Animation" section below
-
Testimonials/Social Proof: Viewport entry
- Fade in + subtle slide from sides
- Stagger quotes
-
CTA Banner: Viewport entry
- Scale from 0.95 → 1 with spring
- Button pulse or glow animation after entry settles
-
Stats/Numbers: Viewport entry
- Count-up animation (requestAnimationFrame, not re-renders)
- Spring scale on the number
Performance Rules (MANDATORY):
- ONLY animate
transformandopacity - Never animate padding, margin, height, width
- Use
will-change: transformonly when animation is imminent - Hardware-accelerate Framer Motion: use
transform: "translateX(100px)"string form - Pause off-screen animations with IntersectionObserver
prefers-reduced-motion: disable ALL animations, show content instantly
Card Stack Scroll Animation
For the "See the product, not just the promise" section (or similar card carousel):
Pattern: Cards stacked with slight offset. As user scrolls, back card animates to front, front card moves to back. Like a deck being shuffled one card at a time, driven by scroll position.
Implementation approach (Framer Motion):
import { useScroll, useTransform, motion } from "framer-motion";
// Track scroll progress through the section
const { scrollYProgress } = useScroll({
target: sectionRef,
offset: ["start end", "end start"]
});
// Map scroll to card index
const activeIndex = useTransform(scrollYProgress, [0, 1], [0, cards.length - 1]);
// Each card gets:
// - z-index based on position relative to active
// - y offset (stacked behind)
// - scale (slightly smaller when behind)
// - opacity (dim when far back)
// - rotation (slight tilt for depth)
Key details:
- Make the section taller than viewport (e.g., 200-300vh) to give scroll room
- Use
position: stickyon the card container so cards stay visible while scrolling - Transition between cards should use springs for organic feel
- Cards behind should be slightly scaled down (0.95) and offset (y: -20px per level)
- Subtle shadow increase on the front card
- Use
useMotionValueEventto snap to nearest card
Overlapping Cards on Scroll
For the "Built to Keep You Consistent" section:
Pattern: Cards that compress/overlap as user scrolls past them. Each card has a different scroll speed creating a parallax stack effect.
Implementation:
// Each card gets its own scroll transform
const y1 = useTransform(scrollYProgress, [0, 1], [0, -50]);
const y2 = useTransform(scrollYProgress, [0, 1], [0, -100]);
const y3 = useTransform(scrollYProgress, [0, 1], [0, -150]);
// Cards use position: sticky with increasing top values
// As you scroll, they stack on top of each other
Phase 3: Code Generation
Step 3.1 — Project Setup
If starting fresh or rebuilding:
- Next.js 14+ (App Router)
- Tailwind CSS 3.4+
- Motion (motion/react) 12+ or Framer Motion 11+
- TypeScript
Preserve existing functionality:
- API routes (e.g., waitlist endpoints)
- SEO metadata and schema.org
- Legal pages
- Any backend integrations (Vercel KV, etc.)
Step 3.2 — Generate Components
For each section from the plan:
- Read the JSX from Paper —
get_jsxwith tailwind mode - Clean the JSX — Paper outputs valid JSX but may need:
- Extracting hardcoded values into props/constants
- Adding semantic HTML elements (section, nav, article, etc.)
- Replacing absolute positioning with flex/grid where appropriate
- Adding responsive classes (Paper only has the desktop version)
- Add animations — Wrap elements in
motion.divwith planned animations - Add responsiveness — Design mobile-first breakpoints:
- Stack horizontal layouts vertically on mobile
- Reduce font sizes proportionally
- Adjust spacing (typically 60-70% of desktop)
- Hide decorative elements that don't work on small screens
- Convert multi-column grids to single column
- Add interactions — Hover states, click handlers, scroll triggers
Step 3.3 — Responsive Breakpoints Strategy
Since Paper designs are desktop-only, derive mobile/tablet layouts:
Mobile (< 640px):
- Single column layouts
- Hamburger nav
- Full-width cards
- Reduced padding (px-4 to px-6)
- Font sizes: ~85% of desktop
- Stack side-by-side elements
- Hide complex decorative animations
Tablet (640px - 1024px):
- 2-column where desktop has 3+
- Condensed nav
- Font sizes: ~92% of desktop
- Moderate padding
Desktop (1024px+):
- Match Paper design exactly
- Full animations
- All decorative elements visible
Large Desktop (1280px+):
- Max-width container (1200-1400px)
- Centered content
- Paper design at full fidelity
Step 3.4 — Visual Verification
After generating each section:
- Run
npm run devornext dev - Open in browser
- Take a screenshot or ask the user to verify
- Compare against Paper design (
get_screenshotof the same section) - Iterate until pixel-perfect on desktop
Phase 4: Polish & Ship
Step 4.1 — Animation Audit
Review all animations using the /animate skill principles:
- Do animations serve the content's purpose?
- Is timing consistent across similar elements?
- Do paired elements share easing/duration?
- Is
prefers-reduced-motionhandled everywhere? - Are scroll animations smooth (no jank)?
Step 4.2 — Performance Check
- Lighthouse score (aim for 90+ on all metrics)
- No layout shift from animations
- Images optimized (WebP, proper sizing, lazy loading)
- Fonts preloaded
- No unnecessary JavaScript
Step 4.3 — Accessibility Check
- Semantic HTML throughout
- Proper heading hierarchy
- Alt text on images
- Keyboard navigation works
- Focus states visible
- Color contrast meets WCAG AA
prefers-reduced-motionrespected
Step 4.4 — Cross-Browser Basics
- Test in Chrome, Safari, Firefox
- Verify animations work in Safari (known Framer Motion quirks)
- Check mobile Safari viewport handling
Skill Orchestration
This skill may invoke other skills during the process:
| Phase | Skill | Purpose |
|---|---|---|
| Animation design | /animate | Add purposeful motion to sections |
| Animation details | /web-animation-design | Spring configs, easing decisions |
| Code quality | /emil-design-engineering | Design engineering best practices |
| UI polish | /polish | Final detail pass (alignment, spacing) |
| Frontend code | /frontend-design | Production-grade component code |
| Design review | /critique | Evaluate design effectiveness |
| Responsive | /adapt | Adapt for different screen sizes |
| Accessibility | /audit | Comprehensive accessibility audit |
Important Notes
- Paper's JSX is your source of truth — the design IS code. Trust it.
- Don't over-animate — every animation must serve the content. When in doubt, less is more.
- Mobile first in code, desktop first in design — Paper gives you desktop; build mobile breakpoints up from there.
- Sticky sections for scroll animations — use
position: sticky+ scroll progress for parallax/stacking effects. - Test with real content — Paper designs may have placeholder text. Replace with real copy early.
- Ship incrementally — deploy each section as it's ready, don't wait for perfection.
Quick Start (TL;DR)
1. Open Paper Desktop with design → MCP auto-connects on :29979
2. /paper-to-code [file-url or just "the open file"]
3. Phase 1: Read design via MCP (screenshots + JSX + styles)
4. Phase 2: Plan sections, animations, responsive strategy
5. Phase 3: Generate Next.js + Tailwind + Framer Motion code
6. Phase 4: Polish, verify, ship
Gives 2 of the 12 instructions most css styling skills give in ~3.0k tokens
Counted across 586 of the 596 authors here whose files we hold, read 2026-08-06
- avoid excessive centered layoutsin 55 of 586, across 12 files
- bundle code into single HTML filein 54 of 586, across 14 files
- Respect prefers-reduced-motion user settingshere, and in 52 of 586, across 35 files
- avoid purple gradientsin 51 of 586, across 11 files
- avoid uniform rounded cornersin 51 of 586, across 11 files
- avoid Inter fontin 51 of 586, across 11 files
- edit generated files to develop artifactin 50 of 586, across 10 files
- animate only transform and opacity propertieshere, and in 43 of 586
- Make touch targets at least 44x44 pixelsin 41 of 586, across 15 files
- Ensure minimum color contrast of 4.5:1in 39 of 586, across 10 files
- use tailwind cssin 39 of 586, across 24 files
- Use SVG icons instead of emojisin 38 of 586, across 11 files
Said here and by no other author read
- verify the MCP server connection before starting
- plan section animations before generating code
- derive mobile and tablet layouts from the desktop design
- clean generated JSX and add semantic HTML
- compare the generated output visually against the design
- deploy sections incrementally as they are completed
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.