npm package · by Mehul Jatiya · github.com/mehuljatiya/troupe ↗
AI workflows for everyone on the team
One install gives designers, developers, and PMs a shared set of AI-powered tools — from Figma to code, spec to QA.
Open Terminal — ⌘ + Space, type Terminal, hit Enter — then paste:
Who it's for
Built for the whole team
Designers
From Figma to production
- Turn Figma designs into working code
- Document components from a design system
- Review components for missing states & accessibility
- Understand design tokens in any project
- Generate developer handoff specs
- Create new components through guided conversation
Developers
Less back-and-forth, faster builds
- Implement Figma designs without chasing the designer
- Audit hardcoded values that should be design tokens
- Write and update component documentation
- Self-review components before PR
- QA: compare Figma to built component, flag gaps
Product Managers
From design to ticket in minutes
- Generate ticket-ready specs from Figma designs
- QA: compare Figma to what's built, flag gaps
- Audit components for missing states before shipping
- Understand the visual language of a product
This is v1 — a starting point. More commands, more workflows, and deeper integrations are on the way.
Slash commands
9 commands, ready to use
| Command | For | What it does |
|---|---|---|
| /figma [url] | DesignersDevs |
Takes a Figma URL → reads every variant and state → describes the component in plain language before writing a line of code → inspects your project's stack, existing patterns, and design tokens → builds it following your conventions. Never hardcodes values. |
| /document-component [url] | DesignersPMs |
Takes a Figma URL → reads the design → generates a full .md + polished .html preview with anatomy, tokens, states, do/don't guidelines, and accessibility tables. Can push the docs back into Figma. |
| /spec [url] | PMs |
Takes a Figma URL → reads every variant and state → outputs a structured spec you can paste directly into Jira, Linear, or Notion. Covers overview, variants/states table, interactions, edge cases (empty, overflow, error, loading), testable acceptance criteria, open questions, and explicit out-of-scope items. |
| /qa [url] | PMsDevs |
Takes a Figma URL and a codebase component → reads both → outputs a gap report with severity ratings. Flags visual mismatches (wrong token, wrong value), missing states, missing variants, interaction gaps, and accessibility issues. Also lists what's correct so you know what not to touch. |
| /new-component | DesignersDevs |
Starts a short conversation — asks what it should do, what it looks like, and what states it needs — before writing anything. Then inspects your existing components to match project patterns, tokens, and file naming conventions. Builds only what was asked, nothing extra. |
| /document | DesignersDevs |
Works on existing code components (no Figma needed). Writes a designer-friendly .docs.md covering what it is, when to use it, all configuration options in plain language, visual states, and accessibility. |
| /review | Everyone |
Audits a component across five areas: token consistency (flags hardcoded values), completeness of states (default, hover, focus, disabled, loading, error, empty), responsiveness and touch targets, accessibility (keyboard, contrast, screen reader labels), and edge cases (long text, missing images, no data). Each finding is rated ✓ Good, ⚠ Needs attention, or ✗ Missing. |
| /tokens | DesignersDevs |
Scans the project for all design tokens — CSS variables, theme files, named values — and produces a designer-friendly reference grouped by color, typography, spacing, shape, and elevation. Then scans for hardcoded values (raw hex, magic px numbers) and lists each one with a suggested token replacement. |
| /handoff | DesignersPMs |
Generates a precise, build-ready spec from an existing component — exact token names, pixel values, and state-by-state visual diffs. Covers visual specs, all states with what changes in each, mouse/keyboard interactions, responsive behavior at mobile/tablet/desktop, and accessibility requirements. Saved as a .handoff.md next to the component. |
Transparency
What gets installed
Checks if @anthropic-ai/claude-code is already on your machine. If it isn't, asks your permission before installing it globally via npm. If you decline, it gives you the manual command and exits cleanly — nothing is installed without your approval.
npm install -g @anthropic-ai/claude-code
claude binary to your PATH
design — a shortcut that launches Claude from any project folder
Copies 9 .md slash-command files into ~/.claude/commands/ — Claude Code's global commands folder. Each file is a natural-language instruction that tells Claude exactly how to run that command. If a file already exists, it is skipped rather than overwritten, so any customisations you've made are preserved.
Asks if you want to connect Figma. If yes, registers Anthropic's official Figma MCP server so Claude can read your designs directly — no copy-pasting node IDs. Nothing is downloaded; it's a one-line config entry that points Claude at Figma's hosted MCP endpoint. After setup, the first time you type /mcp inside Claude you'll do a one-time OAuth login to connect your Figma account.
claude mcp add --transport http figma https://mcp.figma.com/mcp --scope user
~/.claude/claude.json — no other files touched
/mcp → figma → Authenticate (you'll only do this once)
Installs two Claude plugins that power the browser automation in /document-component — opening an HTML preview in the browser and pushing documentation back into Figma. Both are installed automatically; if either already exists it is skipped.
claude plugin install chrome-devtools-mcp@chrome-devtools-plugins
claude plugin install figma-friend@figma-friend-marketplace
If Claude Code wasn't already installed, the setup points you to console.anthropic.com to get a free API key. Nothing is stored or sent during setup — Claude will ask for the key the first time you run it and save it locally in its own config. If Claude was already installed and configured, this step is skipped entirely.
~/.claude/ — not by this package
console.anthropic.com
After setup completes
Open Terminal in any project folder and type claude (or design for a cheat sheet of all commands). Claude launches with all 9 workflows ready. Type any slash command — /figma, /spec, /review — and you're running.
Get started
Running in 2 minutes
Install
Run npx @cashfree/troupe@latest setup in your terminal. The wizard handles the rest.
Launch
Open Terminal in any project folder and type claude. You're in. Optionally type design for a printed cheat sheet of all available commands.
Use a command
Type any slash command — /figma, /spec, /review — and paste a Figma URL or describe what you need.