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.
What this skill does
# 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:**
- Execute `webflow extension` commands via Bash tool
- Use Read tool to examine generated files and schema (never modify)
- Use Glob tool to discover project files
- Verify CLI installation: `webflow --version`
- Check authentication: `webflow auth login` (if needed)
- 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 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
4. **List templates** (if user asks or before init): Run `webflow extension list`
5. **Show available templates**:
- `default` - Basic HTML/CSS/JavaScript template
- `react` - React-based template
- `typescript-alt` - Alternative TypeScript template
6. **Ask user to select template** if initializing new extension
### Phase 3: Extension Initialization
7. **Choose project name**: Ask user for project directory name
8. **Run init command**: Execute `webflow extension init <project-name> <template>`
9. **Read generated schema**: Use Read tool to examine webflow.json
10. **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
11. **Install dependencies**: Run `npm install` in project directory
### Phase 4: Local Development
12. **Start dev server**: Execute `webflow extension serve [port]`
13. **Show dev server info**:
- Default port: 1337 (unless user specifies different port)
- Local URL: http://localhost:[port]
- How to load in Designer
14. **Provide loading instructions**:
- Open Webflow Designer
- Load extension from local URL
- Test functionality
### Phase 5: Bundling for Upload
15. **Run bundle command**: Execute `webflow extension bundle`
16. **Show bundle output**: Display bundle.zip location and size
17. **Provide upload instructions**: Guide for uploading to Webflow
18. **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:**
```bash
# Check if CLI is installed
webflow --version
# If not installed, guide user:
npm install -g @webflow/cli
```
**Authentication (if needed):**
```bash
# Site authentication if required
webflow auth login
```
### PhaRelated in Web Dev
generating-lwc-components
IncludedLightning Web Components with PICKLES methodology and 165-point scoring. Use this skill when the user creates or edits LWC components, builds wire service patterns, or writes Jest tests for LWC. TRIGGER when: user creates/edits LWC components, touches lwc/**/*.js, .html, .css, .js-meta.xml files, or asks about wire service, SLDS, or Jest LWC tests. DO NOT TRIGGER when: Apex classes (use generating-apex), Aura components, or Visualforce.
tanstack-query
IncludedManage server state in React with TanStack Query v5. Set up queries with useQuery, mutations with useMutation, configure QueryClient caching strategies, implement optimistic updates, and handle infinite scroll with useInfiniteQuery. Use when: setting up data fetching in React projects, migrating from v4 to v5, or fixing object syntax required errors, query callbacks removed issues, cacheTime renamed to gcTime, isPending vs isLoading confusion, keepPreviousData removed problems.
document-processor-api
IncludedProcess documents with Nutrient DWS. Use when the user wants to generate PDFs from HTML or URLs, convert Office/images/PDFs, assemble or split packets, OCR scans, extract text/tables/key-value pairs, redact PII, watermark, sign, fill forms, optimize PDFs, or produce compliance outputs like PDF/A or PDF/UA. Triggers include convert to PDF, merge these PDFs, OCR this scan, extract tables, redact PII, sign this PDF, make this PDF/A, or linearize for web delivery.
nutrient-document-processing
IncludedProcess documents with Nutrient DWS. Use when the user wants to generate PDFs from HTML or URLs, convert Office/images/PDFs, assemble or split packets, OCR scans, extract text/tables/key-value pairs, redact PII, watermark, sign, fill forms, optimize PDFs, or produce compliance outputs like PDF/A or PDF/UA. Triggers include convert to PDF, merge these PDFs, OCR this scan, extract tables, redact PII, sign this PDF, make this PDF/A, or linearize for web delivery.
tanstack-query
IncludedManage server state in React with TanStack Query v5. Covers useMutationState, simplified optimistic updates, throwOnError, network mode (offline/PWA), and infiniteQueryOptions. Use when setting up data fetching, fixing v4โv5 migration errors (object syntax, gcTime, isPending, keepPreviousData), or debugging SSR/hydration issues with streaming server components.
accelint-nextjs-best-practices
IncludedNext.js performance optimization and best practices. Use when writing Next.js code (App Router or Pages Router); implementing Server Components, Server Actions, or API routes; optimizing RSC serialization, data fetching, or server-side rendering; reviewing Next.js code for performance issues; fixing authentication in Server Actions; or implementing Suspense boundaries, parallel data fetching, or request deduplication.