Skip to content
Skillv1.0.0

anima-deploy-integration

Deploy Anima design-to-code service as a backend API endpoint. Use when building a design-to-code microservice, deploying Anima SDK as a serverless function, or creating an internal design tool API. T

by jeremylongshore(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from jeremylongshore/tons-of-skills-marketplace (skills/.curated/anima-deploy-integration/SKILL.md). Install upstream with npx skills add jeremylongshore/tons-of-skills-marketplace --skill anima-deploy-integration. Copyright stays with the author (MIT).

Anima Deploy Integration

Overview

Deploy the Anima SDK as a backend service. The SDK is server-side only, so deploy it behind an API endpoint that accepts Figma file/node references and returns generated code.

Prerequisites

  • A private or authenticated service boundary with an allowlisted design-file registry; do not expose arbitrary fileKey and nodesId generation to the public internet.
  • Managed Anima and Figma secrets, separate staging/production credentials, request limits, and an audit trail that excludes token values and design content.
  • An approved generated-output path, validation pipeline, and rollback target for every deployment revision.

Instructions

Step 1: Express API Wrapper

// src/server.ts
import express from 'express';
import { Anima } from '@animaapp/anima-sdk';

const app = express();
app.use(express.json());

const anima = new Anima({ auth: { token: process.env.ANIMA_TOKEN! } });

app.post('/api/generate', async (req, res) => {
  const { fileKey, nodesId, settings } = req.body;

  if (!fileKey || !nodesId?.length) {
    return res.status(400).json({ error: 'fileKey and nodesId required' });
  }

  try {
    const { files } = await anima.generateCode({
      fileKey,
      figmaToken: process.env.FIGMA_TOKEN!,
      nodesId,
      settings: settings || { language: 'typescript', framework: 'react', styling: 'tailwind' },
    });
    res.json({ files, count: files.length });
  } catch (err: any) {
    res.status(500).json({ error: err.message });
  }
});

app.get('/health', (_req, res) => res.json({ status: 'ok' }));
app.listen(3000, () => console.log('Anima service on :3000'));

Step 2: Vercel Serverless Function

// api/generate.ts
import { Anima } from '@animaapp/anima-sdk';

const anima = new Anima({ auth: { token: process.env.ANIMA_TOKEN! } });

export default async function handler(req: any, res: any) {
  if (req.method !== 'POST') return res.status(405).end();

  const { fileKey, nodesId, settings } = req.body;
  const { files } = await anima.generateCode({
    fileKey, figmaToken: process.env.FIGMA_TOKEN!, nodesId,
    settings: settings || { language: 'typescript', framework: 'react', styling: 'tailwind' },
  });
  res.json({ files });
}

Step 3: Deploy Commands

# Vercel
vercel secrets add anima_token "$ANIMA_TOKEN"
vercel secrets add figma_token "$FIGMA_TOKEN"
vercel --prod

# Cloud Run
gcloud run deploy anima-service \
  --source . \
  --set-secrets=ANIMA_TOKEN=anima-token:latest,FIGMA_TOKEN=figma-token:latest \
  --region us-central1 --allow-unauthenticated

Output

  • Express API wrapping Anima SDK for internal design tooling
  • Vercel serverless function for lightweight deployment
  • Cloud Run deployment with Secret Manager

Examples

Deploy the service to a staging environment behind the organization’s existing identity proxy and invoke /api/generate with one allowlisted file/node pair. Verify the request is authorized, output remains in the approved generated-code location, logs contain only request metadata, and generated files pass the downstream formatter and test gate before a human reviews them. If an unauthenticated caller, unknown node, or secret-binding error reaches the service, reject the request, alert the operator, and keep the prior revision active rather than opening broad access or embedding credentials in the client.

Error Handling

Failure Response
Caller is not authenticated or file/node is not allowlisted Reject before contacting Anima or Figma.
Managed secret is unavailable Fail closed and repair the deployment binding; never use a plaintext fallback.
Generation or validation fails Return a sanitized failure, preserve the prior revision, and quarantine the output.
Rate limit or repeated bad requests occur Apply bounded throttling and alert the owning service team.

Resources

Next Steps

For webhook integration, see anima-webhooks-events.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/jeremylongshore-tons-of-skills-marketplace-anima-deploy-70fa3d/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

jeremylongshore-tons-of-skills-marketplace-anima-deploy-70fa3d.ocm.jsonjson
{
  "ocm": "1",
  "id": "jeremylongshore-tons-of-skills-marketplace-anima-deploy-70fa3d",
  "kind": "skill",
  "name": "anima-deploy-integration",
  "description": "Deploy Anima design-to-code service as a backend API endpoint. Use when building a design-to-code microservice, deploying Anima SDK as a serverless function, or creating an internal design tool API. Trigger: \"deploy anima\", \"anima service deploy\", \"anima serverless\".",
  "publisher": "jeremylongshore",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding"
    ],
    "tags": [
      "skill-md",
      "saas",
      "design",
      "figma",
      "anima",
      "deployment",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Deploy Anima design-to-code service as a backend API endpoint. Use when building a design-to-code microservice, deploying Anima SDK as a serverless function, or creating an internal design tool API. Trigger: \"deploy anima\", \"anima service deploy\", \"anima serverless\"."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/jeremylongshore/tons-of-skills-marketplace",
      "path": "skills/.curated/anima-deploy-integration/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/jeremylongshore/tons-of-skills-marketplace/blob/HEAD/skills/.curated/anima-deploy-integration/SKILL.md",
      "key": "jeremylongshore/tons-of-skills-marketplace/skills/.curated/anima-deploy-integration/SKILL.md"
    },
    "compatibility": "Designed for Claude Code",
    "allowed_tools": [
      "Read,",
      "Write,",
      "Edit,",
      "Bash(vercel:*),",
      "Bash(gcloud:*),",
      "Bash(docker:*)"
    ],
    "license": "MIT"
  },
  "instructions": "# Anima Deploy Integration\n\n## Overview\n\nDeploy the Anima SDK as a backend service. The SDK is server-side only, so deploy it behind an API endpoint that accepts Figma file/node references and returns generated code.\n\n## Prerequisites\n\n- A private or authenticated service boundary with an allowlisted design-file\n  registry; do not expose arbitrary `fileKey` and `nodesId` generation to the\n  public internet.\n- Managed Anima and Figma secrets, separate staging/production credentials,\n  request limits, and an audit trail that excludes token values and design\n  content.\n- An approved generated-out",
  "cost": {
    "context_tokens": 1037
  }
}

Fetch it by URL: GET /api/v1/registry/jeremylongshore-tons-of-skills-marketplace-anima-deploy-70fa3d/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.