Skip to content
OpenAgentSkill
Browsing is open · Catalog captured 2026-11-21 · Automatic updates and account services are paused.
Development

webflow-cli:devlink

Export Webflow Designer components to React/Next.js code for external projects. Configure devlink settings in webflow.json, sync design updates with devlink sync, validate generated code, show diffs, and provide integration examples. Use when building with Webflow designs in React/Next.js.

webflow · AI review on file

Installation

Read the source and dependencies before running a command. Copying does not install or execute anything.

npx skills add webflow/webflow-skills --skill webflow-cli:devlink

About this skill


name: webflow-cli:devlink description: Export Webflow Designer components to React/Next.js code for external projects. Configure devlink settings in webflow.json, sync design updates with devlink sync, validate generated code, show diffs, and provide integration examples. Use when building with Webflow designs in React/Next.js.

DevLink

Export and sync Webflow Designer components to React/Next.js code with validation, diffs, and integration guidance.

Important Note

ALWAYS use Bash tool for all Webflow CLI operations:

  • Execute webflow devlink sync via Bash tool
  • Use Read tool to examine synced files and webflow.json (never modify)
  • Use Glob tool to discover generated components
  • Verify CLI installation: webflow --version
  • Check authentication: Use webflow auth login for site authentication
  • DO NOT use Webflow MCP tools for CLI workflows
  • All CLI commands require proper descriptions (not context parameters)

Package Manager Detection:

  • Check for lock files: package-lock.json (npm), pnpm-lock.yaml (pnpm), yarn.lock (yarn)
  • If no lock file found, ask user which package manager to use (npm/pnpm/yarn)
  • Use detected package manager for all install/build commands

Instructions

Phase 1: Environment Verification

  1. Verify CLI installed: Run webflow --version to confirm CLI is installed
  2. Check authentication: Verify site authentication (created via webflow auth login)
  3. Discover project state: Check if webflow.json exists with devlink configuration
  4. Identify target framework: Determine if React, Next.js, or other

Phase 2: DevLink Configuration

  1. Check for existing config: Look for webflow.json with devlink section
  2. Read configuration: If exists, show current devlink settings:
    • rootDir: Directory to export components into
    • cssModules: Whether to use CSS modules
    • fileExtensions: File extensions for generated files
    • Other configuration options
  3. Ask operation type: Clarify what user wants to do:
    • Configure DevLink for first time
    • Sync all components
    • Sync specific components (using components regex pattern)
    • Update existing sync
  4. Store baseline (if updating): Use Read tool to capture current files before sync

Phase 3: Sync Execution

  1. Run sync command: Execute webflow devlink sync with options:
    • --api-token or -t: Override API token from .env
    • --site-id or -s: Override site ID from .env
  2. Monitor sync progress: Show CLI output and sync status
  3. Capture sync results: Record files created/modified in rootDir
  4. Validate generated code:
    • Check for TypeScript errors (if using TS)
    • Verify import statements
    • Confirm component exports
    • Check CSS module references

Phase 4: Analysis & Diff Preview

  1. Compare before/after: Show what changed:
    • New files created in rootDir
    • Existing files modified
    • Components added or updated
  2. Show file diffs: Display key changes for modified files
  3. Analyze component structure:
    • Component count
    • New components added
    • Updated components
    • CSS files generated
  4. List dependencies: Show what needs to be imported

Phase 5: Integration Guidance

  1. Provide import statements: Show exact code to import components
  2. Show usage examples: Demonstrate how to use each component
  3. Document sync timestamp: Record when sync occurred
  4. Provide next steps: Guide user on testing and integration

Examples

Example 1: First-Time DevLink Setup

User prompt:

Sync my Webflow components to my Next.js project

Step 1: Environment Verification

🔍 DevLink Environment Check

Checking CLI installation...
✓ Webflow CLI installed: v1.5.2

Current directory: /Users/user/projects/my-nextjs-app
Framework detected: Next.js 14

Checking for DevLink configuration...
⚠️ No webflow.json with devlink configuration found

This appears to be your first DevLink sync.
Ready to configure? (yes/no)

User confirms: yes

Step 2: Configuration Setup

📋 DevLink Configuration

DevLink syncs Webflow components to your local project as React code.

Configuration needed in webflow.json:

{
  "devlink": {
    "rootDir": "./devlink",           // Where to export components
    "cssModules": true,                // Use CSS modules
    "fileExtensions": {
      "js": "jsx"                      // or "tsx" for TypeScript
    }
  }
}

I'll help you create this configuration.

Questions:
1. Where should components be exported? (default: ./devlink)
2. Use TypeScript? (yes for tsx, no for jsx)
3. Use CSS modules? (recommended: yes)

User provides: ./src/devlink, yes (TypeScript), yes (CSS modules)

Creating webflow.json configuration...

{
  "devlink": {
    "rootDir": "./src/devlink",
    "cssModules": true,
    "fileExtensions": {
      "js": "tsx"
    }
  }
}

✓ Configuration created

⚠️ Authentication Required:
DevLink needs your Webflow site ID and API token.

Run: webflow auth login
This will create a .env file with:
- WEBFLOW_SITE_ID
- WEBFLOW_SITE_API_TOKEN

After authentication, run sync again.

Example 2: First Sync After Configuration

User prompt:

Run the DevLink sync

Step 1: Verification

🔍 DevLink Sync Check

Checking configuration...
✓ webflow.json found with devlink config
✓ Root directory: ./src/devlink
✓ CSS modules: enabled
✓ File extensions: tsx

Checking authentication...
✓ .env found with WEBFLOW_SITE_ID and WEBFLOW_SITE_API_TOKEN

Ready to sync components from Webflow.

Step 2: Sync Execution

🔄 Syncing Components

Executing: webflow devlink sync

Output:
✓ Connecting to Webflow site
✓ Fetching components
✓ Exporting components to ./src/devlink
✓ Generating React components
✓ Creating CSS module files
✓ Creating index file

Sync complete!

📁 Generated Files:
./src/devlink/
├── index.ts (module exports)
├── Navigation.tsx (component
Read the complete source ↗