/anima-pack:anima-hello-world [figma-url] [node-id]from anima-pack
Generates reviewable React or HTML code from a Figma design using the Anima SDK. Useful for testing design-to-code conversion or building an automated pipeline.
Ships in anima-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Generate reviewable React or HTML from one approved Figma node with the backend-only
@animaapp/anima-sdk. Keep credentials server-side and treat every generated file
as untrusted output until its path, dependencies, build, and visual result pass review.
anima-install-auth setup// src/hello-world.ts
import { Anima } from '@animaapp/anima-sdk';
import fs from 'fs';
import path from 'path';
const anima = new Anima({
auth: { token: process.env.ANIMA_TOKEN! },
});
async function generateReactComponent() {
const { files } = await anima.generateCode({
fileKey: process.env.FIGMA_FILE_KEY!, // From Figma URL
figmaToken: process.env.FIGMA_TOKEN!,
nodesId: [process.env.FIGMA_NODE_ID!], // e.g., '1:2'
settings: {
language: 'typescript',
framework: 'react',
styling: 'tailwind',
// Omit uiLibrary for vanilla React, or select a supported library.
},
});
// Write generated files to disk
const outputDir = './generated';
fs.mkdirSync(outputDir, { recursive: true });
for (const [fileName, file] of Object.entries(files)) {
const filePath = path.resolve(outputDir, fileName);
if (!filePath.startsWith(`${path.resolve(outputDir)}${path.sep}`)) {
throw new Error(`Refusing output path: ${fileName}`);
}
if (file.isBinary) throw new Error(`Handle binary output separately: ${fileName}`);
fs.mkdirSync(path.dirname(filePath), { recursive: true });
fs.writeFileSync(filePath, file.content, { flag: 'wx' });
console.log(`Generated: ${fileName} (${file.content.length} chars)`);
}
return files;
}
generateReactComponent().catch(() => {
console.error({ failureClass: 'generation-failed' });
process.exitCode = 1;
});
// Generate HTML with the SDK's plain_css setting.
const htmlFiles = await anima.generateCode({
fileKey: process.env.FIGMA_FILE_KEY!,
figmaToken: process.env.FIGMA_TOKEN!,
nodesId: ['1:2'],
settings: {
language: 'javascript',
framework: 'html',
styling: 'plain_css',
},
});
// Generate React + shadcn/ui
const shadcnFiles = await anima.generateCode({
fileKey: process.env.FIGMA_FILE_KEY!,
figmaToken: process.env.FIGMA_TOKEN!,
nodesId: ['1:2'],
settings: {
language: 'typescript',
framework: 'react',
styling: 'tailwind',
uiLibrary: 'shadcn',
},
});
// `files` is a record keyed by relative filename.
type GeneratedFiles = Record<string, { content: string; isBinary: boolean }>;
// Example output structure for React + Tailwind:
// generated/
// ├── HeroSection.tsx # React component with Tailwind classes
// ├── Button.tsx # Child components
// └── types.ts # TypeScript interfaces (if applicable)
# Review before copying; do not execute generated package scripts.
npm run format -- --check generated
npm run typecheck
| Setting | Options | Default |
|---|---|---|
language | typescript, javascript | typescript |
framework | react, html | Required |
styling | plain_css, tailwind, inline_styles | Required |
uiLibrary | mui, antd, radix, shadcn, clean_react, custom_design_system | Omit for vanilla React |
Use Read and Grep to inspect the existing integration and generated diff before changing anything. Use Write or Edit only inside the approved generated-code, test, or configuration paths. Use the declared Bash commands only for the explicit install, validation, or diagnostic steps in this workflow; never print tokens, source designs, generated source, or private website captures.
Create a small staging Figma frame with an approved button and heading, store
the Anima/Figma credentials in a local ignored environment file, and generate
only that node into ./generated. Confirm each filename resolves under the
output directory, inspect the component for expected labels and styles, then
run the project formatter and type check before copying it into a feature
branch. If the node cannot be found, output is empty, or the generation writes
an unexpected path, stop and correct the Figma link or output mapping; do not
use a broader file token or copy unreviewed generated code directly to main.
| Error | Cause | Solution |
|---|---|---|
File not found | Wrong Figma file key | Extract key from URL after /file/ |
Node not found | Wrong node ID | Use Figma's "Copy link" on the frame |
Empty files array | Node has no renderable content | Select a frame/component, not a page |
| Malformed output | Complex nested auto-layout | Simplify Figma structure; use components |
What SKILL.md sets; muted values are Claude Code's defaults
inherithighThree short reads, in order
18 skills in this plugin
/anima-ci-integrationConfigure CI/CD pipeline for automated Figma-to-code generation with Anima.
Use when automating design-to-code in GitHub Actions, setting up PR-based
component generation, or integrating Anima into design handoff workflows.
Trigger with: "anima CI", "anima GitHub Actions", "anima automated generation".
/anima-common-errorsDiagnose and fix common Anima SDK design-to-code errors.
Use when encountering Figma token errors, code generation failures,
node not found issues, or output quality problems.
Trigger with: "anima error", "anima not working", "anima debug", "figma to code error".
/anima-core-workflow-aBuild automated Figma-to-React pipeline with the Anima SDK.
Use when automating design handoff, building CI/CD design-to-code workflows,
or creating a design system code generator from Figma components.
Trigger with: "anima design pipeline", "figma to react pipeline",
"automated design handoff", "anima component generator".
/anima-core-workflow-bClone websites to React/HTML code and customize Anima output with AI.
Use when converting live websites to code, customizing generated components,
or building design-system-aware code from URL screenshots.
Trigger with: "anima website to code", "anima URL clone", "anima AI customization",
"website to react", "clone website to code".
/anima-cost-tuningOptimize Anima API costs through caching, incremental generation, and tier selection.
Use when managing Anima API usage, reducing unnecessary code generations,
or right-sizing your Anima plan for team size.
Trigger with: "anima cost", "anima pricing", "anima budget", "anima API usage".
/anima-debug-bundleCollect Anima SDK debug evidence for support tickets and troubleshooting.
Use when filing Anima support requests, debugging code generation issues,
or collecting diagnostic data for the Anima team.
Trigger with: "anima debug bundle", "anima support ticket", "anima diagnostics".
npx claudepluginhub jeremylongshore/tons-of-skills-marketplace --plugin anima-packOther plugins' skills for the same job