lokalise-cost-tuning

0
0
Source

Optimize Lokalise costs through plan selection, usage monitoring, and efficiency. Use when analyzing Lokalise billing, reducing costs, or implementing usage monitoring and budget alerts. Trigger with phrases like "lokalise cost", "lokalise billing", "reduce lokalise costs", "lokalise pricing", "lokalise budget".

Install

mkdir -p .claude/skills/lokalise-cost-tuning && curl -L -o skill.zip "https://mcp.directory/api/skills/download/8033" && unzip -o skill.zip -d .claude/skills/lokalise-cost-tuning && rm skill.zip

Installs to .claude/skills/lokalise-cost-tuning

About this skill

Lokalise Cost Tuning

Overview

Optimize Lokalise localization spending across plan tiers, contributor seats, Translation Memory (TM) leverage, machine translation (MT) triage, and dead key cleanup. Lokalise pricing is per-seat subscription (Essential ~$120/user/month, Pro ~$290/user/month) with optional pay-per-use for MT and AI features.

Prerequisites

  • Lokalise Admin role for billing and usage visibility
  • LOKALISE_API_TOKEN with read access to project statistics
  • Understanding of translation workflow (human, MT, or hybrid)
  • curl and jq for API queries

Instructions

Step 1: Audit Current Usage

set -euo pipefail
echo "=== Lokalise Usage Audit ==="

# Get all projects with statistics
PROJECTS=$(curl -sf "https://api.lokalise.com/api2/projects?limit=100&include_statistics=1" \
  -H "X-Api-Token: ${LOKALISE_API_TOKEN}")

echo "$PROJECTS" | jq -r '.projects[] | [.name, .statistics.keys_total, (.statistics.languages // [] | length), .statistics.progress_total] | @tsv' \
  | column -t -s $'\t' -N "Project,Keys,Languages,Progress%"

# Totals
TOTAL_KEYS=$(echo "$PROJECTS" | jq '[.projects[].statistics.keys_total] | add')
TOTAL_LANGS=$(echo "$PROJECTS" | jq '[.projects[] | (.statistics.languages // [] | length)] | max')
PROJECT_COUNT=$(echo "$PROJECTS" | jq '.projects | length')

echo ""
echo "Totals: ${PROJECT_COUNT} projects, ${TOTAL_KEYS} keys, up to ${TOTAL_LANGS} languages"
echo ""

# Contributor count (seats = cost driver)
TEAMS=$(curl -sf "https://api.lokalise.com/api2/teams" \
  -H "X-Api-Token: ${LOKALISE_API_TOKEN}")
echo "$TEAMS" | jq -r '.teams[] | "Team: \(.name) — \(.users_count) users (seats)"'

Step 2: Reduce Per-Seat Costs

Seats are the largest cost driver. Strategies to minimize:

import { LokaliseApi } from "@lokalise/node-api";
const lok = new LokaliseApi({ apiKey: process.env.LOKALISE_API_TOKEN! });

// Audit: Find inactive contributors (no activity in 90 days)
async function findInactiveContributors(projectId: string): Promise<void> {
  const contributors = await lok.contributors().list({
    project_id: projectId,
    limit: 500,
  });

  console.log("=== Contributor Activity Audit ===");
  for (const c of contributors.items) {
    const langs = c.languages
      .map((l: { lang_iso: string }) => l.lang_iso)
      .join(", ");
    console.log(
      `${c.fullname} <${c.email}> — ` +
      `admin: ${c.is_admin}, reviewer: ${c.is_reviewer}, ` +
      `languages: [${langs}]`
    );
  }

  console.log(`\nTotal contributors: ${contributors.items.length}`);
  console.log(
    "Review: Remove freelancers between tasks. " +
    "Use contributor groups for batch management."
  );
}

// Strategy: Use task-based access for freelance translators
// - Add freelancers when a translation task opens
// - Remove them when the task closes
// - This avoids paying for idle seats
// Cost example: 10 individual seats = ~$1,200/month
//               3 permanent + task-based freelancers = ~$360/month

Step 3: Maximize Translation Memory (TM) Hits

TM matches reduce human translation volume. Keys with 100% TM match cost zero for translation.

