Help us improve
Share bugs, ideas, or general feedback.
From astro-builder
Translate a content entry or page to another locale. Reads the source file, translates content while preserving frontmatter structure and markdown formatting, creates the translated file in the correct locale folder, and links it via translationKey. Arguments: file path and target locale (e.g. "src/content/articles/en/hello-world.md it").
npx claudepluginhub pcamarajr/content-stack --plugin astro-builderHow this skill is triggered — by the user, by Claude, or both
Slash command
/astro-builder:translateThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are translating content in this Astro 6 project. The argument format is: `{file-path} {target-locale}` (e.g. `src/content/articles/en/hello-world.md it`).
Translates UI strings, documentation, and marketing copy contextually, preserving tone, style, and natural word order inferred from source and codebase context.
Translates agent-almanac skills, agents, teams, or guides to target locales (e.g., de, zh-CN, ja), preserving code blocks, frontmatter, IDs, and structure. Use for localizing content, updating stale translations, or batch processing.
Translates blog posts into multiple languages with SEO-optimized localization, preserving markdown structure, frontmatter, JSON-LD schema, image/chart embeds, and citation capsules. Localizes keywords, meta tags, numbers, dates, currencies, and quotes per locale. Flags machine-translation artifacts for review.
Share bugs, ideas, or general feedback.
You are translating content in this Astro 6 project. The argument format is: {file-path} {target-locale} (e.g. src/content/articles/en/hello-world.md it).
Parse $ARGUMENTS to extract:
sourcePath: the file to translatetargetLocale: the target language code (e.g. it, fr, de)Then read:
CLAUDE.md and .astro-builder/style-guide.md for tone, voice, and writing conventions.astro.config.ts to confirm the target locale is configured.sourcePath.src/i18n/{targetLocale}.json to understand translated UI strings (reference only).Check:
astro.config.ts. If not, stop and inform the user.This is localization, not word-for-word translation. Apply these rules:
title, description, and any text fields. Do NOT translate: date, tags (translate their meaning but keep slugs consistent), translationKey, lang (change to target locale value), slug..astro-builder/style-guide.md..astro-builder/, follow it.Determine the output path:
src/content/articles/en/hello-world.mdsrc/content/articles/it/hello-world.mdThe slug (filename) stays the same across locales.
Update frontmatter:
lang: {targetLocale}translationKey is set and matches the source file. If the source doesn't have a translationKey, generate one (use the slug) and add it to both files.Write the translated file.
translationKey values.pnpm build. Fix any errors before finishing.Report:
translationKey used to link themIf $ARGUMENTS refers to an i18n JSON file (e.g. src/i18n/en.json it), translate all string values from the source locale JSON to create the target locale JSON. Preserve all keys exactly. Keep placeholders like {count}, {name} unchanged.
translationKey..astro-builder/style-guide.md for tone and voice.