accessibility-audit
Run comprehensive accessibility audit (WCAG 2.1) on Webflow pages - checks buttons, forms, links, focus states, headings,…
Audit Webflow Code Components for architecture decisions - prop exposure, state management, slot opportunities, and Shadow DOM compatibility. Focused on Webflow-specific patterns, not generic React best practices.
$ npx -y skills add webflow/webflow-skills --skill component-audit --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/component-auditContext preview
The summary Claude sees to decide when to auto-load this skill.
Audit Webflow Code Components for architecture decisions - prop exposure, state management, slot opportunities, and Shadow DOM compatibility. Focused on Webflow-specific patterns, not generic React best practices.
name: webflow-code-component:component-audit description: Audit Webflow Code Components for architecture decisions - prop exposure, state management, slot opportunities, and Shadow DOM compatibility. Focused on Webflow-specific patterns, not generic React best practices. compatibility: Node.js 18+, React 18+, TypeScript, @webflow/webflow-cli metadata: author: webflow version: "2.0"
Audit existing code components for **Webflow-specific architecture decisions**. This skill focuses on how well components integrate with Webflow Designer, not generic React best practices.
**Use when:**
**Do NOT use when:**
This audit answers three questions:
1. **Designer Control**: Are the right things exposed as props for designers to customize? 2. **Webflow Compatibility**: Does the component work within Webflow's constraints (Shadow DOM, SSR, isolated React roots)? 3. **Component Architecture**: Is this the right level of granularity, or should it be split/combined?
1. **Find all components**:
2. **Understand intent**: Ask user what the components are for and any specific concerns
For each component, analyze these Webflow-specific areas:
**Goal**: Identify what designers SHOULD be able to control but currently can't.
| Look For | Recommendation | |----------|----------------| | Hardcoded text strings | Expose as `props.Text()` | | Text that designers should edit on canvas | Expose as `props.RichText()` | | Hardcoded values from a fixed set of options | Expose as `props.Variant({ options: [...] })` | | Hardcoded image URLs | Expose as `props.Image()` | | Hardcoded link URLs | Expose as `props.Link()` | | Hardcoded HTML `id` attributes | Expose as `props.Id()` | | Conditional rendering with boolean | Expose as `props.Boolean()` or `props.Visibility()` | | Internal state that affects appearance | Consider exposing initial value as prop | | `children` not using Slot | Convert to `props.Slot()` |
> **Aliases:** `props.String` = `props.Text`, `props.Children` = `props.Slot`. Treat these as equivalent during audit.
**Questions to ask:**
**Goal**: Identify patterns that won't work in Webflow.
| Anti-Pattern | Why It Fails | Alternative | |--------------|--------------|-------------| | React Context for cross-component state | Each component has isolated React root | Use nano stores, custom events, or URL params | | Prop drilling through Slots | Slot children are separate React apps | Use nano stores or custom events | | Shared state via module-level variables | May cause SSR issues | Use browser storage or nano stores | | Global event listeners without cleanup | Memory leaks, SSR issues | Use useEffect with cleanup |
**Refactoring recommendations:**
**Goal**: Identify hardcoded content that should be designer-controlled.
| Current Pattern | Better Pattern | |-----------------|----------------| | Hardcoded button inside card | Slot for actions area | | Hardcoded icon component | Slot or Image prop | | Fixed header/footer structure | Slots for header and footer | | Hardcoded list items | Consider if this should be multiple components |
**When NOT to use Slots:**
**Goal**: Ensure styles work in isolation.
| Issue | Detection | Fix | |-------|-----------|-----| | Using site/global CSS classes | Class names like `.container`, `.btn` | Use CSS Modules or component-scoped styles | | CSS-in-JS not configured | styled-components/Emotion without decorator | Add globals.ts with `styledComponentsShadowDomDecorator` (styled-components) or `emotionShadowDomDecorator` (Emotion/MUI) | | Missing style imports | Styles defined but not imported in .webflow.tsx | Add import statement | | Relying on inherited styles | Expecting parent styles to cascade | Use explicit styles or CSS variables | | Needs tag selectors (h1, p, etc.) | Tags not styled inside Shadow DOM | Enable `applyTagSelectors: true` in component options |
> **SSR Note:** When using styled-components or Emotion, you must also configure the server renderer in `webflow.json` for SSR to work correctly: > - styled-components: `"library": { "renderer": { "server": "@webflow/styled-components-utils/server" } }` > - Emotion: `"library": { "renderer": { "server": "@webflow/emotion-utils/server" } }`
**Goal**: Identify browser-only code that runs during render.
| Pattern | Problem | Solution | |---------|---------|----------| | `window.innerWidth` in render | SSR error | Use useEffect or set `ssr: false` | | `document.getElementById` in render | SSR error | Use useEffect or refs | | `localStorage.getItem` outside useEffect | SSR error | Wrap in useEffect with useState | |
A collection of Agent Skills for working with Webflow sites through the Webflow MCP server. Manage CMS content, audit site health, optimize assets, build in Webflow Designer, create Code Components, run Webflow CLI workflows, and safely publish changes.
Run comprehensive accessibility audit (WCAG 2.1) on Webflow pages - checks buttons, forms, links, focus states, headings,…
Analyze assets on a Webflow site for SEO optimization. Identifies assets missing alt text and assets with non-SEO-friendly names,…
Create or update multiple CMS items in a Webflow collection with validation and diff preview. Use when adding multiple blog…
Create GitHub-source Webflow Cloud apps and monitor, troubleshoot, or manage existing apps through Webflow MCP. Use when creating…
Expert guidance on Webflow CMS architecture and best practices. Use when planning collections, setting up relationships,…
Create a new CMS collection in Webflow with specified fields and relationships. Use when setting up blog posts, products, team…