Agent Skill · Webflow

webflow-cli:designer-extension

Build Designer Extensions for custom Webflow Designer functionality. Lists available templates, initializes extension projects from templates (default/react/typescript-alt), bundles extensions for upload, and serves locally for development.

Provider: Webflow Path in repo: plugins/webflow-skills/skills/designer-extension-command/SKILL.md

Skill body

Designer Extension

Create and develop Designer Extensions for Webflow with template selection, local development server, and bundling for distribution.

Important Note

ALWAYS use Bash tool for all Webflow CLI operations:

Package Manager Detection:

Instructions

Phase 1: Environment Verification

  1. Verify CLI installed: Run webflow --version to confirm CLI is installed
  2. Check project state: Check if already in an extension project (look for webflow.json with extension schema)
  3. Identify operation type: Determine if user wants to:
    • List available templates
    • Initialize new extension
    • Bundle existing extension
    • Serve extension locally

Phase 2: Template Listing & Selection

  1. List templates (if user asks or before init): Run webflow extension list
  2. Show available templates:
    • default - Basic HTML/CSS/JavaScript template
    • react - React-based template
    • typescript-alt - Alternative TypeScript template
  3. Ask user to select template if initializing new extension

Phase 3: Extension Initialization

  1. Choose project name: Ask user for project directory name
  2. Run init command: Execute webflow extension init <project-name> <template>
  3. Read generated schema: Use Read tool to examine webflow.json
  4. Show schema structure: Display the 5 schema fields:
    • name (required) - Extension name as it appears in Webflow
    • apiVersion (required) - API version (2)
    • publicDir (required) - Directory to build from (dist)
    • appIntents (optional) - Element types that can create connections
    • appConnections (optional) - Connection configurations
  5. Install dependencies: Run npm install in project directory

Phase 4: Local Development

  1. Start dev server: Execute webflow extension serve [port]
  2. Show dev server info:
    • Default port: 1337 (unless user specifies different port)
    • Local URL: http://localhost:[port]
    • How to load in Designer
  3. Provide loading instructions:
    • Open Webflow Designer
    • Load extension from local URL
    • Test functionality

Phase 5: Bundling for Upload

  1. Run bundle command: Execute webflow extension bundle
  2. Show bundle output: Display bundle.zip location and size
  3. Provide upload instructions: Guide for uploading to Webflow
  4. Document next steps: Testing and distribution guidance

Examples

Example 1: List Available Templates

User prompt:

Show me the available Designer Extension templates

Response:

πŸ” Designer Extension Templates

Listing available templates...
Executing: webflow extension list

Output:
Available templates:
1. default        - Basic HTML, CSS, and JavaScript
2. react          - React-based extension
3. typescript-alt - Alternative TypeScript template

To create a new extension:
webflow extension init <project-name> <template>

Example:
webflow extension init my-extension react

Example 2: Initialize New Extension

User prompt:

Create a new Designer Extension called gallery-manager using React

Step 1: Initialize Project

πŸ“‹ Initialize Designer Extension

Project name: gallery-manager
Template: react

Executing: webflow extension init gallery-manager react

Output:
βœ“ Created extension project at ./gallery-manager
βœ“ Generated project structure
βœ“ Created webflow.json with extension schema
βœ“ Set up React template

πŸ“ Project Structure:
./gallery-manager/
β”œβ”€β”€ webflow.json         # Extension schema
β”œβ”€β”€ package.json         # Dependencies
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ index.tsx
β”‚   └── styles.css
β”œβ”€β”€ dist/                # Build output
└── README.md

Installing dependencies...
Executing: cd gallery-manager && npm install

βœ“ Dependencies installed (45 packages)

Step 2: Show Schema

πŸ“‹ Extension Schema (webflow.json)

Reading webflow.json...

{
  "name": "Gallery Manager",
  "apiVersion": "2",
  "publicDir": "dist",
  "appIntents": {},
  "appConnections": []
}

