Lokalise Reference ArchitectureSAFE
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
Overview
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
4f83675ca38aOBSERVED · 2026-10-09Host compatibility
What the documentation claims. We have not run a compatibility test.
| Host | Status | Notes |
|---|---|---|
| claude-code | mentioned |
What it tells the agent
The instruction file, verbatim from the audited commit — this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.
--- name: lokalise-reference-architecture description: 'Implement Lokalise reference architecture with best-practice project layout. Use when designing new Lokalise integrations, reviewing project structure, or establishing architecture standards for Lokalise applications. Trigger with phrases like "lokalise architecture", "lokalise best practices", "lokalise project structure", "how to organize lokalise", "lokalise layout". ' allowed-tools: Read, Grep version: 1.14.0 license: MIT author: Jeremy Longshore <[email protected]> tags: - saas - lokalise - lokalise-reference compatibility: Designed for Claude Code --- # Lokalise Reference Architecture ## Overview A production-ready architecture for integrating Lokalise into web applications. Covers the end-to-end translation flow from source code through CI/CD and Lokalise to deployed translations, recommended project structure for i18n, file organization conventions, multi-app translation sharing, and the tradeoffs between OTA (over-the-air) and build-time translation loading. ## Prerequisites - Node.js 18+ with TypeScript - `@lokalise/node-api` SDK installed (`npm install @lokalise/node-api`) - An i18n framework selected (i18next, react-intl, vue-i18n, or equivalent) - Lokalise project created with at least one source language configured - Basic understanding of CI/CD pipelines (GitHub Actions, GitLab CI, or equivalent) ## Instructions ### Step 1: Architecture Diagram The translation lifecycle follows this flow: ``` ┌─────────────┐ ┌──────────┐ ┌─────────────┐ │ Source Code │────▶│ CI/CD │────▶│ Lokalise │ │ │ │ (upload) │ │ (TMS) │ │ en.json │ └──────────┘ │ │ │ t('key') │ │ ┌────────┐ │ └─────────────┘ │ │Transla-│ │ │ │ tors │ │ │ └────────┘ │ ┌─────────────┐ ┌──────────┐ │ │ │ Deploy │◀────│ CI/CD │◀────│ Download │ │ │ │ (build) │ │ │ │ CDN/Server │ └──────────┘ └─────────────┘ └──────┬──────┘ ┌─────────────┐ │ │ Lokalise │ │ (OTA path) │ OTA CDN │ │◀────────────────────────────│ │ │ └─────────────┘ ┌──────▼──────┐ │ Users │ │ (browser/ │ │ mobile) │ └─────────────┘ ``` **Two delivery paths:** 1. **Build-time** (solid arrows): Translations downloaded during CI build, bundled into the application. Changes require a new deployment. 2. **OTA** (dashed arrow): Translations fetched from Lokalise CDN at runtime. Changes appear without redeployment. Adds a network dependency. ### Step 2: Project Structure for i18n Organize your codebase to separate translation concerns from business logic: ``` project-root/ ├── src/ │ ├── i18n/ │ │ ├── index.ts # i18n initialization and configuration │ │ ├── client.ts # Lokalise API client wrapper │ │ ├── loader.ts # Translation loader (build-time or OTA) │ │ ├── fallback.ts # Fallback translation logic │ │ ├── types.ts # TypeScript types for translation keys │ │ └── middleware.ts # Express/Next.js locale detection middleware │ │ │ ├── locales/ │ │ ├── en.json # Source language (committed to git) │ │ ├── de.json # Downloaded from Lokalise (gitignored or committed) │ │ ├── fr.json │ │ ├── es.json │ │ └── ja.json │ │ │ ├── locales-fallback/ # Static fallback copy (always committed) │ │ ├── en.json │ │ ├── de.json │ │ └── ... │ │ │ └── components/ │ └── ... # Components use t('key') from i18n │ ├── scripts/ │ ├── lokalise-pull.sh # Download translations from Lokalise │ ├── lokalise-push.sh # Upload source strings to Lokalise │ ├── validate-translations.ts # Check coverage, placeholders, format │ └── generate-types.ts # Generate TypeScript types from en.json │ ├── .github/workflows/ │ ├── lokalise-upload.yml # Upload on push to main │ └── lokalise-download.yml # Download during build │ └── lokalise.config.ts # Lokalise project configuration ``` ### Step 3: Core Configuration ```typescript // src/i18n/index.ts import i18next from 'i18next'; import { initReactI18next } from 'react-i18next'; // or vue-i18n, svelte-i18n, etc. import en from '../locales/en.json'; export const SUPPORTED_LOCALES = ['en', 'de', 'fr', 'es', 'ja'] as const; export type SupportedLocale = typeof SUPPORTED_LOCALES[number]; export const DEFAULT_LOCALE: SupportedLocale = 'en'; i18next .use(initReactI18next) .init({ resources: { en: { translation: en } }, lng: DEFAULT_LOCALE, fallbackLng: DEFAULT_LOCALE, supportedLngs: [...SUPPORTED_LOCALES], load: 'languageOnly', // 'de' not 'de-DE' returnEmptyString: false, // Treat '' as missing → use fallback interpolation: { escapeValue: false }, detection: { order: ['cookie', 'navigator', 'htmlTag'], caches: ['cookie'], }, }); export default i18next; ``` ### Step 4: Lokalise API Client Wrapper ```typescript // src/i18n/client.ts import { LokaliseApi } from '@lokalise/node-api'; interface LokaliseClientConfig { apiToken: string; projectId: string; rateLimitPerSec?: number; } export class LokaliseClient { private api: LokaliseApi; private projectId: string; private requestTimestamps: number[] = []; private maxRequestsPerSec: number; constructor(config: LokaliseClientConfig) { this.api = new LokaliseApi({ apiKey: config.apiToken }); this.projectId = config.projectId; this.maxRequestsPerSec = config.rateLimitPerSec ?? 6; } /** * Download all translation files as a zip bundle URL. */ async
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (0)
No findings outside the package's declared scope.
Gates applied: no_behavioural_pass.
4f83675ca38afull audit observations/trust-audit/skill/jeremylongshore__lokalise-reference-architecture.json · Report an issue / request a re-scanAudit history
Every audit this skill has had.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-09 | 4f83675ca38a | SAFE | B | 89 | first audit |
Questions
What does the Lokalise Reference Architecture skill do?
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
Is Lokalise Reference Architecture safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can Lokalise Reference Architecture access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
Which assistants does Lokalise Reference Architecture work with?
Its documentation mentions claude-code. That is what the text claims, not a compatibility test we ran.
How current is this page?
The grade is for one exact copy of the source (4f83675ca38a), read on 2026-10-09. The repository is watched, and a new audit runs when it changes — this is the first audit.