โ† Back to Skills Marketplace
sceneun1ty

Mahjong AI

by sceneun1ty ยท GitHub โ†— ยท v1.0.1 ยท MIT-0
cross-platform โœ“ Security Clean
186
Downloads
0
Stars
0
Active Installs
3
Versions
Install in OpenClaw
/install mahjong-ai
Description
AI Mahjong Assistant ๐Ÿ€„ โ€” Snap a photo of your hand, get optimal discard suggestions. Sichuan Mahjong rules (Blood Battle / ่ก€ๆˆ˜ๅˆฐๅบ•). Supports tile recognition...
README (SKILL.md)

้บปๅฐ† AI ๅŠฉๆ‰‹ ๐Ÿ€„

ๅท้บป๏ผˆๅ››ๅท้บปๅฐ†๏ผ‰AI ๅ‡บ็‰Œ้กพ้—ฎใ€‚ๆ‹็…งๅ‘ๆ‰‹็‰Œ๏ผŒๅˆ†ๆžๆœ€ไผ˜ๅ‡บ็‰Œใ€‚

่ง„ๅˆ™๏ผšๅท้บป๏ผˆ่ก€ๆˆ˜ๅˆฐๅบ•๏ผ‰

  • ๅชๆœ‰ ็ญ’ใ€ๆกใ€ไธ‡ ไธ‰้—จ๏ผŒๅ…ฑ 108 ๅผ ๏ผˆๆฏ็ง 1-9 ๅ„ 4 ๅผ ๏ผ‰
  • ๆฏไบบ 13 ๅผ ๆ‰‹็‰Œ๏ผŒๆ‘ธ็‰ŒๅŽ 14 ๅผ ้€‰ๆ‹ฉๅ‡บ็‰Œ
  • ่ƒก็‰Œๆกไปถ๏ผš4 ็ป„้ขๅญ๏ผˆ้กบๅญ/ๅˆปๅญ๏ผ‰+ 1 ๅฏนๅฐ†๏ผˆ้›€ๅคด๏ผ‰
  • ็‰นๆฎŠ่ƒกๆณ•๏ผšไธƒๅฏนใ€้พ™ไธƒๅฏนใ€ๆธ…ไธ€่‰ฒใ€ๅฏนๅฏน่ƒก็ญ‰
  • ่ก€ๆˆ˜ๅˆฐๅบ•๏ผšไธ€ไบบ่ƒกไบ†็ปง็ปญๆ‰“๏ผŒ็›ดๅˆฐๅ‰ฉไธ€ไบบๆฒก่ƒก

ๅทฅไฝœๆต็จ‹

Step 1: ่ฏ†ๅˆซ็‰Œ้ข๏ผˆๆ‹็…ง๏ผ‰

ๆ”ถๅˆฐ็…ง็‰‡ๅŽ๏ผŒ็”จ่ง†่ง‰่ฏ†ๅˆซ๏ผš

  1. ๆ‰‹็‰Œ๏ผˆ13ๆˆ–14ๅผ ๏ผ‰
  2. ๅœบไธŠๅทฒๆ‰“ๅ‡บ็š„็‰Œ๏ผˆ็‰Œๆฑ /ๆฒณ็‰Œ๏ผ‰
  3. ๅทฒ็ขฐ/ๆ ็š„็‰Œ

็ผ–็ ๆ ผๅผ๏ผš

  • ไธ‡ๅญ๏ผš1m 2m ... 9m
  • ็ญ’ๅญ๏ผš1p 2p ... 9p
  • ๆกๅญ๏ผš1s 2s ... 9s

ๅˆ—ๅ‡บ่ฏ†ๅˆซ็ป“ๆžœ่ฎฉ็”จๆˆท็กฎ่ฎคๅŽๅ†ๅˆ†ๆžใ€‚

Step 2: ่ฟ่กŒๅˆ†ๆž

python3 scripts/mahjong_analyze.py \
  --hand "1m,2m,3m,5m,5m,3p,4p,7p,8p,9p,2s,3s,4s,6s" \
  --discard "1p,2p,5p,5p,9s,9s" \
  --meld "6m,6m,6m"

ๅ‚ๆ•ฐ๏ผš

  • --hand / -H๏ผšๆ‰‹็‰Œ๏ผˆๅฟ…ๅกซ๏ผŒ13ๆˆ–14ๅผ ๏ผ‰
  • --discard / -d๏ผšๅœบไธŠๅทฒๆ‰“ๅ‡บ็š„็‰Œ๏ผˆๅฏ้€‰๏ผ‰
  • --meld / -m๏ผšๅทฒ็ขฐ/ๆ ็š„็‰Œ๏ผˆๅฏ้€‰๏ผ‰

