Skip to content

About

Write GitHub issues & PRs once in English + Chinese — readers see their own language first. Chrome extension + userscript for readers, Agent Skill for Claude Code, Codex, Cursor, Gemini CLI, Hermes and more.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

GitHub Bilingual icon

GitHub Bilingual

Write a GitHub issue or PR once, in English and Chinese. Every reader sees their own language first.

Chrome Web Store Userscript Agent Skill License: MIT

English · 简体中文


The same issue for a Chinese reader. Left, without the extension: English text, Chinese translation folded at the bottom. Right, with GitHub Bilingual: the Chinese version is shown, with a link back to the English original.

A made-up issue in a made-up repository. The right half is the real extension code running on the left half's page.

Maintainers read English; many users read Chinese. GitHub shows everyone the same body, so someone always scrolls past a wall of text they don't need.

GitHub Bilingual fixes it from both ends:

  • 🧩 Readers install a browser extension or userscript. A bilingual post opens in your browser's language, with one click back to the original.
  • 🤖 Writers give their coding agent a skill (Claude Code, Codex, Cursor, Gemini CLI, Hermes and more). The agent writes both halves in the right format and checks the body before gh issue create.

Note

Readers without the extension still see a normal post: the main text, then the full translation in a collapsed section. Nothing breaks if nobody installs anything.

🧩 For readers

Browser How to install
Chrome, Edge, Brave, Arc Add from the Chrome Web Store
Any browser with Tampermonkey or Violentmonkey Open github-bilingual.user.js; your userscript manager offers to install it
Pinned version, no store Download github-bilingual-extension.zip from the latest release, unzip, open chrome://extensions, turn on Developer mode, click Load unpacked

It follows your browser language. To pin one, use the toolbar popup or the userscript menu (Follow browser / Always 中文 / Always English).

Privacy: runs only on github.com, asks only for storage (to remember your language choice) and sends nothing anywhere. Full statement: PRIVACY.md.

🤖 For writers

Install the skill with the cross-agent installer (skills.sh):

npx skills add xiaoyaner0201/github-bilingual                          # this project
npx skills add xiaoyaner0201/github-bilingual -g                       # all projects
npx skills add xiaoyaner0201/github-bilingual -a codex -a claude-code  # pick agents

Then ask your agent: "open a PR for this, bilingual".

Or use your agent's own command:

Agent Install Where SKILL.md lands
Claude Code /plugin marketplace add xiaoyaner0201/github-bilingual
/plugin install github-bilingual@github-bilingual
Claude Code's plugin cache
OpenAI Codex npx skills add … -a codex .agents/skills/
Cursor npx skills add … -a cursor .agents/skills/
Gemini CLI gemini skills install https://github.com/xiaoyaner0201/github-bilingual.git --path skills/github-bilingual ~/.gemini/skills/
OpenCode npx skills add … -a opencode .agents/skills/
GitHub Copilot CLI npx skills add … -a github-copilot .agents/skills/
Windsurf npx skills add … -a windsurf .windsurf/skills/ (link to .agents/skills/)
Hermes Agent npx skills add … -a hermes-agent .hermes/skills/
DeepSeek Harness (dsh) copy skills/github-bilingual/ .agents/skills/ or .dsh/skills/
Google Antigravity copy skills/github-bilingual/ .agents/skills/
What was tested, and a note on Hermes

Every row with a command was run against this repository's main in a clean directory in November 2026 (skills CLI 1.9, Claude Code plugin install, Gemini CLI 0.26, Hermes), and each run put SKILL.md where the table says. The dsh and Antigravity rows follow those agents' documented skill folders; they were not run here.

hermes skills install xiaoyaner0201/github-bilingual/skills/github-bilingual also works, but Hermes scans community skills strictly: it reads a regular expression in the checker script as a shell pattern and stops. Read the script and re-run with --force, or use the npx skills line in the table.

📐 The format

## Summary
English main text, complete, with its images.

Closes #42

<details>
<summary>中文说明</summary>

## 概述
完整的中文正文和中文配图。

</details>

The only rule is the fold title: exactly 中文说明 when the folded half is Chinese, or exactly English when it is English (for Chinese-first projects). It must be the last top-level fold of the body, so other folds such as "Logs" or "Screenshots" never trigger anything.

Why a visible title and not a hidden tag? GitHub strips HTML comments and custom attributes from rendered Markdown, so the marker has to be text a human can read too.

Each half carries its own images, so diagrams switch language as well:

English and Chinese versions of the same infographic

🛠️ The checker

The skill ships a dependency-free script (Python 3.8+) the agent runs before publishing:

python3 skills/github-bilingual/scripts/bilingual_body.py check body.md
python3 skills/github-bilingual/scripts/bilingual_body.py normalize old.md -o new.md
python3 skills/github-bilingual/scripts/bilingual_body.py swap body.md -o body.md
  • check: exactly one marker fold, top level, last, with the blank lines GitHub needs. Closing keywords such as Closes #42 must stay in the main text.
  • normalize: upgrades old labels (English summary, 中文版, …) and merges a separate translated-image fold into the marker fold.
  • swap: makes the folded language the main text, for projects that want English first.

🔍 How it works

flowchart LR
  A[GitHub renders the body] --> B{Last top-level fold<br/>titled 中文说明 or English?}
  B -- no --> Z[Leave it alone]
  B -- yes --> C{Fold language =<br/>reader language?}
  C -- no --> Z
  C -- yes --> D[Hide main text<br/>open the fold<br/>add a switch-back link]
Loading
  • Never touches the editor or Markdown preview while you write.
  • Decides each comment on its own and follows GitHub's in-page navigation, so comments that load later switch too.
  • zh-CN, zh-TW and zh-HK browsers all count as Chinese.
  • The switching code makes no network requests. Your userscript manager may check the update URL, and Chrome may sync your language choice across your devices.

🧪 Development

npm install
npm test              # DOM tests (jsdom) + checker tests
npm run build         # regenerate extension/core.js and the userscript from src/core.js
npm run package       # dist/github-bilingual-extension.zip
CHROMIUM_PATH=/path/to/chromium npm run test:e2e   # load the real extension on a live PR

src/core.js is the only copy of the switching logic; the extension and the userscript are generated from it. The issue in the screenshot at the top is docs/demo/issue-128.md.

🗺️ Roadmap

  • Firefox Add-ons listing
  • More language pairs (the marker table is one line per language)

License

MIT

About

Write GitHub issues & PRs once in English + Chinese — readers see their own language first. Chrome extension + userscript for readers, Agent Skill for Claude Code, Codex, Cursor, Gemini CLI, Hermes and more.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages