← 返回 Skills 市场
Musify MooreThreads
作者
dongyang-mt
· GitHub ↗
· v0.1.0
290
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install musify
功能描述
Convert CUDA code to MUSA (Moore Threads GPU) using the musify tool. Use when migrating CUDA codebases to MUSA platform, converting CUDA kernels/APIs to MUSA...
使用说明 (SKILL.md)
Musify - CUDA to MUSA Code Conversion
Musify converts CUDA code to MUSA (Moore Threads GPU architecture) using text-based API mapping.
Installation
# Install dependencies
pip install ahocorapy
# musify-text should be available in MUSA toolkit
Basic Usage
# Convert files in-place (CUDA -> MUSA)
musify-text --inplace -- file1.cu file2.cpp
# Convert and create new files (default)
musify-text --create -- a.cu b.cpp
# Print to stdout
musify-text -t -- file.cu
Batch Conversion
# Find and convert all CUDA/C++ files in directory
musify-text --inplace -- $(find /path/to/project -name '*.cu' -o -name '*.cuh' -o -name '*.cpp' -o -name '*.h')
# Using ripgrep (recommended)
musify-text --inplace -- $(rg --files -g '*.cu' -g '*.cuh' -g '*.cpp' -g '*.h' /path/to/project)
Options
| Option | Description |
|---|---|
-t, --terminal |
Print output to stdout |
-c, --create |
Create new files with converted code (default) |
-i, --inplace |
Modify files in-place |
-d {c2m,m2c} |
Conversion direction: c2m (CUDA→MUSA, default), m2c (MUSA→CUDA) |
-m \x3Cfile.json> |
Custom API mapping file (can specify multiple) |
--clear-mapping |
Clear default mapping, use only custom mappings |
-l {DEBUG,INFO,WARNING} |
Log level |
Exclusion Markers
Prevent specific code sections from being converted:
// MUSIFY_EXCL_LINE - Exclude this line
char *str = "cudaMalloc"; // MUSIFY_EXCL_LINE
// MUSIFY_EXCL_START - Start exclusion block
char *apis[] = {
"cudaInit",
"cudaFree"
};
// MUSIFY_EXCL_STOP - End exclusion block
Common CUDA → MUSA Mappings
| CUDA | MUSA |
|---|---|
cuda prefix |
musa prefix |
CUDA |
MUSA |
cu prefix (driver API) |
mu prefix |
__cuda |
__musa |
cudaMalloc |
musaMalloc |
cudaFree |
musaFree |
cudaMemcpy |
musaMemcpy |
cudaLaunchKernel |
musaLaunchKernel |
__global__ |
__global__ (unchanged) |
__device__ |
__device__ (unchanged) |
__shared__ |
__shared__ (unchanged) |
Workflow
- Backup code before conversion
- Run musify on target files
- Review changes - text-based conversion may need manual fixes
- Compile with MUSA compiler (
mcc) to verify - Test on MUSA device
References
安全使用建议
This SKILL.md is coherent with a code-migration tool, but take these precautions before running it: 1) Do a full backup or ensure version control before using --inplace; prefer --create or printing to stdout for an initial pass. 2) Verify the origin of musify-text and the ahocorapy package (install from official MooreThreads releases or the project's GitHub, not a similarly named pip package). 3) Test conversion on a small subset of files and run the MUSA compiler/tests before committing changes. 4) Avoid running automated bulk commands (find/rg piped into --inplace) until you're confident the mappings and exclusion markers behave as expected.
功能分析
Type: OpenClaw Skill
Name: musify
Version: 0.1.0
The 'musify' skill is a legitimate tool bundle designed to assist in migrating CUDA code to the Moore Threads MUSA platform. The documentation in SKILL.md provides standard instructions for using the 'musify-text' utility, including installation of the 'ahocorapy' dependency and examples of batch processing using common shell commands like 'find' and 'rg'. No malicious patterns, data exfiltration, or prompt injection attempts were identified.
能力评估
Purpose & Capability
Name/description match the instructions: the SKILL.md documents running a musify-text conversion tool over CUDA source files and contains expected options and mappings. There are no unrelated credentials, binaries, or config paths requested.
Instruction Scope
Instructions remain within the conversion task (running musify-text, finding source files, options, exclusion markers). They explicitly include in-place modification operations and batch file selection (find/rg), which is appropriate for a migration tool but increases risk to source if run without backups or vetting. The doc advises backing up code; it does not instruct reading or exfiltrating unrelated system files or credentials.
Install Mechanism
There is no automated install spec in the skill (instruction-only), which limits what is written to disk. The doc suggests pip install ahocorapy and that musify-text should come from the MUSA toolkit; pip-installing introduces normal package-source risk (typo-squatting or malicious package) but that is expected for a tool relying on Python packages.
Credentials
No environment variables, credentials, or config paths are requested. The declared requirements map cleanly to the tool's stated functionality.
Persistence & Privilege
Skill is not marked always:true and is user-invocable only. It does not request persistent platform-wide access or modify other skills' configurations.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install musify - 安装完成后,直接呼叫该 Skill 的名称或使用
/musify触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
- Initial release of musify skill for CUDA to MUSA code conversion.
- Enables batch conversion of CUDA (.cu, .cuh) and C++ files to Moore Threads MUSA equivalents using text-based API mapping.
- Supports in-place conversion, new file creation, and printing to stdout.
- Offers flexible exclusion markers to prevent conversion of specific code regions.
- Includes basic mapping of common CUDA APIs/prefixes to MUSA, and supports custom mapping files.
- Designed to streamline migration of CUDA codebases to the MUSA platform.
元数据
常见问题
Musify MooreThreads 是什么?
Convert CUDA code to MUSA (Moore Threads GPU) using the musify tool. Use when migrating CUDA codebases to MUSA platform, converting CUDA kernels/APIs to MUSA... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 290 次。
如何安装 Musify MooreThreads?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install musify」即可一键安装,无需额外配置。
Musify MooreThreads 是免费的吗?
是的,Musify MooreThreads 完全免费(开源免费),可自由下载、安装和使用。
Musify MooreThreads 支持哪些平台?
Musify MooreThreads 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Musify MooreThreads?
由 dongyang-mt(@dongyang-mt)开发并维护,当前版本 v0.1.0。
推荐 Skills