Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

migrate-styled-components-to-vanilla-extract

Skill by sanity-io

Guides an assistant through migrating a Sanity workspace from styled-components to vanilla-extract, a zero-runtime CSS library. It is aimed at developers who maintain Sanity Studio plugin workspaces.

  • Score 55
  • 21 stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install migrate-styled-components-to-vanilla-extract

Built from the published package, never by AI.

git clone --depth 1 https://github.com/sanity-io/plugins /tmp/plugins && mkdir -p ~/.claude/skills && cp -r /tmp/plugins/.agents/skills/migrate-styled-components-to-vanilla-extract ~/.claude/skills/migrate-styled-components-to-vanilla-ext

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install migrate-styled-components-to-vanilla-extract in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill is a step-by-step procedure for moving a workspace's styling off styled-components and onto vanilla-extract. It covers inventorying styled-components usage, classifying each usage into a migration target, and converting components to colocated .css.ts files. It also covers switching the tsdown build config, updating package.json dependencies, and registering the Vite plugin for Vitest.

The procedure ends with a build, an exports snapshot update, and a pre-PR check suite that includes format, lint, knip, build and tests. It also asks for a manual visual comparison against the original rendering and a patch changeset. The skill points to the sanity-plugin-best-practices styling reference for pattern details and is intended for developers migrating Sanity workspaces.

Written from the project's SKILL.md and checked against it.

What it can do

  • InventoryFinds every styled-components usage in a workspace and classifies it before changes.
  • Code migrationConverts styled components into style() rules in colocated .css.ts files.
  • Build configSwaps styledComponents for vanillaExtract in tsdown.config.ts.
  • Dependency updatesAdds vanilla-extract dev dependencies and removes styled-components entries.
  • Vitest setupRegisters the vanilla-extract Vite plugin in vitest.config.ts.
  • Build and snapshotBuilds dist/bundle.css and updates the package-exports inline snapshot.
  • VerificationRuns format, lint, knip, build and tests, plus a manual visual fidelity check.
  • ChangesetAdds a patch changeset for the migrated workspace.

What you need

  • pnpm
  • A Sanity workspace that uses styled-components
  • tsdown build config
  • Vitest

Try asking

  • Migrate this workspace's styling from styled-components to vanilla-extract
  • Inventory all styled-components usage in my workspace src folder
  • Convert the styled Card wrapper into a .css.ts file with a thin component

Good to know

  • Identical visual output is the goal, so it is a refactor and not a redesign.
  • Monorepo policy such as one plugin per PR lives in AGENTS.md, not in this skill.
  • Pattern details are deferred to the sanity-plugin-best-practices styling reference.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: .agents/skills/migrate-styled-components-to-vanilla-extract/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to migrate-styled-components-to-vanilla-extract

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

migrate-styled-components-to-vanilla-extract: common questions

Does this skill explain vanilla-extract patterns in full?

Not in full. It covers the workflow and points to the sanity-plugin-best-practices styling reference for pattern details like variants and keyframes.

Should I remove the styled-components devDependency?

Only if pnpm does not fork the sanity or @sanity/ui resolution in pnpm-lock.yaml. If it forks, the source says to keep the catalog devDependency.

Where does the migrated CSS end up after a build?

The tsdown integration extracts .css.ts rules into dist/bundle.css and writes a ./bundle.css entry in package.json exports.

How do I install migrate-styled-components-to-vanilla-extract?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is migrate-styled-components-to-vanilla-extract free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is migrate-styled-components-to-vanilla-extract safe to use?

It scores 55 of 100. Grades: maintenance A, licence A, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to migrate-styled-components-to-vanilla-extract?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

migrate-styled-components-to-vanilla-extract Install

Add to stack

Loading.