Schema Fields:
βœ“ name (required)      - Extension name in Webflow
βœ“ apiVersion (required) - API version: 2
βœ“ publicDir (required)  - Build directory: dist
  appIntents (optional) - Element connection types
  appConnections (optional) - Connection configs

Extension ready for development!

Example 3: Serve Extension Locally

User prompt:

Run the extension on my local dev server

Default Port (1337):

πŸš€ Starting Development Server

Executing: webflow extension serve

Output:
βœ“ Building extension
βœ“ Starting dev server
βœ“ Extension ready

πŸ“‹ Development Server Running

Local URL: http://localhost:1337
Status: βœ“ Active

How to Load in Designer:
1. Open Webflow Designer
2. Open any site
3. Load extension from URL: http://localhost:1337

Press Ctrl+C to stop server

Custom Port:

User: "Run on port 3000 instead"

πŸš€ Starting Development Server

Executing: webflow extension serve 3000

Output:
βœ“ Building extension
βœ“ Starting dev server on port 3000
βœ“ Extension ready

πŸ“‹ Development Server Running

Local URL: http://localhost:3000
Status: βœ“ Active

Load in Designer: http://localhost:3000

Example 4: Bundle Extension

User prompt:

Bundle my extension for upload

Step 1: Bundle

πŸ“¦ Bundling Extension

Executing: webflow extension bundle

Output:
βœ“ Building production bundle
βœ“ Creating bundle.zip
βœ“ Bundle created successfully

Bundle Details:
- File: bundle.zip
- Location: ./dist/bundle.zip
- Size: 245 KB

βœ… Bundle ready for upload!

Step 2: Upload Instructions

πŸ“€ Upload Instructions

Your extension is bundled and ready to upload.

Upload Steps:
1. Go to Webflow Designer Extensions dashboard
2. Upload bundle.zip
3. Test the extension
4. Submit for review (if distributing)

Bundle location: ./dist/bundle.zip

Example 5: Complete Workflow

User prompt:

Create a new Designer Extension for managing colors

Step 1: List Templates

πŸ” Designer Extension Workflow

First, let me show available templates.

Executing: webflow extension list

Available templates:
1. default        - Basic HTML/CSS/JavaScript
2. react          - React-based (recommended)
3. typescript-alt - TypeScript alternative

Which template would you like to use? (default/react/typescript-alt)

User selects: react

Step 2: Initialize

πŸ“‹ Creating Extension

Project name: color-manager
Template: react

Executing: webflow extension init color-manager react

βœ“ Project created at ./color-manager
βœ“ webflow.json generated
βœ“ React template configured

Installing dependencies...
βœ“ npm install complete

πŸ“‹ Extension Schema:
{
  "name": "Color Manager",
  "apiVersion": "2",
  "publicDir": "dist",
  "appIntents": {},
  "appConnections": []
}

Step 3: Start Development

πŸš€ Starting Dev Server

Executing: webflow extension serve

βœ“ Server running at http://localhost:1337

Load in Designer:
1. Open Webflow Designer
2. Load extension from: http://localhost:1337
3. Start developing!

Server running... (Press Ctrl+C to stop)

Guidelines

Phase 1: CLI Verification

Installation Check:

# Check if CLI is installed
webflow --version

# If not installed, guide user:
npm install -g @webflow/cli

Authentication (if needed):

# Site authentication if required
webflow auth login

Phase 2: Template Management

List Templates Command:

webflow extension list

Available Templates:

Phase 3: Initialization

Init Command:

webflow extension init <project-name> <template>

Arguments:

Example Commands:

# Initialize with default template
webflow extension init my-extension default

# Initialize with React template
webflow extension init my-extension react

# Initialize with TypeScript template
webflow extension init my-extension typescript-alt

Project Structure After Init:

/project-name/
β”œβ”€β”€ webflow.json         # Extension schema (required)
β”œβ”€β”€ package.json         # Dependencies
β”œβ”€β”€ src/                 # Source files
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ index.tsx (or .js)
β”‚   └── styles.css
β”œβ”€β”€ dist/                # Build output directory
└── README.md

