anima-performance-tuning

Featured

Optimize Anima code generation performance with caching, parallelism, and output tuning. Use when reducing generation latency, optimizing batch component generation, or improving generated code quality for production use. Trigger: "anima performance", "anima slow", "anima optimization", "anima caching".

AI & Automation 2,266 stars 315 forks Updated today 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 Performance Tuning ## Performance Targets | Operation | Target | Notes | |-----------|--------|-------| | Single component generation | < 10s | Depends on complexity | | Batch (10 components) | < 2 min | With rate limit delays | | Cache hit | < 10ms | File-based cache | | Full design system (50 components) | < 15 min | Sequential with 6s delays | ## Instructions ### Step 1: File-Based Generation Cache ```typescript // src/performance/cache.ts import crypto from 'crypto'; import fs from 'fs'; class GenerationCache { private dir: string; constructor(cacheDir = '.anima-cache') { this.dir = cacheDir; fs.mkdirSync(cacheDir, { recursive: true }); } private hash(fileKey: string, nodeId: string, settings: any): string { return crypto.createHash('md5').update(`${fileKey}:${nodeId}:${JSON.stringify(settings)}`).digest('hex'); } async getOrGenerate( anima: any, params: any, maxAgeMs: number = 3600000, // 1 hour ): Promise<any> { const key = this.hash(params.fileKey, params.nodesId[0], params.settings); const path = `${this.dir}/${key}.json`; if (fs.existsSync(path)) { const stat = fs.statSync(path); if (Date.now() - stat.mtimeMs < maxAgeMs) { return JSON.parse(fs.readFileSync(path, 'utf8')); } } const result = await anima.generateCode(params); fs.writeFileSync(path, JSON.stringify(result)); return result; } clearOlderThan(maxAgeMs: number): number { let cleared = 0; ...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

anima-cost-tuning

Optimize 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: "anima cost", "anima pricing", "anima budget", "anima API usage".

2,266 Updated today
jeremylongshore
AI & Automation Featured

anima-sdk-patterns

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".

2,266 Updated today
jeremylongshore
AI & Automation Featured

anima-rate-limits

Implement rate limiting for Anima API code generation requests. Use when batching component generation, handling rate limit errors, or optimizing API throughput for large design systems. Trigger: "anima rate limit", "anima throttling", "anima batch generation".

2,266 Updated today
jeremylongshore
AI & Automation Featured

anima-common-errors

Diagnose 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: "anima error", "anima not working", "anima debug", "figma to code error".

2,266 Updated today
jeremylongshore
AI & Automation Featured

anima-local-dev-loop

Set up iterative design-to-code development loop with Anima SDK. Use when rapidly iterating on Figma-to-code output, comparing framework outputs, or building a local preview server for generated components. Trigger: "anima local dev", "anima dev loop", "anima preview", "anima iteration".

2,266 Updated today
jeremylongshore