anima-sdk-patterns

Featured

Apply production-ready patterns for the Anima SDK design-to-code pipeline. Use when building reusable Anima client wrappers, implementing output caching, or establishing team standards for design-to-code automation. Trigger: "anima SDK patterns", "anima best practices", "anima code patterns".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Anima SDK Patterns ## Overview Production patterns for `@animaapp/anima-sdk`: singleton client, generation caching, output normalization, and configurable settings presets. ## Instructions ### Step 1: Singleton Client with Configuration ```typescript // src/anima/client.ts import { Anima } from '@animaapp/anima-sdk'; let instance: Anima | null = null; export function getAnimaClient(): Anima { if (!instance) { if (!process.env.ANIMA_TOKEN) throw new Error('ANIMA_TOKEN not set'); instance = new Anima({ auth: { token: process.env.ANIMA_TOKEN } }); } return instance; } // Preset configurations for different project needs export const PRESETS = { nextjs: { language: 'typescript' as const, framework: 'react' as const, styling: 'tailwind' as const, uiLibrary: 'shadcn' as const }, vite: { language: 'typescript' as const, framework: 'react' as const, styling: 'tailwind' as const }, vue: { language: 'typescript' as const, framework: 'vue' as const, styling: 'tailwind' as const }, static: { language: 'javascript' as const, framework: 'html' as const, styling: 'css' as const }, } as const; ``` ### Step 2: Generation Cache ```typescript // src/anima/cache.ts import crypto from 'crypto'; import fs from 'fs'; interface CacheEntry { files: Array<{ fileName: string; content: string }>; generatedAt: string; settingsHash: string; } class AnimaCache { private cacheDir: string; constructor(cacheDir: string = '.anima-cache') { this.cacheDir = cach...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category