anomalyco / anomalyco/opencode

[FEATURE]: Support external i18n locale packs (community-driven translations) for skills, tools, and agents

Open
#40,982 2 comments 0 reactions 1 assignee View on GitHub

@nexxeln is already working on this.

Since Aug 7, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Feature hasn't been suggested before.
  • I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Problem

opencode surfaces (Web UI, TUI) display hardcoded English text for skills, tools, and agents (names + descriptions). Non-English users currently cannot localize these without editing source files:

  • Skill name/description come read-only from each SKILL.md frontmatter and are served verbatim by GET /skill (AppSkillsResponses{name, description, location, content}).
  • Tool and agent names/descriptions are similarly hardcoded.

Editing source files is not durable: skills/agents installed via packages such as @opengsd/gsd-core are overwritten on every update.

Why plugin hooks can't solve this

  • tool.definition — only affects tool definitions sent to the LLM, not the UI.
  • experimental.chat.system.transform — only affects the LLM system prompt.
  • There is no plugin hook intercepting the /skill (or tool/agent) API responses consumed by the Web UI.

Requested behavior

Follow opencode's existing external-directory convention (like themes/, agents/, commands/) to load community locale packs:

  1. Config selects the locale:
{
  "i18n": {
    "locale": "zh-CN"
  }
}
  1. External locale pack directory — same pattern as other opencode config dirs:
~/.config/opencode/locales/zh-CN.json
# or
~/.config/opencode/locales/zh-CN/skills.json
                         /zh-CN/tools.json
                         /zh-CN/agents.json
  1. Locale pack content — keyed by identifier, overriding name/description for display only:
{
  "skills": {
    "gsd-update":     { "name": "GSD 更新", "description": "更新 GSD 到最新版本并显示变更日志" },
    "code-optimizer": { "description": "深度代码优化审计" }
  },
  "tools": {
    "bash": { "description": "执行 Bash 命令" }
  },
  "agents": {
    "explore": { "description": "快速探索代码库" }
  }
}
  1. Community-distributed: locale packs are dropped into the directory by users (or installed from npm). opencode provides the loading + application mechanism; the zh-CN pack itself is community-maintained.

Design constraints

  • Overrides apply only to display — must not modify on-disk SKILL.md / agent / tool source files.
  • Must survive skill/agent package updates (no re-edit after gsd-update).
  • Follow the same precedence/merge convention as other opencode config files.
  • Works in Web UI (opencode web) and ideally TUI.

Expected outcome

Non-English users install/place a community locale pack, switch i18n.locale, and see localized skill/tool/agent names and descriptions everywhere — without editing source files and without losing translations on updates.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.