webflow/webflow-skills/pre-deploy-check

Claude Code and agent skill by webflow/webflow-skills

Trust tier 2
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"},{"type":"config","description":"Configuration overrides"},{"type":"context","description":"Custom context provider definitions"}]
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Pre-deployment validation for Webflow Code Components. Checks bundle size, dependencies, prop configurations, SSR compatibility, styling setup, and common issues before running webflow library share.

Install

npx vskill@latest install webflow/webflow-skills/pre-deploy-check

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as webflow/webflow-skills/pre-deploy-check.

Build Validate

Validate code components before deployment to catch issues early.

When to Use This Skill

Use when:

  • User is about to deploy and wants to check for issues first
  • Proactively before running webflow library share
  • User asks to validate, check, or verify their components
  • After making significant changes to components

Do NOT use when:

  • Deployment already failed (use troubleshoot-deploy instead)
  • Just building for local development
  • Auditing code quality (use component-audit instead)

Instructions

Phase 1: Project Structure Check
  1. Verify webflow.json exists:
  • Check for required fields (library.name, library.components)
  • Validate glob pattern matches component files — the recommended pattern is "./src/**/*.webflow.@(js|jsx|mjs|ts|tsx)" covering all supported extensions
  • Check globals path if specified — file must exist and be importable
  • Check bundleConfig path if specified — file must exist
  1. Check dependencies:
  • Verify @webflow/webflow-cli installed
  • Verify @webflow/data-types installed
  • Verify @webflow/react installed
  • Check for version compatibility (check installed versions, don't assume specific versions)
  1. Verify component files:
  • Find all .webflow.tsx / .webflow.ts files matching the glob pattern
  • Ensure matching React components exist
  • Check for orphaned definition files
  1. Validate imports in `.webflow.tsx` files:
  • Must import declareComponent from @webflow/react
  • Must import props from @webflow/data-types (if props are defined)
  • Must import the actual React component being declared
Phase 2: Component Analysis
  1. For each component, check:
  • declareComponent is called with the component and a config object
  • name is provided in the config
  • All props have name properties and appropriate defaultValue where applicable
  • Prop types are valid — the 11 supported types are:
  • Text (alias: String) — single line text input
  • RichText — multi-line text with formatting
  • TextNode — single/multi-line text editable on canvas
  • Link — URL input (returns { href, target, preload } object)
  • Image — image upload and selection
  • Number — numeric input
  • Boolean — true/false toggle
  • Variant — dropdown with predefined options (requires options array)
  • Visibility — show/hide controls
  • Slot — content areas for child components
  • ID — HTML element ID
  1. Validate component options:
  • If options object is present, validate:
  • applyTagSelectors is a boolean (default: false) — enables site tag selectors in Shadow DOM
  • ssr is a boolean (default: true) — controls server-side rendering
  1. Check for SSR issues:
  • Scan for browser-only API usage outside of useEffect or guarded blocks:
  • window, document, localStorage, sessionStorage, navigator
  • Flag dynamic/personalized content patterns (user-specific dashboards, authenticated views)
  • Flag heavy/interactive UI that doesn't benefit from SSR (charts, 3D scenes, maps, animation-heavy elements)
  • Flag non-deterministic output (random numbers, time-based values that differ server vs client)
  • Suggest ssr: false in options if component is purely interactive or browser-dependent
  1. Check styling:
  • Verify styles are imported in .webflow.tsx or via globals file
  • Check for site class usage — site classes do NOT work in Shadow DOM
  • Site variables DO work: var(--variable-name, fallback)
  • Inherited CSS properties DO work: font-family: inherit
  • Tag selectors work IF applyTagSelectors: true is set in component options
  • Validate CSS-in-JS setup if used (see CSS-in-JS detection below)
  1. Check for Shadow DOM + React Context issues:
  • If a component uses slots (props.Slot) AND imports/uses useContext or a Context Provider:
  • Warn that parent and child components in slots cannot share React Context — each child renders in its own Shadow DOM with a separate React root
  • Suggest alternatives: Nano Stores, custom events, URL parameters, or browser storage
Phase 3: Build Test
  1. Run TypeScript/build check:
  • Check for TypeScript compilation errors
  • Verify all imports resolve correctly
  • Identify any build-time issues
  1. Check bundle size:
  • If a build output exists, verify total bundle size is under 50MB (maximum bundle limit)
  • If over limit, flag as error and suggest optimization
  1. Run local bundle test (optional, suggest to user):
  • Suggest running npx webflow library bundle --public-path http://localhost:4000/ to test bundling before sharing
  • If bundling issues occur, suggest --debug-bundler flag to inspect the final webpack config
Phase 4: Detect Framework-Specific Setup
  1. CSS-in-JS library detection:
  • If project uses styled-components: verify @webflow/styled-components-utils is installed and styledComponentsShadowDomDecorator is exported from globals decorators array
  • If project uses Emotion or Material UI (@emotion/styled, @emotion/react, @mui/material): verify @webflow/emotion-utils is installed and emotionShadowDomDecorator is exported from globals decorators array
  1. Tailwind CSS detection:
  • If project uses Tailwind CSS (tailwindcss in dependencies):
  • Verify @tailwindcss/postcss is installed
  • Verify postcss.config.mjs exists with @tailwindcss/postcss plugin
  • Verify Tailwind CSS is imported in globals file (e.g., @import "tailwindcss" in globals.css)
  1. Sass/Less preprocessor detection:
  • If project uses Sass (.scss files or sass in dependencies): verify sass and sass-loader are installed, and a webpack config adds the .scss rule
  • If project uses Less (.less files or less in dependencies): verify less and less-loader are installed, and a webpack config adds the .less rule
  • For either: verify bundleConfig is set in webflow.json pointing to the webpack config
  1. Webpack custom config validation (if bundleConfig is specified):
  • Verify the file exists at the specified path
  • Verify it uses CommonJS exports (module.exports)
  • Warn if it attempts to override blocked properties: entry, output, target (these are silently filtered out)
  • Verify module.rules uses function syntax (currentRules) => { ... }, not an array
Phase 5: Report Results
  1. Generate validation report:
  • List all checks performed
  • Show passed/failed/warning status
  • Provide fix suggestions for failures
  • Indicate deployment readiness

Validation Checks

Required Checks
CheckSeverityDescription
webflow.json existsErrorRequired for CLI
Dependencies installedError@webflow/webflow-cli, @webflow/data-types, @webflow/react
Component files existErrorReact + definition files present
declareComponent calledErrorRequired in .webflow.tsx with correct imports
Valid prop typesErrorOnly the 11 supported types (Text/String, RichText, TextNode, Link, Image, Number, Boolean, Variant, Visibility, Slot, ID)
Build succeedsErrorNo compilation errors
Bundle size < 50MBErrorMaximum bundle limit enforced by Webflow
Warning Checks
CheckSeverityDescription
Props have defaultsWarningBetter designer experience
SSR compatibilityWarningBrowser APIs, dynamic content, heavy UI, non-deterministic output
Styles importedWarningStyles may not appear in Shadow DOM
Site class usageWarningSite classes don't work in Shadow DOM — use component-specific classes
Shadow DOM + ContextWarningSlots prevent React Context sharing between parent/child
CSS-in-JS decoratorWarningstyled-components/Emotion need Shadow DOM decorators
Tailwind setupWarningMissing postcss config or globals import
Sass/Less setupWarningMissing loaders or webpack config
Webpack blocked propsWarningentry, output, target overrides are silently ignored
Webpack rules formatWarningMust use function syntax, not array
Component optionsWarningapplyTagSelectors and ssr must be booleans
Glob pattern coverageWarningPattern should cover all supported extensions (.js, .jsx, .mjs, .ts, .tsx)
bundleConfig fileWarningFile must exist if specified in webflow.json
Info Checks
CheckSeverityDescription
Component countInfoNumber of components
Prop countInfoProps per component
Bundle sizeInfoCurrent bundle size vs 50MB limit
Frameworks detectedInfoCSS-in-JS, Tailwind, Sass/Less usage

Examples

User prompt:

Check if my components are ready to deploy

Response:

🔍 Build Validation: My Component Library
Running pre-deployment checks...
---
## Project Structure
✅ webflow.json found
✅ library.name: "My Component Library"
✅ library.components: "./src/**/*.webflow.@(js|jsx|mjs|ts|tsx)"
✅ globals: "./src/globals.ts"
✅ bundleConfig: not specified (using defaults)
---
## Dependencies
✅ @webflow/webflow-cli: installed
✅ @webflow/data-types: installed
✅ @webflow/react: installed
✅ react: installed
✅ typescript: installed
---
## Frameworks Detected
✅ Tailwind CSS detected
✅ @tailwindcss/postcss installed
✅ postcss.config.mjs found
✅ globals.css imports Tailwind
---
## Components Found (4)
### 1. Button ✅
- File: src/components/Button/Button.webflow.tsx
- Imports: ✅ declareComponent, ✅ props, ✅ Button component
- Props: label (Text), variant (Variant), disabled (Boolean)
- All props have defaults ✅
- SSR compatible ✅
- Options: applyTagSelectors: true ✅
- Styles imported ✅
### 2. Card ✅
- File: src/components/Card/Card.webflow.tsx
- Imports: ✅ declareComponent, ✅ props, ✅ Card component
- Props: title (Text), image (Image), content (RichText), link (Link)
- All props have defaults ✅
- SSR compatible ✅
- Styles imported ✅
### 3. Modal ⚠️
- File: src/components/Modal/Modal.webflow.tsx
- Imports: ✅ declareComponent, ✅ props, ✅ Modal component
- Props: title (Text), isOpen (Boolean), content (Slot)
- All props have defaults ✅
- ⚠️ SSR Issue: Uses `document.body` in render
→ Suggestion: Add `ssr: false` to options or wrap in useEffect
- Styles imported ✅
### 4. CartIcon ⚠️
- File: src/components/CartIcon/CartIcon.webflow.tsx
- Imports: ✅ declareComponent, ✅ CartIcon component
- Props: none
- ⚠️ Missing props - component has no editable properties
→ Suggestion: Consider adding props for designer customization
- ⚠️ Uses localStorage without SSR guard
→ Suggestion: Wrap in useEffect or useState initializer
- Styles imported ✅
---
## Build Test
✅ Build completed successfully
✅ No TypeScript errors
✅ No webpack errors
✅ Bundle size: 2.3MB / 50MB limit
---
## Summary
| Category | Status |
|----------|--------|
| Project Structure | ✅ Pass |
| Dependencies | ✅ Pass |
| Frameworks | ✅ Pass |
| Components | ⚠️ 2 warnings |
| Build | ✅ Pass |
---
## Ready to Deploy: ⚠️ WITH WARNINGS
You can deploy, but consider fixing these issues:
1. **Modal SSR Issue**
Add to Modal.webflow.tsx:
```typescript
options: {
ssr: false
}
```
2. **CartIcon localStorage Usage**
Update CartIcon.tsx:
```typescript
const [count, setCount] = useState(() => {
if (typeof window === "undefined") return 0;
return parseInt(localStorage.getItem("cartCount") || "0");
});
```
---
💡 To deploy: `npx webflow library share`
💡 To test locally first: `npx webflow library bundle --public-path http://localhost:4000/`

Example: Build Failure

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
120
Repository forks
18
7-day trend score
24

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 19 Mar 2026, 8 months ago.

Extension points

  • hookPre/post lifecycle hooks
  • configConfiguration overrides
  • contextCustom context provider definitions

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/webflow/webflow-skills/pre-deploy-check/badge)](https://verified-skill.com/skills/webflow/webflow-skills/pre-deploy-check)

Something wrong with this skill or its page? Tell us.