webflow/webflow-code-component:local-dev-setup
Initialize a new Webflow Code Components project from scratch. Creates project structure, installs dependencies, configures webflow.json, and sets up development environment.
npx skills add https://github.com/webflow/webflow-skills --skill webflow-code-component:local-dev-setup
Set up a new Webflow Code Components project from scratch.
Use when:
Do NOT use when:
npx webflow library bundle --public-path http://localhost:4000/ to catch build errors locallynpx webflow library share10. Provide next steps:
For detailed step-by-step examples, see references/EXAMPLES.md.
Available examples:
Quick Start (New Project):
# 1. Create project
mkdir my-webflow-components && cd my-webflow-components
npm init -y
# 2. Install dependencies
npm install react react-dom
npm install -D typescript @types/react @types/react-dom
npm install -D @webflow/webflow-cli @webflow/data-types @webflow/react
# 3. Create webflow.json
echo '{"library":{"name":"My Library","components":["./src/**/*.webflow.tsx"]}}' > webflow.json
# 4. Create component directory
mkdir -p src/components/Button
Then create your component files (.tsx, .webflow.tsx, .module.css). See Example 1 in references/EXAMPLES.md for complete file contents including component, definition, and CSS files.
Deploy with:
npx webflow library share
After setup, verify the project is correctly configured:
| Check | How to Verify |
|-------|---------------|
| webflow.json exists in project root | cat webflow.json |
| Dependencies installed | npm list @webflow/webflow-cli |
| Bundle compiles without errors | npx webflow library bundle --public-path http://localhost:4000/ |
| At least one component found | Check bundle output for "Found N component(s)" |
Every code components project needs:
.webflow.tsx fileproject/
├── src/
│ ├── components/
│ │ └── [ComponentName]/
│ │ ├── [ComponentName].tsx
│ │ ├── [ComponentName].webflow.tsx
│ │ └── [ComponentName].module.css
│ ├── hooks/ # Custom hooks
│ ├── utils/ # Utilities
│ ├── declarations.d.ts # CSS module types
│ ├── globals.ts # Decorators/global imports
│ └── globals.css # Global styles
├── package.json
├── tsconfig.json
├── webflow.json
└── .gitignore
npm run dev)npx webflow library shareTake webflow/webflow-code-component:local-dev-setup from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference npm, npx.
Without those the skill loads but fails at the first command.