1. Parse Arguments & Determine Mode

1. Parse Arguments & Determine Mode

argument-hint: "[screen/flow name] or 'hud' or 'patterns'"

Category: design Source: Donchitos/Claude-Code-Game-Studios

Parse Arguments & Determine Mode: Technical Overview

What Is This?

The "Parse Arguments & Determine Mode" skill is the first and most crucial step in the Happycapy Skills platform’s ux-design workflow. This function analyzes the arguments provided when invoking the skill to select the appropriate authoring mode for user experience (UX) specification tasks. Depending on the argument, the skill determines whether the user intends to create a screen or flow specification, a heads-up display (HUD) design, or to manage the game’s interaction pattern library. If no argument is supplied, the skill uses a guided prompt to clarify the user's intent, ensuring a smooth, context-driven UX documentation process.

Why Use It?

Efficient UX design documentation in game development often requires clear context and tailored templates. The Parse Arguments & Determine Mode skill streamlines this by:

  • Reducing ambiguity: It interprets user intent directly from arguments, minimizing the need for back-and-forth clarification.
  • Automating file management: It outputs to the correct, standardized file locations, ensuring consistency across the project.
  • Improving workflow: By routing to the correct authoring mode, it sets up the appropriate sequence for context gathering, specification, and documentation.
  • Supporting user guidance: When invoked without arguments, it proactively helps users determine what they need, increasing accessibility for both experienced designers and newcomers.

How to Use It

The skill is invoked via the Happycapy Skills platform using the ux-design skill ID, optionally followed by an argument. The argument determines the authoring mode:

Argument Options and Effects

Argument Mode Output File
hud HUD design design/ux/hud.md
patterns Interaction pattern library design/ux/interaction-patterns.md
Any other string Screen/flow UX spec design/ux/[argument].md
(No argument) User guided prompt As determined by user response

Example Usages

Command-line (pseudo):

happycapy ux-design hud
## Produces: design/ux/hud.md

happycapy ux-design patterns
## Produces: design/ux/interaction-patterns.md

happycapy ux-design main-menu
## Produces: design/ux/main-menu.md

No Argument Example: If invoked as happycapy ux-design with no argument, the skill engages interactively:

What are we designing today?
1. A specific screen or flow (I'll name it)
2. The game HUD
3. The interaction pattern library
4. I'm not sure - help me figure it out

If the user types or selects a screen/flow name, it is normalized to kebab-case for file naming (e.g., "Main Menu" becomes main-menu.md).

Kebab-case Normalization Example (Python-like pseudocode):

def normalize_to_kebab_case(input_str):
    # Lowercase, replace spaces and non-alphanumeric with '-'
    return re.sub(r'[^a-z0-9]+', '-', input_str.lower()).strip('-')
## normalize_to_kebab_case("Main Menu") -> "main-menu"

When to Use It

This skill should be activated at the very start of a UX design documentation process for a game project, when you need to:

  • Author a new UX spec for a specific screen or flow (e.g., main menu, inventory)
  • Design the overall game HUD with a dedicated template
  • Curate or extend the project’s interaction pattern library
  • Clarify the task if you are unsure which mode is appropriate

It is especially valuable in larger teams or projects where naming conventions, documentation structure, and clarity are paramount.

Important Notes

  • Strict Argument Mapping: Only the arguments hud and patterns map to special modes. Any other value is treated as a screen or flow name.
  • Interactive Guidance: If no argument is supplied, the skill must not fail. Instead, it uses the AskUserQuestion tool to prompt the user, offering clear options and support for indecision.
  • Filename Conventions: All generated filenames must use kebab-case for consistency and to avoid filesystem issues.
  • Output Location: All output files are placed under the design/ux/ directory, following strict naming based on the selected mode or normalized argument.
  • No Premature Questions: The skill only prompts the user if absolutely necessary (i.e., no argument provided), ensuring an efficient and non-intrusive workflow.
  • Separation of Concerns: This skill is only responsible for argument parsing and mode selection. Actual content authoring and context gathering are handled in subsequent steps.

By precisely interpreting invocation arguments and guiding the user when needed, the Parse Arguments & Determine Mode skill lays the foundation for robust, context-aware UX documentation in modern game development workflows.