// Strategy: Translate similar projects sequentially to build TM
// Don't translate 3 apps in parallel — do one first, seed the TM,
// then the others get 30-50% free matches on shared strings

// Enable automations on upload to apply TM automatically
const uploadResult = await lok.files().upload(projectId, {
  data: base64FileData,
  filename: "en.json",
  lang_iso: "en",
  use_automations: true,      // Apply TM + MT suggestions
  replace_modified: true,
  detect_icu_plurals: true,
});

// Check TM coverage after upload
const languages = await lok.languages().list({ project_id: projectId, limit: 50 });
for (const lang of languages.items) {
  console.log(
    `${lang.lang_iso}: ${lang.statistics?.progress ?? 0}% translated, ` +
    `${lang.statistics?.words_to_do ?? "?"} words remaining`
  );
}

Step 4: Machine Translation Triage

Pre-translate low-risk content with MT. Reserve human translation for critical strings.

set -euo pipefail
# Identify untranslated key volume per language
curl -sf "https://api.lokalise.com/api2/projects/${LOKALISE_PROJECT_ID}/languages" \
  -H "X-Api-Token: ${LOKALISE_API_TOKEN}" \
  | jq '.languages[] | {
    locale: .lang_iso,
    progress: .statistics.progress,
    words_to_do: .statistics.words_to_do
  }'

MT triage matrix — decide by key prefix:

Key PrefixContent TypeTranslation MethodCost Impact
tooltip.*, help.*Tooltips, help textMachine TranslationLow risk, high volume savings
log.*, debug.*Log messagesMT or skipThese rarely face users
ui.label.*, nav.*UI labels, navigationHumanMedium risk, must be natural
marketing.*, cta.*Marketing copy, CTAsHuman (senior)High risk, brand-critical
legal.*, tos.*Legal textHuman + legal reviewCompliance-critical

Step 5: Clean Up Dead Keys

Orphaned keys waste per-word costs and clutter the project.

import { readFileSync } from "fs";