Phase 4: Extension Schema

Schema in webflow.json:

{
  "name": "<Your Extension Name>",
  "apiVersion": "2",
  "publicDir": "dist",
  "appIntents": {
    "image": ["manage"],
    "form": ["manage"]
  },
  "appConnections": [
    "myAppImageConnection",
    "myAppFormConnection"
  ]
}

Schema Fields:

Field Description Default Required
name Extension name as it appears in Webflow - Yes
apiVersion API version to use for extension 2 Yes
publicDir Directory to build and serve extension from dist Yes
appIntents Element types that can create connections {} No
appConnections Connection configurations for extension [] No

Required Fields:

Optional Fields:

Phase 5: Local Development

Serve Command:

# Serve on default port (1337)
webflow extension serve

# Serve on custom port
webflow extension serve 3000

Arguments:

Development Server:

Loading in Designer:

  1. Open Webflow Designer
  2. Open any site
  3. Go to Extensions menu
  4. Load extension from local URL: http://localhost:[port]
  5. Extension appears in Designer

Phase 6: Bundling

Bundle Command:

webflow extension bundle

Output:

Bundle Contents:

Error Handling

CLI Not Installed:

❌ Webflow CLI Not Found

Designer Extensions require the Webflow CLI.

Installation:
npm install -g @webflow/cli

After installation, verify:
webflow --version

Documentation: https://developers.webflow.com/cli

Invalid Template:

❌ Invalid Template

Error: Template "vue" not found

Available templates:
- default
- react
- typescript-alt

Retry with valid template:
webflow extension init my-extension react

Port Already in Use:

❌ Development Server Failed to Start

Error: Port 1337 is already in use

Solutions:
1. Stop other process on port 1337
2. Use different port:
   webflow extension serve 3000

Find process using port:
lsof -ti:1337 | xargs kill -9

Missing webflow.json:

❌ Extension Schema Not Found

Error: webflow.json not found in current directory

This directory is not an extension project.

Solutions:
1. Initialize new extension:
   webflow extension init <name> <template>
2. Navigate to existing extension directory
3. Create webflow.json with required schema

Bundle Failed:

❌ Bundle Creation Failed

Error: Build failed with errors

Common Causes:
- Missing dependencies (run: npm install)
- Build errors in source files
- Invalid webflow.json schema
- Missing publicDir directory

Fix errors and retry:
webflow extension bundle

File Operations

Reading Extension Files: Always use Read tool (never modify):

# View extension schema
Read: webflow.json

# View package dependencies
Read: package.json

# View source files
Read: src/index.html
Read: src/index.tsx

Discovering Project Files: Use Glob tool to find files:

# Find all source files
Glob: src/**/*

# Find configuration files
Glob: *.json

# Find built files
Glob: dist/**/*

Never Use Write/Edit Tools:

Progress Indicators

For Init:

πŸ“‹ Creating Extension...

[β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ] 100%

βœ“ Project created
βœ“ Dependencies installed
Elapsed: 12s

For Bundle:

πŸ“¦ Bundling Extension...

[β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ] 100%

βœ“ Bundle created: bundle.zip
Elapsed: 5s

For Serve:

πŸš€ Starting Server...

[β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ] 100%

βœ“ Server ready at http://localhost:1337
Elapsed: 3s

Best Practices

Template Selection:

Development Workflow:

  1. List available templates
  2. Initialize project with chosen template
  3. Install dependencies
  4. Serve locally for development
  5. Test in Designer
  6. Bundle for upload
  7. Upload to Webflow

Schema Configuration:

Local Development:

Bundling:

Quick Reference

Workflow: list templates β†’ init β†’ serve β†’ develop β†’ bundle β†’ upload

Key Commands:

Templates: default, react, typescript-alt

Schema Fields (webflow.json):

Dev Server: http://localhost:1337 (or custom port)

Bundle Output: bundle.zip in project directory

Documentation: https://developers.webflow.com/designer/reference/introduction