cangjie-std-args

Parse Cangjie command-line arguments using std.argopt option schemas.

4|1|Updated Mar 29, 2026
One-click install
npx skills add https://github.com/JunjieChen0/NJUST --skill cangjie-std-args
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cangjie-std-args
Source: https://github.com/JunjieChen0/NJUST/tree/main/.njust-ai/skills/cangjie-std/args
Command: npx skills add https://github.com/JunjieChen0/NJUST --skill cangjie-std-args

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill standardizes and simplifies the process of handling command-line arguments in Cangjie language projects by providing clear guidance on main signatures and argument parsing patterns.

Core Features & Use Cases

  • Provides recommended main signatures for zero, single-parameter, and multi-parameter forms.
  • Describes usage of the std.argopt library for structured option parsing including Short, Long, Full, and NonOptions.
  • Suitable for building CLI tools and scripts that require robust argument handling for Cangjie-based tools.

Quick Start

Create a sample Cangjie program that defines main(args: Array<String>) and uses parseArguments to access options and non-options from the command line.

Frequently Asked Questions about cangjie-std-args

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

FAQPage Schema
How do I parse command-line arguments in Cangjie?

To parse command-line arguments in Cangjie, define a main signature like main(args: Array<String>) and use the std.argopt library to extract structured options and non-option arguments.

What is the recommended main signature for handling CLI arguments in Cangjie?

The recommended main signature for CLI argument handling in Cangjie uses main(args: Array<String>), supporting zero, single-parameter, and multi-parameter forms to access command-line inputs.

How do I define option schemas for Short and Long flags using std.argopt?

You define option schemas in std.argopt by specifying Short, Long, Full, and NonOptions argument modes, which enables structured parsing and clear extraction of command-line flags and values.

Does Cangjie std.argopt support error handling for invalid command-line inputs?

Yes, std.argopt provides well-defined error handling workflows for command-line parsing, ensuring robust CLI utilities can gracefully manage invalid or missing argument inputs.

When do I need structured argument parsing for Cangjie CLI tools?

You need structured argument parsing for Cangjie CLI tools when building utilities that require clear option schemas, multiple argument modes, and reliable extraction of non-option parameters.

Can I extract non-option arguments separately from flags in Cangjie command-line parsing?

Yes, std.argopt allows you to extract non-option arguments separately from Short and Long flags by defining NonOptions within your argument parsing schema.