async function findOrphanedKeys(
  projectId: string,
  sourceCodeDir: string
): Promise<string[]> {
  // Get all keys from Lokalise
  const allKeys: string[] = [];
  let cursor: string | undefined;
  do {
    const page = await lok.keys().list({
      project_id: projectId,
      limit: 500,
      ...(cursor ? { cursor } : {}),
    });
    for (const k of page.items) {
      allKeys.push(k.key_name.web ?? k.key_name.other ?? "");
    }
    cursor = page.hasNextCursor() ? page.nextCursor() : undefined;
  } while (cursor);

  console.log(`Lokalise keys: ${allKeys.length}`);

  // Compare against source code references
  // (simplified — adjust grep pattern for your i18n framework)
  const { execSync } = await import("child_process");
  const sourceRefs = execSync(
    `grep -roh "t(['\"][^'\"]*['\"])" ${sourceCodeDir} 2>/dev/null || true`,
    { encoding: "utf-8" }
  )
    .split("\n")
    .map((line) => line.replace(/^t\(['"]/, "").replace(/['"]\)$/, ""))
    .filter(Boolean);

  const sourceKeySet = new Set(sourceRefs);
  const orphaned = allKeys.filter((k) => !sourceKeySet.has(k));

  console.log(`Source code references: ${sourceKeySet.size}`);
  console.log(`Orphaned keys: ${orphaned.length}`);

  return orphaned;
}

// Archive orphaned keys to stop paying for their translations
async function archiveKeys(projectId: string, keyNames: string[]): Promise<void> {
  // Look up key IDs
  for (const name of keyNames.slice(0, 50)) {
    const result = await lok.keys().list({
      project_id: projectId,
      filter_keys: name,
      limit: 1,
    });
    if (result.items.length > 0) {
      await lok.keys().update(result.items[0].key_id, {
        project_id: projectId,
        is_archived: true,
      });
    }
    await new Promise((r) => setTimeout(r, 170)); // Rate limit
  }
}

Step 6: Monitor Monthly Spend

set -euo pipefail
echo "=== Monthly Cost Estimate ==="

# Count total seats across teams
SEAT_COUNT=$(curl -sf "https://api.lokalise.com/api2/teams" \
  -H "X-Api-Token: ${LOKALISE_API_TOKEN}" \
  | jq '[.teams[].users_count] | add')

# Estimate based on plan tier (adjust rate for your plan)
RATE_PER_SEAT=120  # Essential plan — adjust to 290 for Pro
MONTHLY_COST=$((SEAT_COUNT * RATE_PER_SEAT))

echo "Active seats: ${SEAT_COUNT}"
echo "Estimated monthly cost: \$${MONTHLY_COST} (at \$${RATE_PER_SEAT}/seat)"
echo ""
echo "Cost reduction levers:"
echo "  1. Remove inactive contributors (task-based access)"
echo "  2. Use contributor groups instead of individual invites"
echo "  3. Pre-translate with MT to reduce human translation volume"
echo "  4. Archive orphaned keys to reduce per-word charges"
echo "  5. Translate similar projects sequentially to maximize TM"

Output

  • Usage audit report: projects, keys, languages, contributor seat count
  • Inactive contributor identification for seat optimization
  • TM leverage strategy (sequential translation, automation-enabled uploads)
  • MT triage matrix mapping key prefixes to translation method
  • Orphaned key detection and archival workflow
  • Monthly cost estimate with reduction levers

Error Handling

IssueCauseSolution
High per-word costsHuman translating MT-suitable contentApply MT to low-risk strings first
Seat costs growingAdding contractors as full seatsUse task-based access: add when task opens, remove on close
TM not matchingDifferent key naming across projectsStandardize key names to improve TM reuse
Budget overrunNew languages added without planningBudget per-language before adding to projects
Orphaned keys missedSource code scan incompleteUse multiple grep patterns matching your i18n framework

Examples

Cost Comparison Scenarios

Solo project with 5 languages: 2 full-time translators + 8 freelancers. Move freelancers to task-based access. Seats drop from 10 to 2, saving ~$960/month.

Multi-app suite sharing terminology: Three apps share UI strings. Translate the largest first to seed TM, then translate the others. TM matches on shared strings cut human translation volume by 30-50%.

10,000-key project MT triage: Tag keys by content type. Apply MT to tooltip.*, help.*, log.* prefixes (40% of keys). Route legal.*, marketing.*, ui.cta.* to humans. Saves ~$2,000 per target language.

Resources


Content truncated.

svg-icon-generator

jeremylongshore

Svg Icon Generator - Auto-activating skill for Visual Content. Triggers on: svg icon generator, svg icon generator Part of the Visual Content skill category.

7824

automating-mobile-app-testing

jeremylongshore

This skill enables automated testing of mobile applications on iOS and Android platforms using frameworks like Appium, Detox, XCUITest, and Espresso. It generates end-to-end tests, sets up page object models, and handles platform-specific elements. Use this skill when the user requests mobile app testing, test automation for iOS or Android, or needs assistance with setting up device farms and simulators. The skill is triggered by terms like "mobile testing", "appium", "detox", "xcuitest", "espresso", "android test", "ios test".

13615

d2-diagram-creator

jeremylongshore

D2 Diagram Creator - Auto-activating skill for Visual Content. Triggers on: d2 diagram creator, d2 diagram creator Part of the Visual Content skill category.

3114

performing-penetration-testing

jeremylongshore

This skill enables automated penetration testing of web applications. It uses the penetration-tester plugin to identify vulnerabilities, including OWASP Top 10 threats, and suggests exploitation techniques. Use this skill when the user requests a "penetration test", "pentest", "vulnerability assessment", or asks to "exploit" a web application. It provides comprehensive reporting on identified security flaws.

4311

performing-security-audits

jeremylongshore

This skill allows Claude to conduct comprehensive security audits of code, infrastructure, and configurations. It leverages various tools within the security-pro-pack plugin, including vulnerability scanning, compliance checking, cryptography review, and infrastructure security analysis. Use this skill when a user requests a "security audit," "vulnerability assessment," "compliance review," or any task involving identifying and mitigating security risks. It helps to ensure code and systems adhere to security best practices and compliance standards.

109

designing-database-schemas

jeremylongshore

Design and visualize efficient database schemas, normalize data, map relationships, and generate ERD diagrams and SQL statements.

1128

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

9521,094

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

846846

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

571700

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

548492

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

673466

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

514280

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.