Skip to content
cccskills
FreePublished on GitHub

anima-cost-tuning

Track Anima generation usage, reuse outputs when their source and settings still match, and regenerate only changed design elements. It helps teams review plan fit using current account data and report avoided work without guessing monetary savings.

OriginalShow the original description

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

Works withFigma

Run score Not tested

See how to install

Good for

  • Reducing duplicate Anima generations
  • Refreshing only components changed in Figma
  • Reviewing Anima plan fit with account usage data

Files included (2)

  • SKILL.md5.6 KB
  • references/official-docs.md763 B

SKILL.md (original)

Review the instructions the agent will receive before you install.

Anima Cost Tuning

Overview

Optimize design-to-code generation by measuring approved usage, avoiding duplicate work, and retaining only reusable outputs. Treat cost projections as planning inputs until the account owner confirms current contractual terms.

Pricing Context

Do not infer price units from the SDK or marketing site. Obtain the current account agreement or usage report from the authorized owner and label every projection with its source date, currency, unit, and included allowance.

Prerequisites

  • A current agreement or account report from the authorized Anima owner; do not infer consumption limits from the illustrative optimization table.
  • Aggregate generation telemetry that records file/node identifiers, generation version, cache state, and duration without exposing design tokens or content.
  • An explicit cache freshness and invalidation policy agreed by design and code owners so cached output cannot silently lag an approved design change.

Cost Optimization Strategies

StrategyMeasureGuardrail
Content-addressed reuseAvoided duplicate generationsBind source revision, node, SDK version, and settings
Incremental generationChanged versus unchanged nodesRegenerate when change state is unknown
Asset policyHosted versus external transferFollow security, retention, and licensing policy
Output reuseAccepted reusable componentsRevalidate after source or dependency changes

Authentication

Read usage only through the account owner's authorized report or integration. Keep Anima and Figma credentials in the backend secret manager and aggregate telemetry before analysis so this workflow never receives token or design data.

Instructions

Step 1: Usage Tracker

// src/cost/usage-tracker.ts
interface GenerationRecord {
  timestamp: string;
  fileKey: string;
  nodeId: string;
  cached: boolean;
  durationMs: number;
}

class AnimaUsageTracker {
  private records: GenerationRecord[] = [];

  record(entry: GenerationRecord): void { this.records.push(entry); }

  getReport(): { total: number; cached: number; cacheHitRate: number | null } {
    const total = this.records.length;
    const cached = this.records.filter(r => r.cached).length;
    return {
      total,
      cached,
      cacheHitRate: total > 0 ? cached / total : null,
    };
  }
}

Step 2: Smart Generation Policy

// Only generate when:
// 1. Figma file version changed (check via Figma API)
// 2. The repository's reviewed cache-retention policy requires refresh
// 3. Settings changed (new framework/styling)
// 4. Force flag passed (manual override)

async function shouldGenerate(
  fileKey: string,
  nodeId: string,
  cache: any,
): Promise<boolean> {
  // Check cache first
  const cached = cache.get(fileKey, nodeId);
  if (cached && cached.sourceRevision === cache.currentSourceRevision(fileKey)) {
    console.log('Using source- and settings-bound cached generation');
    return false;
  }
  return true;
}

Tool Discipline

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.

Output

  • Usage tracking with cache hit rate reporting
  • Smart generation policy reducing unnecessary API calls
  • A measured avoided-work report; monetary impact remains unclaimed without account data

Examples

For a weekly design-system sync, record aggregate generation counts for the approved component registry, then compare an uncached baseline with the smart generation policy. Regenerate only components whose Figma version or generation settings changed, and attach the source-version and cache decision to the PR. If the current usage report is incomplete, a cache cannot identify its source version, or a design owner requests an immediate change, bypass the cache only with an explicit force record and regenerate the affected component—not the entire design file by default.

Error Handling

FailureResponse
Account limits or pricing data are unavailableMark projections as incomplete and obtain current data from the account owner.
Cache source version is unknownRefuse reuse and regenerate the approved affected component.
Generation rate spikes unexpectedlyPause noncritical jobs, inspect aggregate telemetry, and enforce the scheduling policy.
Output is stale after an approved design changeInvalidate the affected cache key and record the corrected generation receipt.

Resources

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Add a synthetic-data CI gate for customer-owned Abridge integration code. Test consent handling, note-review handoffs, redaction, and rollback behavior with mocked vendor boundaries, without connecting CI to a live Abridge or EHR tenant.

  • Adding regression checks to an Abridge integration repository
  • Testing consent and note-release handling
  • Checking logs for sensitive data exposure
jeremylongshore/tons-of-skills-marketplace2.9KUpdated Oct 23, 2026

Triage Abridge recording, note review, Epic handoff, and access problems using observed symptoms and approved guidance. Identify the affected workflow stage, organize a minimal timeline, and prepare a redacted escalation record for the responsible team.

  • Separate recording problems from upload failures
  • Investigate note creation delays and editor issues
  • Identify the responsible team for Epic handoff failures
jeremylongshore/tons-of-skills-marketplace2.9KUpdated Oct 23, 2026

Map and review an Abridge clinical documentation workflow from consent and recording through draft review, evidence checks, edits, and final disposition. Keep clinician approval explicit, identify failure exits, and separate verified facts from tenant-specific details and pending approvals.

  • Map a clinical note workflow for a care setting
  • Check where consent and patient identity are verified
  • Review draft notes against linked evidence before sign-off
jeremylongshore/tons-of-skills-marketplace2.9KUpdated Oct 23, 2026

Audit how clinician-reviewed Abridge note sections map into Epic templates and downstream workflows. Use approved test records to document destinations, exceptions, evidence, rollback steps, and a go or no-go decision for a specific environment.

  • Checking Abridge note section mappings to Epic templates
  • Auditing a department’s approved documentation handoff
  • Preparing test evidence and a go or no-go decision
jeremylongshore/tons-of-skills-marketplace2.9KUpdated Oct 23, 2026

Review Abridge adoption and workflow value using local usage records, clinician feedback, and verified contract costs. Build an evidence based decision table covering adoption, quality, support burden, and options to expand, hold, or improve the rollout.

  • Reviewing adoption after an Abridge rollout
  • Preparing evidence for a renewal decision
  • Comparing workflow outcomes across care settings
jeremylongshore/tons-of-skills-marketplace2.9KUpdated Oct 23, 2026

Prepare a bounded support bundle for an Abridge issue using allowlisted operational details such as versions, coarse timestamps, and correlation references. Exclude recordings, transcripts, patient identifiers, credentials, and unrestricted logs, then document redactions and review details.

  • Preparing reviewed evidence for an Abridge support case
  • Documenting redactions and excluded data
  • Collecting approved operational details for an incident
jeremylongshore/tons-of-skills-marketplace2.9KUpdated Oct 23, 2026

See all skills by jeremylongshore

Report a problem with this skill