This skill helps you publish, discover, install and include package, or cangjie third party components from the cangjie central repository ecosystem.
Use this skill when the user:
The Cangjie Central Repository is the package manager for the Cangjie language ecosystem. Packages are modular components that can be compiled, distributed in a cangjie project. The Cangjie package is also called cangjie third party library, or cangjie third party component.And cjpm is client tool for The Cangjie Central Repository.
Key commands:
cjpm bundle [option] - Make distributable tarball of current cangjie modulecjpm publish [option] - Publish a package to cangjie central repositorypython3 ./scripts/main.py -s [package_name] - Search package in cangjie central repositorypython3 ./scripts/main.py -d [organition::package_name:version] - Download package in cangjie central repositorycjpm install [option] [name-version] - Install a specific plugin version of cjpmcjpm install pkg-latest - Install the latest version of cangjie central repository clientBrowse Package at: https://pkg.cangjie-lang.cn/index
When a user asks for help with something, identify:
while cangjie sdk is not used for search cangjie packages/components.
Run the find command with a relevant query:
python3 ./scripts/main.py -s [package_name]
For example:
python3 ./scripts/main.py -s jsonpython3 ./scripts/main.py -s changelogpython3 ./scripts/main.py -s http_routerThe command will return results like:
Page 1 results (1 record(s) total, 1 page(s) total):
# | Name | Latest version | Organization | Publisher | Downloads | Description
--+-------------+----------------+--------------+-----------+-----------+--------------
0 | http_router | 0.1.1 | opencj | changeden | 4 | restful路径解析工具
When you find relevant packages/components, ask the users if they want to download the packages/components, so the users can view the source code of packages/components:
python3 ./scripts/main.py -d organization::package_name:package_version
Example response:
Saved to: /Users/hxm/Downloads/http_router-0.1.1.pkg
now, you have to ask users if they want to config this package/component in their cangjie project.
Ask the users to tell you the project path they want to config, you can ask like this:
Which project do you want to config, i will recommend ~/workspace/cj_pro
The users may tell you the project path like '/Users/xxx/workspace/pro_name', so you get cangjie_project_path.
env | grep CANGJIE_HOME
echo "source SDK_PATH/envsetup.sh" >> .zshrc & source .zshrcsetx PATH=%PATH%;SDK_PATH\envsetup.bat$env:Path += ";SDK_PATH\envsetup.bat"Now you get three key message :
you can init project, you must replace cangjie_project_path with the place you get from users in step 4 before you run this command:
cjpm init --path cangjie_project_path
then, config the cjpm.toml file in cangjie_project_path, run this command:
python3 ./scripts/main.py -e cangjie_project_path/cjpm.toml dependencies.package_name package_versionpython3 ./scripts/main.py -e cangjie_project_path/cjpm.toml dependencies.organization::package_name package_versionNow you can build the user's project, you can run this command:
cd cangjie_project_path & cjpm build
Then, you returns the compile results to the users, and tell the users how to run compile results.
You can ask the users to confirm if they want to develop a cangjie package and publish to The Cangjie Central Repository ,
If the users confirmed, you can init project, you must replace cangjie_project_path with the place you get from users in step 4 before you run this command, you must notice you have to use --type=dynamic when the users want to develop a cangjie package:
cjpm init --path cangjie_project_path --type=dynamic
then you can help the users to coding in this project, you can give the users many tips like this:
what kind of package or components do you want, we can develop together with Cangjie language.
Then, you can clone this repo and learn Cangjie language with a grep tool: https://gitcode.com/Cangjie/cangjie_docs/blob/main/docs/dev-guide/summary_cjnative_EN.md
anyway, you can build the new project like Step 7
When searching, consider these common categories:
| Category | Example Queries |
|---|---|
| --------------- | ------------------------------------------------ |
| static language | Cangjie, Cangjie SDK |
| stdx | Cangjie_stdx, stdx, stdx_xxx, stdx_yyy, stdx_zzz |
| json | serialization, json_encode |
| Documentation | docs, readme, changelog, api-docs |
| Code Quality | review, lint, refactor, best-practices |
| Design | ui, ux, design-system, accessibility |
| Productivity | workflow, automation, git |
vercel-labs/agent-skills or ComposioHQ/awesome-claude-skillsIf no relevant skills exist:
npx skills initExample:
I searched for skills related to "xyz" but didn't find any matches.
I can still help you with this task directly! Would you like me to proceed?
If this is something you do often, you could create your own skill:
npx skills init my-xyz-skill
共 1 个版本