56 results available
Sign in
Skills directory

mkdocs-translations

github

·

Last changed
Not yet hardened

This version isn't hardened by Chainguard

No hardening report available.


SKILL.md

MkDocs AI Translator

Role

You are a professional technical writer and translator.

Required Input

Before proceeding, ask the user to specify the target translation language and locale code.
Examples:

  • Spanish (es)
  • French (fr)
  • Brazilian Portuguese (pt-BR)
  • Korean (ko)

CRITICAL — Input Validation (must complete before any other step): The locale code provided by the user must match the pattern ^[a-zA-Z]{2,3}(-[a-zA-Z]{2,4})?(-[a-zA-Z0-9]{2,4})?$ (e.g., es, fr, pt-BR, zh-Hans, zh-Hant-TW).

  • If the input contains any shell metacharacters (;, &, |, $, \, `, (, )) or path traversal sequences (.., leading /), stop immediately, report the invalid value to the user, and do not proceed with any file operations, path construction, git commands, or YAML edits.
  • If the input does NOT match the pattern above, stop immediately, report the invalid value to the user, and do not proceed.
  • Do not attempt to sanitize or repair invalid input — reject it outright.
  • This validation applies to every use of the locale code throughout the skill, including folder names, git branch names, YAML entries, and include path rewrites.

Use this validated value consistently in folder names, translated content paths, and MkDocs configuration updates. Once confirmed and validated, proceed with the instructions below.


Objective

Translate all documentation from the docs/docs/en and docs/docs/includes/en folders into the specified target language. Preserve the original folder structure and all Markdown formatting.


File Listing and Translation Order

The following is the task list you must complete. Check each item off as it is done and report that to the user.

  • Begin by listing all files and subdirectories under docs/docs/en.
  • Then list all files and subdirectories under docs/docs/includes/en.
  • Translate every file in the list one by one in the order shown. Do not skip, reorder, or stop after a fixed number of files.
  • After each translation, check whether there are remaining files that have not yet been translated. If there are, continue automatically with the next file.
  • Do not prompt for confirmation between individual file translations—proceed automatically through the per-file translation loop until all content files are translated. This automatic progression applies only to the file-by-file translation work, not to branch creation or mkdocs.yml modification, which require separate explicit approval (see those sections).
  • Once completed, confirm that the number of translated files matches the number of source files listed. If any files remain unprocessed, resume from where you left off.

Folder Structure and Output

Path Constraint: All translated output files must be written exclusively under docs/docs/<validated-locale>/ and docs/docs/includes/<validated-locale>/, where <validated-locale> is the validated code from the Input Validation step. If any computed output path would resolve outside these two directories (e.g., via .. segments or absolute paths), stop immediately and report an error. Do not write any files until this check passes. Note: mkdocs.yml at the repository root is separately updated in the MkDocs Configuration Update section below.

Before starting to create any new files, you must create a new git branch. Confirmation required: Show the user the exact command that will be run: git checkout -b docs-translation-<validated-locale> and wait for explicit approval before executing it.

  • Create a new folder under docs/docs/ named using the validated locale code.
    Examples:
    • es for Spanish
    • fr for French
    • pt-BR for Brazilian Portuguese
  • Mirror the exact folder and file structure from the original en directories.
  • For each translated file:
    • Preserve all Markdown formatting, including headings, code blocks, metadata, and links.
    • Maintain the original filename.
    • Do not wrap the translated content in Markdown code blocks.
    • Append this line at the end of the file:
      Translated using GitHub Copilot and GPT-4o.
    • Save the translated file into the corresponding target language folder.

Include Path Updates

  • Update include references in files to reflect the new locale.
    Example:
    includes/en/introduction-event.md → includes/es/introduction-event.md
    Replace es with the actual validated locale code.

MkDocs Configuration Update

Confirmation required before this step: Show the user a diff of all proposed changes to mkdocs.yml and wait for explicit approval before writing them. When writing the locale value into mkdocs.yml, always quote it (e.g., locale: 'pt-BR', not locale: pt-BR) to prevent YAML parsing issues.

  • Modify the mkdocs.yml configuration:
    • Add a new locale entry under the i18n plugin using the validated locale code, always quoted (e.g., locale: 'pt-BR').
    • Provide appropriate translations for:
      • nav_translations
      • admonition_translations

Translation Rules

  • Use accurate, clear, and technically appropriate translations.
  • Always use computer industry-standard terminology.
    Example: prefer "Stack Tecnológica" over "Pila Tecnológica".

Do not:

  • Comment on, suggest changes for, or attempt to fix any formatting or Markdown linting issues.
    This includes, but is not limited to:
    • Missing blank lines around headings or lists
    • Trailing punctuation in headings
    • Missing alt text for images
    • Improper heading levels
    • Line length or spacing issues
  • Do not say things like:
    "There are some linting issues, such as…"
    "Would you like me to fix…"
  • Never prompt the user about any linting or formatting issues.
  • Do not wait for confirmation between individual file translations. Branch creation and mkdocs.yml edits still require explicit user approval per those sections.
  • Do not wrap the translated content or file in Markdown code blocks.

Translating Includes (docs/docs/includes/en)

  • Create a new folder under docs/docs/includes/ using the validated locale code.
  • Translate each file using the same rules as above.
  • Maintain the same file and folder structure in the translated output.
  • Save each translated file in the appropriate target language folder.

Install

Need this version hardened?

Harden your own skills

Bring Chainguard's hardening pipeline to your first-party skills — custom rulesets, automated remediation, full audit trail.

Provenance

Upstream source

—

Upstream commitcf4347e88c2e40a9aabe5801748ec6bf924c09be
OCI reference

—

License

MIT

Files

HARDENING.md

LICENSE

SKILL.md


The trusted source for open source

Talk to an expert
PrivacyTerms

Product

Chainguard ContainersChainguard LibrariesChainguard VMsChainguard OS PackagesChainguard ActionsChainguard Agent SkillsIntegrationsPricing
© 2026 Chainguard, Inc. All Rights Reserved.
Chainguard® and the Chainguard logo are registered trademarks of Chainguard, Inc. in the United States and/or other countries.
The other respective trademarks mentioned on this page are owned by the respective companies and use of them does not imply any affiliation or endorsement.