cangjie-package

Manage Cangjie packages, entry points, and import/export mechanisms.

2|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/zhenzhizhi12/NexusAgent --skill cangjie-package-zhenzhizhi12
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cangjie-package
Source: https://github.com/zhenzhizhi12/NexusAgent/tree/main/.opencode/skills/common-skill-l1/package
Command: npx skills add https://github.com/zhenzhizhi12/NexusAgent --skill cangjie-package-zhenzhizhi12

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the complexities of managing packages, program entry points, and import mechanisms within the Cangjie programming language, ensuring proper code organization and distribution.

Core Features & Use Cases

  • Package Declaration: Understand how to declare packages and their relationship to directory structures.
  • Entry Points: Learn about the main function as the program's entry point.
  • Importing & Re-exporting: Master the syntax and rules for importing modules and re-exporting declarations.
  • Access Modifiers: Grasp the different levels of access control (private, internal, protected, public) for top-level declarations.
  • Use Case: When developing a new Cangjie project, you need to define its package structure, specify the main entry point, and manage dependencies between different modules.

Quick Start

Explain how to declare a package named 'network.http' in a Cangjie file located at 'src/network/http/client.cj'.

Frequently Asked Questions about cangjie-package

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

FAQPage Schema
How do I declare a package in Cangjie and structure its directory?

To declare a package in Cangjie, you must align the package declaration with the project's directory structure. For example, a package named 'network.http' should correspond to the 'src/network/http/' path. This ensures proper code organization and module resolution.

What are the access modifiers available for top-level declarations in Cangjie?

Cangjie provides four access modifiers for top-level declarations: private, internal, protected, and public. These modifiers control the visibility and access levels of modules during development.

How does importing and re-exporting modules work in the Cangjie language?

Cangjie allows you to import modules and re-export declarations using specific syntax rules. This mechanism manages dependencies between different modules, ensuring proper code organization and distribution.

Does Cangjie require a main function as the program entry point?

Yes, Cangjie uses the `main` function as the program's entry point. Defining this function is essential for structuring your Cangjie codebase and initiating program execution.

When should I use internal versus public access control in Cangjie modules?

Use internal to restrict access to declarations within the same module, while public makes declarations accessible to all importing modules. This controls code visibility during modular development.