cangjie-compile-and-build

Compile Cangjie code with cjc and manage projects with cjpm.

1|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/SunriseSummer/CangjieDocValidator --skill cangjie-compile-and-build
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cangjie-compile-and-build
Source: https://github.com/SunriseSummer/CangjieDocValidator/tree/main/.github/skills/compile
Command: npx skills add https://github.com/SunriseSummer/CangjieDocValidator --skill cangjie-compile-and-build

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps you understand and utilize the Cangjie language's compiler (cjc) and project management tool (cjpm), enabling you to build and manage your Cangjie projects effectively.

Core Features & Use Cases

  • Compiler Usage: Learn the basic commands and options for cjc to compile Cangjie code.
  • Project Management: Understand cjpm commands for project initialization, building, running, and dependency management.
  • Conditional Compilation: Explore how to use @When directives and --cfg options for conditional compilation based on various system and build parameters.
  • Use Case: You've written a new Cangjie module and need to compile it, manage its dependencies, and ensure it builds correctly across different target platforms using conditional compilation.

Quick Start

Use the cangjie-compile-and-build skill to compile a Cangjie file named 'hello.cj'.

Frequently Asked Questions about cangjie-compile-and-build

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

FAQPage Schema
How do I compile a Cangjie file using the cjc compiler?

To compile a Cangjie file, use the `cjc` compiler by executing it with your target source file and desired compilation options. It processes the code to generate executable output or libraries.

What is the best way to manage dependencies in a Cangjie project?

Managing Cangjie project dependencies is done using the `cjpm` project management tool. It handles dependency resolution and integrates with your project structure during the build process.

How does conditional compilation work in Cangjie?

Conditional compilation in Cangjie uses `@When` directives and `--cfg` options. This mechanism conditionally includes or excludes code based on specified system and build parameters.

How do I initialize and build a new Cangjie project?

Initialize and build a Cangjie project by using `cjpm` commands for project creation and compilation. This tool sets up the standard project structure and automates the build lifecycle.

Can I use conditional compilation for cross-platform Cangjie builds?

Yes, you can use conditional compilation for cross-platform Cangjie builds by applying `@When` directives. This allows you to target different system environments within the same codebase.

What compilation options does cjc support for Cangjie code?

The `cjc` compiler supports various compilation options for processing Cangjie code. These options control output formats, conditional builds, and target environment configurations.