lokalise-sdk-patterns

Featured

Apply production-ready Lokalise SDK patterns for TypeScript and Node.js. Use when implementing Lokalise integrations, refactoring SDK usage, or establishing team coding standards for Lokalise. Trigger with phrases like "lokalise SDK patterns", "lokalise best practices", "lokalise code patterns", "idiomatic lokalise".

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

# Lokalise SDK Patterns ## Overview Production-grade patterns for `@lokalise/node-api`: client singleton, cursor pagination, typed error handling, batch operations, upload monitoring, and retry with rate limiting. ## Prerequisites - `@lokalise/node-api` v12+ installed - TypeScript 5+ with `strict` mode ## Instructions 1. Create a client singleton to centralize configuration and support branch-based project IDs. ```typescript // src/lib/lokalise-client.ts import { LokaliseApi } from "@lokalise/node-api"; let instance: LokaliseApi | null = null; export function getClient(apiKey?: string): LokaliseApi { if (instance) return instance; const key = apiKey ?? process.env.LOKALISE_API_TOKEN; if (!key) throw new Error("Set LOKALISE_API_TOKEN or pass apiKey"); instance = new LokaliseApi({ apiKey: key, enableCompression: true }); return instance; } export function resetClient(): void { instance = null; } /** Lokalise branch syntax: "projectId:branchName" */ export function projectId(id: string, branch?: string): string { return branch ? `${id}:${branch}` : id; } ``` 2. Build a cursor-based pagination helper that works with any paginated endpoint. ```typescript // src/lib/paginate.ts interface PaginatedResult<T> { items: T[]; hasNextCursor(): boolean; nextCursor(): string; } type Fetcher<T> = (params: Record<string, unknown>) => Promise<PaginatedResult<T>>; /** Async generator yielding all items across pages with rate-limit spacing. */ export async functi...

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

lokalise-performance-tuning

Optimize Lokalise API performance with caching, pagination, and bulk operations. Use when experiencing slow API responses, implementing caching strategies, or optimizing request throughput for Lokalise integrations. Trigger with phrases like "lokalise performance", "optimize lokalise", "lokalise latency", "lokalise caching", "lokalise slow", "lokalise batch".

2,266 Updated today
jeremylongshore
AI & Automation Featured

lokalise-hello-world

Create a minimal working Lokalise example. Use when starting a new Lokalise integration, testing your setup, or learning basic Lokalise API patterns. Trigger with phrases like "lokalise hello world", "lokalise example", "lokalise quick start", "simple lokalise code".

2,266 Updated today
jeremylongshore
AI & Automation Featured

lokalise-local-dev-loop

Configure Lokalise local development with file sync and hot reload. Use when setting up a development environment, configuring translation sync, or establishing a fast iteration cycle with Lokalise. Trigger with phrases like "lokalise dev setup", "lokalise local development", "lokalise dev environment", "develop with lokalise", "lokalise sync".

2,266 Updated today
jeremylongshore
AI & Automation Featured

lokalise-data-handling

Implement Lokalise translation data handling, PII management, and compliance patterns. Use when handling sensitive translation data, implementing data redaction, or ensuring compliance with privacy regulations for Lokalise integrations. Trigger with phrases like "lokalise data", "lokalise PII", "lokalise GDPR", "lokalise data retention", "lokalise privacy", "lokalise compliance".

2,266 Updated today
jeremylongshore
AI & Automation Featured

lokalise-observability

Set up comprehensive observability for Lokalise integrations with metrics, traces, and alerts. Use when implementing monitoring for Lokalise operations, setting up dashboards, or configuring alerting for Lokalise integration health. Trigger with phrases like "lokalise monitoring", "lokalise metrics", "lokalise observability", "monitor lokalise", "lokalise alerts", "lokalise tracing".

2,266 Updated today
jeremylongshore