Step 3: ่พ“ๅ‡บๅปบ่ฎฎ

  • 14ๅผ  โ†’ ๆŽจ่ๆ‰“ๅ“ชๅผ ๏ผŒ้™„ๅฎ‰ๅ…จๅบฆ๐ŸŸข๐ŸŸก๐Ÿ”ด + ๅฌ็‰Œๅผ ๆ•ฐ
  • 13ๅผ  โ†’ ๆ˜พ็คบๅฌไป€ไนˆ็‰Œ + ๅ‰ฉไฝ™ๅผ ๆ•ฐ
  • ๅฎ‰ๅ…จๅบฆๅŸบไบŽๅœบ้ขๅทฒๅ‡บ็‰Œ่ฎก็ฎ—๏ผˆๅ‡บ่ถŠๅคš่ถŠๅฎ‰ๅ…จใ€19่พนๅผ ๆ›ดๅฎ‰ๅ…จ๏ผ‰

ๅท้บป็‰นๆฎŠ่ง„ๅˆ™

  • ไธ่ƒฝๅƒ๏ผŒๅช่ƒฝ็ขฐ/ๆ /่ƒก
  • ่ก€ๆˆ˜ๅˆฐๅบ•๏ผšไธ€ไบบ่ƒกไบ†็ปง็ปญๆ‰“
  • ็•ชๆ•ฐ๏ผšๆธ…ไธ€่‰ฒ4็•ชใ€ไธƒๅฏน4็•ชใ€้พ™ไธƒๅฏน8็•ชใ€ๅฏนๅฏน่ƒก2็•ช

ๅ‚่€ƒ

  • ่ฏฆ็ป†็‰Œ็†๏ผš่ง references/mahjong_theory.md
Usage Guidance
This skill appears to be a local Mahjong analysis tool (python script + docs) and does not request credentials or install external packages. Before installing/use, confirm: (1) how the photoโ†’tile recognition step is performed โ€” the bundle contains a visual guide but no vision model or remote endpoint; if your agent/platform performs vision, ensure images are not sent to unknown external services; (2) inspect scripts/mahjong_analyze.py for any network calls or filesystem operations (the visible portion uses only stdlib but review the whole file); (3) run the script in an isolated environment (e.g., a sandbox or virtualenv) to verify behavior and outputs; and (4) if you plan to share images, be comfortable with where they are processed/stored. If you want, I can scan the full mahjong_analyze.py file for network I/O, subprocess usage, or other risky operations.
Capability Analysis
Type: OpenClaw Skill Name: mahjong-ai Version: 1.0.1 The mahjong-ai skill bundle is a legitimate Mahjong assistant designed for Sichuan Mahjong rules. The core logic in scripts/mahjong_analyze.py is a self-contained Python script using only standard libraries to calculate game states (shanten, waiting tiles) and provide strategic advice. The instructions in SKILL.md and documentation in README.md/DEVLOG.md are entirely consistent with the stated purpose, showing no signs of malicious intent, data exfiltration, or prompt injection attacks.
Capability Assessment
โœ“ Purpose & Capability
Name/description (Mahjong AI, Sichuan rules, discard suggestions) match the included README, DEVLOG, SKILL.md, and the provided analysis script; required resources (none) are appropriate for an offline Python analyzer.
โ„น Instruction Scope
SKILL.md describes a workflow that includes visual recognition of a photographed hand and then running the local analyzer with parsed tiles. The repository contains guidance for tile-vision (references/tile_visual_guide.md) but no vision/model code or network endpoints. The instructions appropriately ask the agent to list recognition results for user confirmation before analysis โ€” clarify where image recognition runs (platform-provided vision vs. external service) to close this gap.
โœ“ Install Mechanism
No install spec; code is a standalone Python script using only standard-library modules (argparse, collections, itertools, sys). No downloads, package installs, or thirdโ€‘party binaries are requested.
โœ“ Credentials
No environment variables, credentials, or config paths are required. The skill does not request unrelated secrets or elevated access.
โœ“ Persistence & Privilege
Skill is not always-enabled and uses normal model invocation. It does not request system-wide changes or persistent elevated privileges.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install mahjong-ai
  3. After installation, invoke the skill by name or use /mahjong-ai
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
ๅท้บปAIๅ‡บ็‰Œ้กพ้—ฎ๏ผšๆ‹็…ง่ฏ†ๅˆซๆ‰‹็‰Œ+ๆœ€ไผ˜ๅ‡บ็‰Œๅˆ†ๆž+ๅฌ็‰Œ่ฎก็ฎ—+ๅฎ‰ๅ…จๅบฆ่ฏ„ไผฐ
v1.1.0
Added English README, improved description and tags for international users
v1.0.0
Initial release
Metadata
Slug mahjong-ai
Version 1.0.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 3
Frequently Asked Questions

What is Mahjong AI?

AI Mahjong Assistant ๐Ÿ€„ โ€” Snap a photo of your hand, get optimal discard suggestions. Sichuan Mahjong rules (Blood Battle / ่ก€ๆˆ˜ๅˆฐๅบ•). Supports tile recognition... It is an AI Agent Skill for Claude Code / OpenClaw, with 186 downloads so far.

How do I install Mahjong AI?

Run "/install mahjong-ai" in the OpenClaw or Claude Code chat to install it in one step โ€” no extra setup required.

Is Mahjong AI free?

Yes, Mahjong AI is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Mahjong AI support?

Mahjong AI is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Mahjong AI?

It is built and maintained by sceneun1ty (@sceneun1ty); the current version is v1.0.1.

๐Ÿ’ฌ Comments