mahjong-test-generator

Generate Mahjong test scenarios for win detection, gold substitution, calling, and scoring.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Teng-AI/mahjong --skill mahjong-test-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mahjong-test-generator
Source: https://github.com/Teng-AI/mahjong/tree/main/.claude/skills/mahjong-test-generator
Command: npx skills add https://github.com/Teng-AI/mahjong --skill mahjong-test-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generate test scenarios for Fujian Mahjong game logic, enabling validation of win detection, gold substitution, calling validation, edge cases, and scoring calculations.

Core Features & Use Cases

  • Generate winning hands for win detection testing
  • Create hands that are N tiles away from winning (tenpai)
  • Generate Three Golds scenarios
  • Create edge cases (wall exhaustion, bonus chains)
  • Generate invalid hands to test rejection
  • Create calling scenarios (multiple players can call)
  • Generate scoring test cases

Quick Start

Describe the feature you want tested and any edge cases, and I will generate the corresponding test scenarios.

Frequently Asked Questions about mahjong-test-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate test cases for Mahjong win detection and edge cases?

Mahjong test case generation automates creating winning hands, tenpai states, and edge cases like wall exhaustion. You provide a structured input describing the test goal and constraints to receive categorized scenarios with tiles, expected outcomes, and gold usage.

How do I test Fujian Mahjong gold substitution logic?

Testing Fujian Mahjong gold substitution is handled by generating specific scenarios like Three Golds and gold tile handling. The output includes tile configurations and expected outcomes to verify gold replacement rules across multiple rule variants.

Can I generate invalid Mahjong hands to test rejection logic?

Yes, you can generate invalid Mahjong hands to test rejection logic. The generator creates categorized test case types that include invalid hands, enabling you to validate that your game logic correctly rejects unauthorized tile configurations and calls.

What is the best way to validate Mahjong scoring calculations across rule variants?

Validating Mahjong scoring calculations is done by generating targeted scoring test cases. The tool outputs expected outcomes and categorized test types to verify scoring logic across multiple Fujian rule variants and bonus chains.

Does this Mahjong test generator support calling validation scenarios for multiple players?

Yes, the Mahjong test generator supports calling validation by creating scenarios where multiple players can call discards. It outputs categorized test cases with tile states to verify your game logic's calling rules.