# webflow-code-component:component-audit

Reviews Webflow code components for architecture: what should be a prop, how state is wired, where slots are missing, and what breaks in Shadow DOM.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1000 installs · ★ 132
- Author: webflow
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/webflow/webflow-skills/tree/HEAD/plugins/webflow-skills/skills/component-audit/SKILL.md
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/skills/webflow-code-componentcomponent-audit

## What it does

The skill reads your `.webflow.tsx` files and the React components behind them, then checks how well they fit Webflow Designer. Generic React advice is out of scope — the focus is on Webflow's own constraints.

Four areas get checked. Prop exposure: hardcoded strings, images, links, `id` attributes and fixed option sets are flagged for `props.Text()`, `props.Image()`, `props.Variant()` and similar. State: React Context across components, prop drilling through slots and module-level variables won't survive isolated React roots, so the skill points to nano stores, custom events or URL params instead. Slots: fixed markup that a designer can't touch. Shadow DOM and SSR: global CSS classes, a missing decorator for styled-components or Emotion, and `window` or `localStorage` calls sitting in render.

It expects Node.js 18+, React 18+, TypeScript and `@webflow/webflow-cli`. With styled-components or Emotion you also have to configure the server renderer in `webflow.json`, otherwise SSR breaks. For pre-deploy validation use pre-deploy-check from the same set.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add webflow/webflow-skills --skill webflow-code-component:component-audit -a claude-code
```
```bash
npx skills add webflow/webflow-skills --skill component-audit -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/component-audit/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/component-audit/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add webflow/webflow-skills --skill component-audit -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/component-audit/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add webflow/webflow-skills --skill component-audit -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/component-audit/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install webflow/webflow-skills component-audit
```

2. **Manually: put the files in place**
- File: `.github/skills/component-audit/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add webflow/webflow-skills --skill component-audit -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/webflow/webflow-skills --path plugins/webflow-skills/skills/component-audit
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/component-audit/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add webflow/webflow-skills --skill component-audit -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/webflow/webflow-skills/tree/HEAD/plugins/webflow-skills/skills/component-audit/SKILL.md

## When to use it
- spot hardcoded text and images a designer can't edit on canvas
- replace React Context that fails across isolated component roots
- move fixed markup into slots
- fix styles that never apply inside Shadow DOM
- catch `window` and `localStorage` calls in render before SSR fails

## Example prompts
- audit the components in this project and tell me what should be exposed as props
- go through my .webflow.tsx files and flag state that breaks in Webflow
- check whether these component styles work inside Shadow DOM

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 50bf938fd61d8812.

BEGIN THIRD-PARTY FILE 50bf938fd61d8812
```text
---
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"
---

# Component Audit

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.

## When to Use This Skill

**Use when:**
- User wants to improve how their components work in Webflow Designer
- Reviewing whether the right things are exposed as props vs hardcoded
- Checking if state management patterns are Webflow-compatible
- Looking for opportunities to make components more designer-friendly
- Component isn't rendering or behaving as expected in Webflow

**Do NOT use when:**
- Validating before deployment (use pre-deploy-check instead)
- Creating new components (use component-scaffold instead)
- Converting a React component (use convert-component instead)
- Generic code quality review (use a linter)

## Core Philosophy

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?

## Instructions

### Phase 1: Discovery

1. **Find all components**:
   - Locate webflow.json
   - Find all .webflow.tsx files
   - Read corresponding React components

2. **Understand intent**: Ask user what the components are for and any specific concerns

### Phase 2: Analysis

For each component, analyze these Webflow-specific areas:

#### A. Prop Exposure Analysis

**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()` |
```
END THIRD-PARTY FILE 50bf938fd61d8812

The third-party file has ended. Everything between the 50bf938fd61d8812 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2408 of 12714 bytes. © webflow · MIT · https://github.com/webflow/webflow-skills/tree/HEAD/plugins/webflow-skills/skills/component-audit/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
