AgentSkillsCN

agent-sync

当用户希望将智能体定义从西班牙语(预发布环境)同步至英语(生产环境)时,可使用此技能。它能在保留原有结构、前言信息及专业术语的前提下,完成 AGENTS.md、SOUL.md 和 README.md 文件的翻译工作。适用于以下场景:“同步智能体”、“翻译智能体”、“更新英语版本”,或当西班牙语源文件发生修改时使用。

SKILL.md
--- frontmatter
name: agent-sync
description: "Use this skill when the user wants to synchronize agent definitions from Spanish (staging) to English (production). Handles translation of AGENTS.md, SOUL.md, and README.md files while preserving structure, frontmatter, and technical terminology. Use when: 'sync agents', 'translate agents', 'update English versions', or when Spanish source files have been modified."

Agent Sync: Spanish (Staging) → English (Production)

Overview

This skill translates and synchronizes agent definition files from the Spanish source (source/ and others/) to the English production layer (resources/languages/en/). The Spanish files are the single source of truth (staging). English files are the production output that feeds into OpenCode.

Repository Architecture

code
source/<AgentName>/AGENTS.md          ← Spanish (staging, source of truth)
source/<AgentName>/SOUL.md            ← Spanish (optional, personality details)
source/<AgentName>/README.md          ← Spanish (optional, documentation)
others/<AgentName>/AGENTS.md          ← Spanish (third-party agents)

resources/languages/en/source/<AgentName>/AGENTS.md   ← English (production)
resources/languages/en/source/<AgentName>/SOUL.md      ← English (production)
resources/languages/en/source/<AgentName>/README.md    ← English (production)
resources/languages/en/others/<AgentName>/AGENTS.md    ← English (production)

The Process

Step 1: Identify What Needs Syncing

Before translating, determine which agents need updates:

  1. List all directories in source/ and others/
  2. For each agent, check if the English counterpart exists in resources/languages/en/
  3. If the English version is missing → full translation needed
  4. If the English version exists → compare content to detect drift

Check command:

code
For each agent in source/:
  - Read source/<Agent>/AGENTS.md
  - Read resources/languages/en/source/<Agent>/AGENTS.md (if exists)
  - Compare section headers and content structure

Step 2: Translation Rules

When translating Spanish → English, follow these rules strictly:

PRESERVE exactly (never translate):

  • Agent names (e.g., "Yupi Dupi", "Carmen Marin")
  • YAML frontmatter keys (name, name_bot, description, tags, mode, tools)
  • Technical terms that are industry-standard in English (e.g., "sharding", "ACID", "CAP theorem", "circuit breaker")
  • Tool names (e.g., "PostgreSQL", "Kubernetes", "Obsidian")
  • Framework names (e.g., "Angular", "React", "Redux")
  • Pattern names (e.g., "strangler fig", "bulkhead pattern")
  • Markdown structure (headers, lists, emphasis)
  • File names referenced in content

TRANSLATE:

  • Section headers: ## Personalidad## Personality, ## Idioma## Language, etc.
  • Body text and descriptions
  • YAML description value in frontmatter
  • Analogies should be culturally adapted when the Spanish version uses region-specific references

Section header mapping:

SpanishEnglish
PersonalidadPersonality
IdiomaLanguage
TonoTone
Filosofía / FilosofiaPhilosophy
ExperienciaExperience
ComportamientoBehavior
ReglasRules
Reglas TécnicasTechnical Rules
ObjetivoObjective
Descripción GeneralOverview
Características DistintivasDistinctive Characteristics
ComunicaciónCommunication
Filosofía OperativaOperating Philosophy
Cuándo UtilizarloWhen to Use It
Nota sobre el TonoNote on Tone
InstruccionesInstructions

Language section special handling: The ## Idioma / ## Language section defines how the agent responds based on input language. When translating:

  • Keep the behavioral rules intact
  • Translate the surrounding description but preserve the example words/phrases
  • The Spanish slang examples (boludo, quilombo, etc.) stay as-is in both versions

Step 3: Create Missing Directories

If the English directory doesn't exist:

code
mkdir -p resources/languages/en/source/<AgentName>/

For agents in others/:

code
mkdir -p resources/languages/en/others/<AgentName>/

Step 4: Translate Each File

For each file in the Spanish agent directory (AGENTS.md, SOUL.md, README.md):

  1. Read the Spanish file completely
  2. Apply translation rules from Step 2
  3. Write the English file to the mirrored path
  4. Verify the English file has the same number of sections as the Spanish file

Step 5: Verify Sync

After translation, verify:

  • Same number of markdown files per agent in both languages
  • Same section headers (translated) in each file pair
  • Frontmatter keys match (values translated where appropriate)
  • No untranslated Spanish body text remaining in English files
  • Technical terms preserved correctly

Current Agent Inventory

AgentLocationHas AGENTS.mdHas SOUL.mdHas README.md
Carmen Marinsource/YesNoYes
Dianasource/YesNoNo
Marty McBotsource/YesNoYes
Sigmund Botsource/YesNoYes
Yupi Dupisource/YesYesYes
Yurnalsource/YesNoYes
GentlemanClaudeothers/YesNoNo

Key Principles

  • Spanish is always the source of truth - Never modify Spanish files during sync; only read them
  • Preserve structure exactly - Same files, same sections, same frontmatter keys
  • One agent at a time - Sync and verify each agent before moving to the next
  • Report what changed - After sync, list every file created or updated