← Back to Skills Marketplace
dongyang-mt

Musify MooreThreads

by dongyang-mt · GitHub ↗ · v0.1.0
cross-platform ✓ Security Clean
290
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install musify
Description
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...
README (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

  1. Backup code before conversion
  2. Run musify on target files
  3. Review changes - text-based conversion may need manual fixes
  4. Compile with MUSA compiler (mcc) to verify
  5. Test on MUSA device

References

Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install musify
  3. After installation, invoke the skill by name or use /musify
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug musify
Version 0.1.0
License
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 290 downloads so far.

How do I install Musify MooreThreads?

Run "/install musify" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Musify MooreThreads free?

Yes, Musify MooreThreads is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Musify MooreThreads support?

Musify MooreThreads is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Musify MooreThreads?

It is built and maintained by dongyang-mt (@dongyang-mt); the current version is v0.1.0.

💬 Comments