Write a GitHub issue or PR once, in English and Chinese. Every reader sees their own language first.
English · 简体中文
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.
| 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.
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 agentsThen 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.
## 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:
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.mdcheck: exactly one marker fold, top level, last, with the blank lines GitHub needs. Closing keywords such asCloses #42must 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.
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]
- 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-TWandzh-HKbrowsers 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.
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 PRsrc/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.
- Firefox Add-ons listing
- More language pairs (the marker table is one line per language)

