EdgeKits

Astro i18n — DevOps skill for Claude Code

DevOps community

Edge-native i18n for Astro on Cloudflare Workers: translations as data in Workers KV, a per-namespace edge cache purged only where content changed, typed translation keys, a locale-routing middleware.

How to install Astro i18n

This entry records only its repository, not the path inside it, so there is no exact command to give. Open EdgeKits/astro-i18n and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Astro i18n does

Edge-native i18n for Astro on Cloudflare Workers: translations as data in Workers KV, a per-namespace edge cache purged only where content changed, typed translation keys, a locale-routing middleware and a CLI. Plus a Claude Code skill.

Alternatives in DevOps

  • Cloudflare Deploy — Deploy apps to Cloudflare using Workers, Pages, and platform services 14.6k ★
  • Datachain — The Context Layer for unstructured data: typed, versioned datasets over S3, GCS, Azure 2.8k ★
  • Workers MCP — Talk to a Cloudflare Worker from Claude Desktop 646 ★

README

@edgekits/astro-i18n

Edge-native i18n for Astro on Cloudflare Workers. Translations live as data in Workers KV, one JSON value per locale and namespace, so the server renders every page in its language and nothing ships to the client; changing a string is a KV write, not a redeploy. Each namespace is cached at the edge under its own URL, and `edgekits-i18n migrate` purges only the namespaces whose content changed through the Cloudflare Purge API. The default locale's JSON files define a typed schema: the CLI generates the `I18n.Schema` declaration, so `t.common.hero.title` is checked by TypeScript and a missing key is a compile error.

The design is explained in the edgekits.dev series: [Stop Shipping Translations to the Client, Part 1](https://edgekits.dev/en/blog/edge-native-i18n-astro-cloudflare-part-1/), [Part 2](https://edgekits.dev/en/blog/edge-native-i18n-astro-cloudflare-part-2/) and [Stop Redeploying to Update Translations (Part 3)](https://edgekits.dev/en/blog/granular-edge-cache-purge-astro-cloudflare-part-3/).

Requirements

  • Astro ^7.3 with output: 'server' and the @astrojs/cloudflare adapter ^14.3.
  • wrangler ^4.125, installed in the project (a peer dependency: the CLI runs the project's own wrangler for its KV writes).
  • A wrangler.jsonc (the CLI reads that file; wrangler.toml and wrangler.json are not read).
  • Node >=22.
  • A Workers KV namespace bound as TRANSLATIONS.
  • For migrate only: the site on a proxied Cloudflare zone, its zone ID, and an API token with the Zone › Cache Purge permission.

Quick start

1. Install

npm i @edgekits/astro-i18n

2. Bind a KV namespace

npx wrangler kv namespace create TRANSLATIONS

Add the namespace to `wrangler.jsonc` under the binding name `TRANSLATIONS`:

{
  "compatibility_date": "2026-09-01",
  "kv_namespaces": [{ "binding": "TRANSLATIONS", "id": "" }],
}

3. Write `edgekits-i18n.config.ts`

At the project