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,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 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
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