Skills
Skill 20 of 32
Initialize a new Webflow Code Components project from scratch. Creates project structure, installs dependencies, configures webflow.json, and sets up development environment.
2 minutes · 444 words · 14 sections
Install
npx skills add webflow/webflow-skills --skill webflow-code-component:local-dev-setupnpx skills add webflow/webflow-skills/plugin marketplace add webflow/webflow-skillsThe first command installs just this skill, by the name in its SKILL.md; the second installs the whole repository.
Set up a new Webflow Code Components project from scratch.
Use when:
Do NOT use when:
Check if project exists:
Determine setup type:
Create project structure (if new):
Install dependencies:
Create webflow.json:
Configure TypeScript:
Create example component:
Create globals file (optional):
Verify bundle compiles:
npx webflow library bundle --public-path http://localhost:4000/ to catch build errors locallynpx webflow library shareProvide next steps:
For detailed step-by-step examples, see references/EXAMPLES.md (opens in a new tab).
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/ButtonThen create your component files (.tsx, .webflow.tsx, .module.css). See Example 1 in references/EXAMPLES.md (opens in a new tab) for complete file contents including component, definition, and CSS files.
Deploy with:
npx webflow library shareAfter 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
└── .gitignorenpm run dev)npx webflow library shareplugins/webflow-skills/skills/local-dev-setup/SKILL.mdmain, last pushed 21 September 2026.SKILL.md, not by matching a directory convention. One layout observed: plugins/webflow-skills/skills/*/SKILL.md.h1 and no skipped levels:.claude-plugin/marketplace.json by Webflow, declaring 1 plugin. It is read for editorial metadata only — never as the skill index, which is always the repository tree./webflow/webflow-skills.md, and each skill at its own .md URL.1 file · 10 KB
Everything this skill ships beside its prose. All of it is set here, as a subchapter of skill 20.
Documentation the agent loads on demand, rather than up front.