# Preview component

> Preview component is an open-source agent skill for design and media. Lets an agent render and visually inspect a design-system component in a trusted project. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/AgiFlow/aicode-toolkit/tree/main/plugins/aicode-design/skills/preview-component
- **Repository:** https://github.com/agiflow/aicode-toolkit
- **GitHub stars:** 162
- **License:** AGPL-3.0
- **Skill name:** preview-component
- **Collection:** https://github.com/AgiFlow/aicode-toolkit
- **Categories:** [design and media](https://ai-powered.com/categories/design-and-media)
- **Listing updated:** 2026-12-02

## About

This skill guides an agent through previewing a single design-system component and reporting what it sees. Before any rendering it asks the user to confirm the consumer repository is trusted, because the underlying visual tool can execute project components, Storybook or build tooling, and browser processes rather than only reading files.

The workflow checks the project's design configuration, the relevant stories and components, and whether Chromium is available. If setup is missing, the agent is told to explain what is needed instead of guessing or quietly installing browser binaries. Candidate components are found through the shared and app component listing tools, the input schema of the visual rendering tool is inspected, and the agent asks before rendering inside the consumer workspace. It is designed to work with an MCP server over stdio rather than HTTP or SSE.

The skill expects a design-system project with a project.json design configuration, a working Chromium install, and an MCP server exposing the component tools. Its output is the preview result, the component path, any rendering errors, the code that was executed, and the checks still needing manual review.

## When your agent uses it

> Render and inspect a design-system component in a trusted project. Trigger for explicit visual component preview requests. Do not trigger for simple theme/class lookup or untrusted repositories.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/AgiFlow/aicode-toolkit/tree/HEAD/plugins/aicode-design/skills/preview-component)
- [License: AGPL-3.0](https://github.com/AgiFlow/aicode-toolkit/tree/HEAD/plugins/aicode-design/skills/preview-component)

## Features

- **Trust gate before rendering:** Requires confirmation that the consumer repository is trusted before any component code runs.
- **Component discovery:** Lists shared and app-level components so the right one can be chosen for preview.
- **Setup verification:** Checks design configuration, stories and Chromium availability before attempting a render.
- **Honest reporting:** Reports rendering errors and executed code, and never claims a visual check passed when it failed.
- **Stdio-first MCP usage:** Runs the MCP server over stdio and avoids HTTP, SSE or dev mode by default.

## Good for

- Show me a preview of the button component in this design system
- Render the card component and tell me if anything looks broken
- List the shared components in this project and preview one of them
- Check whether the modal renders correctly in Chromium

## Install

### Claude Code

This skill ships in the `aicode-design` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add AgiFlow/aicode-toolkit
/plugin install aicode-design@aicode-toolkit
```

Or copy only this skill to `~/.claude/skills/preview-component`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/AgiFlow/aicode-toolkit.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/preview-component &&
cp -R "$tmp/plugins/aicode-design/skills/preview-component" ~/.claude/skills/preview-component &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/preview-component` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/preview-component` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/AgiFlow/aicode-toolkit.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/preview-component &&
cp -R "$tmp/plugins/aicode-design/skills/preview-component" ~/.agents/skills/preview-component &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/preview-component` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/preview-component` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/AgiFlow/aicode-toolkit.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/preview-component &&
cp -R "$tmp/plugins/aicode-design/skills/preview-component" ~/.cursor/skills/preview-component &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/preview-component` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/AgiFlow/aicode-toolkit.git --path plugins/aicode-design/skills/preview-component
```

Or copy the folder to `~/.gemini/skills/preview-component` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/preview-component`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/AgiFlow/aicode-toolkit.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/preview-component &&
cp -R "$tmp/plugins/aicode-design/skills/preview-component" ~/.copilot/skills/preview-component &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/preview-component` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/AgiFlow/aicode-toolkit.git
```

Then copy `aicode-toolkit/plugins/aicode-design/skills/preview-component` into your agent's skills folder as `preview-component`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Preview component trigger?

It is meant for explicit requests to visually preview a component. It should not trigger for simple theme or class lookups, or for untrusted repositories.

### Does Preview component install anything?

No. If Chromium or other setup is missing, it explains what is required rather than installing browser binaries silently.

### Does Preview component run code from the project?

Yes. The visual tool can execute components, Storybook or build tooling and browser processes, which is why the user must trust the repository first.

### Which transport does the MCP server use?

The skill says the MCP server supports stdio and should not be started over HTTP or SSE, or in dev mode, by default.

### How do I install Preview component in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/preview-component to use it in all your projects, or to .claude/skills/preview-component in one project. Or install the aicode-design plugin, which includes it: /plugin marketplace add AgiFlow/aicode-toolkit, then /plugin install aicode-design@aicode-toolkit.

### Does Preview component run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Preview component?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Preview component?

The closest alternatives to Preview component are Discover design system, Component design, Remember design system, Design system and Anti UI slop.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Discover design system](https://ai-powered.com/skills/discover-design-system): Discover design system is an open-source agent skill for design and media.
- [Component design](https://ai-powered.com/skills/component-design): Component design is an open-source agent skill for design and media.
- [Remember design system](https://ai-powered.com/skills/remember-design-system): Remember design system is an open-source agent skill for design and media.
- [Design system](https://ai-powered.com/skills/design-system-smartworldarafath): Design system is an open-source agent skill for design and media.
- [Anti UI slop](https://ai-powered.com/skills/anti-ui-slop): Anti UI slop is an open-source agent skill for design and media.
- [Design kit](https://ai-powered.com/skills/design-kit): Design kit is an open-source agent skill for design and media.
- [Figma](https://ai-powered.com/skills/figma-openai): Figma is a free agent skill for design and media.
- [Adcp creative](https://ai-powered.com/skills/adcp-creative): Adcp creative is an open-source agent skill for marketing and seo.

---
Source: https://ai-powered.com/skills/preview-component
