# Claude Code Plugin

> Install the Infa plugin for Claude Code to wireframe, document components, snapshot and preview, publish session recaps, and connect the Infa MCP — all from your terminal.

Source: https://infa.ai/docs/claude-plugin

The **Infa plugin for Claude Code** is your Infa advocate in the terminal. It bundles skills, agents, hooks, and the Infa MCP server so you can document and visualize your design system without leaving Claude Code. It works with any component library — Carbon, Material UI, Chakra, Radix, or your own.

## What you get

- **Skills**: /-commands for snapshots, wireframes, board setup, session recaps, and a setup check
- **Agents**: Autonomous reviewers and bulk-snapshot agents for your components
- **Hooks**: Edit-time guardrails: import compliance, type-check, story reminders
- **MCP server**: The Infa MCP, bundled and OAuth-connected — or run it standalone

## Install

### From the Infa marketplace

```bash
claude plugin marketplace add infa-ai/Infa-Claude-Plugin
claude plugin install infa@infa
```

Then run `/reload-plugins` (or restart `claude`) and verify with `/infa:help`. The same flow is available interactively via the `/plugin` menu.

### Local development

To work on the plugin from a local checkout:

```bash
claude --plugin-dir /path/to/Infa-Claude-Plugin
```

Run `/reload-plugins` after edits and `claude plugin validate .` to check the manifest.

## Connect the Infa MCP

The plugin **bundles the Infa MCP server**, so the moment you enable the plugin it connects to `https://infa.ai/api/mcp` via `mcp-remote`. Authentication is **OAuth 2.1** — your browser opens to authorize on first use. No token, no extra setup.

The Infa MCP needs an Infa account. The Infa CLI does not: without an account, `npx infa preview` opens your repo's docs on a local board at `infa.ai/local`, and `/infa:setup` offers that path first. See [No account needed](https://infa.ai/docs/infa-cli-installation#no-account-needed).

Prefer to connect the Infa MCP **standalone** (one connection shared across Cursor, Claude Desktop, and Claude Code)? Use the one-click installer in [Profile → Integrations](https://infa.ai/profile?tab=integrations), or follow the [MCP Server guide](https://infa.ai/docs/mcp). The plugin's skills use whichever connected Infa MCP is available.

**Avoid duplicates**
If you connect the Infa MCP both standalone and via the plugin, you'll have two copies of the same tools. Disable one — the plugin's server appears as `plugin:infa:infa` — to keep things tidy.

## Verify your setup

```
/infa:help
```

`/infa:help` confirms the Infa MCP is connected **and authenticated** (by listing your boards) and that the `infa` CLI is available and signed in — with a one-line fix for anything that's missing. If you have no Infa account yet, it says so and points you to the local board rather than reporting an error. Other skills point you here when they hit a connection or auth issue.

## Skills

| Skill | What it does |
|-------|--------------|
| `/infa:help` | Setup check — MCP connected + authenticated, CLI available |
| `/infa:recap` | Publish a recap of the current session to Infa: a plain-English summary + screenshots of the result. One paper per session |
| `/component-snapshot` | Render a component, upload a screenshot, create an anatomy paper |
| `/component-preview` | Capture and iterate on component variants |
| `/wireframe` | Create and iterate on ASCII wireframes on a board |
| `/infa:apps` | Build an App: write it as an `.app.html` file, preview it locally with `infa preview`, then put it on a board or open it in a chat. See [Building Apps and App Blocks](https://infa.ai/docs/building) |
| `/board-setup` | Bootstrap a board with standard sections and anatomy papers |
| `/board-share` | Prepare a board for stakeholder sharing |
| `/paper-from-code` | Generate a board paper directly from a source file |
| `/ds-audit` | Audit your design system for tokens, coverage, naming, and a11y |
| `/component-consolidation` | Find near-duplicate components and plan a safe migration |
| `/infa-onboarding` | Getting started with Infa: concepts, CLI, MCP, extension |
| `/chrome-extension-guide` | Capture components and screens with the Chrome extension |
| `/memory-review` | Audit and clean up Claude's project memory files |

## Agents

| Agent | What it does |
|-------|--------------|
| `design-system-reviewer` | Reviews a component or directory for import compliance, tokens, naming, stories, and a11y |
| `snapshot-agent` | Bulk-snapshots a directory of components to a board |
| `board-curator` | Reviews all papers on a board for staleness, completeness, and voice |

## Hooks

The plugin runs lightweight guardrails when you edit files (PostToolUse):

- **Component import compliance** — flags off-pattern component-library imports
- **TypeScript check** — runs `tsc --noEmit` after editing source files
- **Story reminder** — nudges you to add a `.stories.tsx` for new components
- **Memory index sync** — warns when a memory file isn't referenced in `MEMORY.md`

These require `jq` on your `PATH` and no-op safely if it's absent.

## Publish a session recap

When Claude finishes a piece of work, make it visible to your team:

```
/infa:recap
```

The plugin summarizes what was built this session, screenshots the result from your already-running app, and publishes (or updates) a single Infa paper — so PMs and designers can **see** the outcome without reading a diff. Run it again later in the same session and it updates the same paper.

## Troubleshooting

| Symptom | Fix |
|---------|-----|
| `/infa:*` commands not listed | Make sure the plugin is enabled, then run `/reload-plugins` |
| `plugin:infa:infa · ✗ failed` | The MCP couldn't start — check your network and that the endpoint `https://infa.ai/api/mcp` is reachable |
| MCP connected but tools error | Complete the OAuth authorization in your browser, then run `/infa:help` |
| Duplicate Infa tools | You have the MCP connected both standalone and via the plugin — disable one |

## Related

- [MCP Server](https://infa.ai/docs/mcp): Connect the Infa MCP to any AI tool
- [Infa CLI](https://infa.ai/docs/infa-cli): The infa command-line tool
- [Hooks & Agents](https://infa.ai/docs/infa-cli-hooks-agents): How Infa CLI wires Claude Code during runs
