/mahjong:mahjongfrom Mahjong
Launch a single-player American Mah Jongg game (NMJL-style 2026 rules) inline in chat against three computer players who can also win, with Beginner/Intermediate/Advanced levels and a built-in coach. Use for /mahjong or "play mahjong".
Ships in Mahjong. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A full American Mah Jongg game that you play in the chat window. Three computer players (Rose, Pearl, Hazel) play by the same rules and can win. The game teaches as you play.
mahjong/
SKILL.md this file
CHATGPT.md how to play the same game in ChatGPT
COVERAGE.md requirement → code → test map
assets/mahjong.html THE GAME: one self-contained file (no network, no dependencies)
assets/PARITY.json sha256 proof that the embedded engine == src/engine.js
src/engine.js rules engine (pure JS, also runs in Node)
src/ui.html table, racks, coach, card, SCW panel (template)
build.py inlines engine into ui → assets/mahjong.html (optional --logo)
tests/engine.test.js rules + 240 full bot games + level-strength check
tests/ui.test.py headless browser plays whole games as the user (desktop + phone)
assets/mahjong.html from this skill folder. Do not rewrite or summarize it. Use the file exactly as it is.<body> plus the <style> block).assets/mahjong.html so the user can open it in any browser.If the user names a level ("/mahjong advanced"), tell them to pick it on the start screen. The level choice is saved in the browser where storage is allowed.
SCW0 game container: wall, discards, turn, phase (public)
├─ SCW1 East (goes first) private rack + exposures
├─ SCW2 South
├─ SCW3 West
└─ SCW4 North
SCW numbers follow the winds, so East is always SCW1 even after the dealer rotates. Every log line is tagged with its SCW. The SCW tab can copy the public SCW state as JSON. Other players' racks stay hidden until the game ends.
The 2026 NMJL card is copyrighted, and the League doesn't allow reproduction without approval. So this game does not include the League's hands. It uses original practice hands built from the same parts (year, evens, like numbers, runs, odds, winds and dragons, 3-6-9, singles and pairs). The rules are summarized in our own words and follow 2026 NMJL standard play. Players with their own 2026 card get the same rules and skills here; only the list of hands is different.
node tests/engine.test.js # expect: 17 passed, 0 failed
python3 build.py [--logo logo.png] # expect: "parity": true
python3 tests/ui.test.py # expect: UI tests passed, no page errors
CHATGPT.md (opens in a new tab)COVERAGE.md (opens in a new tab)assets/PARITY.json (opens in a new tab)assets/mahjong.html (opens in a new tab)build.py (opens in a new tab)src/engine.js (opens in a new tab)src/ui.html (opens in a new tab)tests/engine.test.js (opens in a new tab)tests/ui.test.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub mmc7676/human0 --plugin mahjong