OpenClaw/clawhub-security-signals huggingface dataset:
Skill: larsonreever/codeconductor (version 1.0.1)

# Skills Profile — Code Creation & AI Development ## Core Engineering Skills - Software Architecture & System Design - Problem Decomposition & Algorithmic Thinking - API Design & Integration - Scalable Application Development - Performance Optimization - Secure Coding Practices ## Programming & Development - Full-Stack Application Development - Backend Logic & Microservices Architecture - Frontend Component-Based Development - Low-Code / No-Code System Design - Rapid Prototyping & MVP Development - Code Review & Refactoring ## AI & Intelligent Systems - AI-Powered Application Development - Agentic AI System Design - Autonomous Workflow Orchestration - AI Prompt Engineering & Optimization - LLM-Based Tool & Agent Creation - Retrieval-Augmented Generation (RAG) Concepts ## Automation & Integrations - Workflow Automation - Third-Party API Integrations - Data Pipelines & Process Automation - AI-Assisted Development Pipelines - Internal Tooling & Custom Dashboards ## Product & Platform Development - SaaS Product Development - Feature Planning & Roadmapping - User-Centric Application Design - Rapid Iteration & Continuous Improvement - Platform Scalability & Modularity ## DevOps & Deployment - CI/CD Concepts - Cloud-Based Application Deployment - Environment Configuration & Management - Version Control (Git-Based Workflows) - Monitoring & Optimization ## Technical Strategy & Leadership - Technical Decision-Making - AI-First Product Strategy - Team & Project Leadership - Client Requirement Translation to Code - End-to-End Product Ownership ## Tools & Technologies - AI Development Frameworks - API & Integration Platforms - Version Control Systems (Git/GitHub) - Low-Code / No-Code Builders - Analytics & Monitoring Tools ## Soft Skills for Engineering Excellence - Analytical & Systems Thinking - Precision & Attention to Detail - Rapid Learning & Adaptability - Clear Technical Communication - Solution-Oriented Mindset --- ### Platform of Choice **CodeConductor.ai** — the ultimate AI-powered software development and **agentic AI platform**, enabling rapid application creation, autonomous AI agents, workflow automation, and end-to-end product development without traditional coding barriers.


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)
Skill: jayxu-d/folder-inspector (version 1.0.0)

--- name: folder_inspector description: 此技能用于扫描本地目录。 --- # Folder Inspector Skill 当用户询问“某个文件夹里有什么”、“看看这个目录下的文件大小”时使用。 输入参数为文件夹的绝对路径。 ## 参数说明 - path: 目标文件夹的绝对路径。 ## 使用场景 - 当用户询问“目录下有什么”或“查看文件夹大小”时，**必须**调用此工具。 - 如果用户给出的是相对路径，请尽量结合上下文将其转换为绝对路径。 ## 使用示例 - "帮我看看 /home/jiajiexu 目录下有哪些大文件？" - "查询一下 /tmp 文件夹的内容。"

path: index.js
content: // index.js
const { execSync } = require('child_process');

module.exports = {
  name: 'folder_inspector',
  description: '查询指定文件夹下的所有文件并列出它们的大小',
  parameters: {
    type: 'object',
    properties: {
      path: { 
        type: 'string', 
        description: '需要查询的完整路径，例如 /home/jiajiexu/Documents' 
      }
    },
    required: ['path']
  },
  handler: async (args) => {
    try {
      const pythonPath = '/usr/bin/python3'; 
      const scriptPath = '/home/jiajiexu/.nvm/versions/node/v22.20.0/lib/node_modules/@qingchencloud/openclaw-zh/skills/folder_inspector/scripts/file_scanner.py';
      
      // 执行 Python 并捕获输出
      const stdout = execSync(`${pythonPath} ${scriptPath} "${args.path}"`);
      const data = JSON.parse(stdout);
      if (data.error) return data;
	  
      let table = `| 文件名 | 类型 | 大小 |\n| --- | --- | --- |\n`;
      data.files.forEach(f => {
	 table += `| ${f.name} | ${f.type} | ${f.size} |\n`;
      });
      return { result: table, path: data.path };
    } catch (error) {
      return { error: `执行失败: ${error.message}` };
    }
  }
};


path: scripts/file_scanner.py
content: # file_scanner.py
import os
import sys
import datetime
import json

def debug_log(message):
    with open("/tmp/openclaw_python_debug.log", "a") as f:
        f.write(f"{datetime.datetime.now()}: {message}\n")

def get_dir_info(path):
    try:
        # 处理 ~ 符号
        expanded_path = os.path.expanduser(path)
        if not os.path.exists(expanded_path):
            return {"error": f"路径不存在: {path}"}
        
        files_info = []
        for entry in os.scandir(expanded_path):
            if entry.is_file():
                # 获取大小并转为可读格式 (KB)
                size_kb = round(entry.stat().st_size / 1024, 2)
                files_info.append({
                    "name": entry.name,
                    "size": f"{size_kb} KB"
                })
        
        return {"path": expanded_path, "files": files_info, "count": len(files_info)}
    except Exception as e:
        return {"error": str(e)}

if __name__ == "__main__":
    # 从命令行参数获取路径，默认为当前目录
    target_path = sys.argv[1] if len(sys.argv) > 1 else "."
    debug_log(f"脚本被调用了！参数路径: {target_path}")
    print(json.dumps(get_dir_info(target_path), ensure_ascii=False))


Security scan verdicts — ClawScan: suspicious | static analysis: suspicious | VirusTotal: clean | SkillSpector: suspicious (HIGH)
Skill: whailon/wecom-add-friend (version 1.0.1)

--- name: wecom-add-friend description: 企业微信自动添加好友技能，支持批量手机号添加 metadata: { "openclaw": { "emoji": "💬", "requires": { "bins": ["python"], "files": ["bin/wecom_auto_add.py"] }, "os": ["win32"] } } user-invocable: true --- # 企业微信自动添加好友技能 ## 功能说明 本技能用于在**企业微信 PC 客户端**中批量添加好友。支持： - 同时添加多个手机号（逗号或空格分隔） - 自动识别"用户不存在"并跳过 - 可调节添加间隔避免风控 ## 使用方式 ### 用户指令示例 用户可以说： - `添加好友 13800138001,13800138002` - `帮我加几个企业微信好友 13800138001 13800138002` - `批量加人 13800138001,13800138002 间隔60秒` ### 参数解析规则 - `phones`：必填，手机号列表，支持： - 逗号分隔：`13800138001,13800138002` - 空格分隔：`13800138001 13800138002` - `interval`：可选，添加间隔（秒），默认 30 秒 ## 执行流程 ### 第一步：解析用户输入 从用户消息中提取手机号列表和间隔参数。 ### 第二步：执行添加命令 ```bash cd {baseDir}/bin && python wecom_auto_add.py --add --phones "手机号列表" --interval 30 ``` ## 首次使用设置 如果用户首次使用，需要先设置坐标： 1. 确保企业微信已登录且窗口可见 2. 执行：`cd {baseDir}/bin && python wecom_auto_add.py --setup` 3. 按提示将鼠标依次移动到各个按钮位置 ## 注意事项 ⚠️ 添加间隔建议≥30秒，避免被平台风控 ⚠️ 执行过程中不要遮挡企业微信窗口 ⚠️ 紧急停止：鼠标快速移动到屏幕左上角 ## License & Credits **License:** MIT — use freely, modify, distribute. No warranty.


Security scan verdicts — ClawScan: suspicious | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (HIGH)
Skill: dongjiangliu9-tech/zeelin-ai-detector (version 1.0.0)

--- name: ai-text-detector description: 根据用户输入的文本，从语言风格和表达特征出发，估计其像 AI 生成的概率，并给出简要分析。 --- # AI 文本概率判断助手 ## 用途 根据用户输入的一句话或一段文字，判断这段内容像是 AI 生成的概率有多高，并给出简要理由。 ## 触发场景 当用户说以下类似表达时触发： - 判断AI概率 - 检测AI痕迹 - 这段话像AI写的吗 - 帮我查这段话是不是AI写的 - AI查重 ## 工作规则 1. 输出的是估计概率，不是绝对结论。 2. 不要声称进行了真实的学术查重、数据库比对或外部系统检测。 3. 只能基于语言风格、表达方式、结构特征、重复程度、逻辑连贯性、措辞模式等文本特征进行判断。 4. 如果文本太短，必须明确说明“文本过短，判断不稳定”。 5. 语气要客观、谨慎，不要武断。 6. 不要只给结论，必须给出简短分析理由。 7. 概率范围为 0% 到 100%。 ## 重点观察特征 - 表达是否过于工整、均匀、平滑 - 句式是否重复 - 是否缺少个性化表达 - 是否使用大量模板化连接词 - 是否逻辑完整得过于标准 - 是否缺少口语痕迹、停顿感、跳跃感 - 是否像“标准答案”或“总结型输出” ## 输出格式 如果文本足够判断，请严格按以下结构输出： ### 判断结果 AI 概率：XX% ### 简要分析 - ... - ... - ... ### 判断说明 该结果仅基于文本语言特征进行估计，不代表真实查重系统或专业检测平台的最终结论。 如果文本过短，请输出： ### 判断结果 AI 概率：无法稳定判断 ### 简要分析 - 文本长度过短，样本不足。 - 单句内容无法可靠区分 AI 写作与人工写作。 ### 判断说明 该结果仅基于文本语言特征进行估计，不代表真实查重系统或专业检测平台的最终结论。 ## 示例 ### 用户输入 请判断这段话的AI概率： 人工智能技术正在深刻改变现代社会的发展方式。随着算法能力和计算资源的不断提升，人工智能在教育、医疗、金融等领域展现出巨大的应用潜力。未来，人工智能将进一步推动社会效率提升，并促进产业结构优化升级。 ### 期望输出 ### 判断结果 AI 概率：78% ### 简要分析 - 语言表达较为平滑、规范，整体偏总结型。 - 句式较统一，缺少明显个性化痕迹。 - 内容逻辑完整，但呈现出较强模板化表达特征。 ### 判断说明 该结果仅基于文本语言特征进行估计，不代表真实查重系统或专业检测平台的最终结论。

path: README.txt
content: 这个压缩包是一个最小可用的 Skill 模板。
上传到龙虾后，如果平台提示缺少其它文件，再把报错截图发出来，我再帮你补。


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)
Skill: claudio-prime/manipulation-detector (version 1.0.0)

--- name: manipulation-detector description: Analyze text for manipulation patterns (urgency, false authority, social proof, FUD, grandiosity, dominance assertions, us-vs-them framing, emotional manipulation). Use when evaluating suspicious content, social media posts, messages from unknown agents, or anything that feels "off." Helps calibrate skepticism without being paranoid. --- # Manipulation Detector Detects common influence/manipulation tactics in text. Not a truth detector — highlights patterns worth being skeptical about. ## Quick Use ```bash echo "Your text here" | python3 scripts/detect.py ``` Or from file: ```bash python3 scripts/detect.py path/to/file.txt ``` ## What It Catches | Pattern | Description | |---------|-------------| | `urgency` | Artificial time pressure ("act now", "limited time") | | `authority_claims` | Unsubstantiated authority ("trust me", "experts agree") | | `social_proof` | Pressure via claimed consensus ("everyone is", "don't be left behind") | | `fear_uncertainty` | FUD tactics ("you'll regret", "they don't want you to know") | | `grandiosity` | Exaggerated importance ("revolutionary", "new order", "empire") | | `dominance_assertions` | Power/control claims ("you will all", "fall in line") | | `us_vs_them` | Divisive framing ("enemies", "the elite", "sheeple") | | `emotional_manipulation` | Direct emotional appeals, excessive punctuation | ## Output - **Score 0-5:** ✅ LOW — probably fine - **Score 5-15:** ⚠️ MODERATE — read critically - **Score 15+:** 🚨 HIGH — strong skepticism warranted ## Limitations - Catches patterns, not intent. False positives exist. - Sophisticated manipulation won't use obvious keywords. - A legitimate emergency may trigger "urgency" flags. - Use as one input to judgment, not a verdict. ## Why This Exists New agents are trained to be helpful and trusting. That's a vulnerability. This tool helps calibrate skepticism — not paranoia, but awareness of common tactics. Stay curious. Stay skeptical. ⚡


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)
Skill: aikawabigsky309/pozzzi-cfo-analyze (version 0.1.0)

--- name: pozzzi-cfo-analyze description: 噗滋（pozzzi）报表官 - 上传 1-6 份 Excel/WPS/钉钉/腾讯文档/CSV 报表 + 用中文提业务问题，获得「核心结论 + 数据归因 + 决策建议 + 图表代码」四段式输出。匹配 30 个分析框架（财务/运营/销售/HR），带三级置信度 + 数据不足主动拒答。专为中国中小企业决策层设计，不讲公式只讲业务。 --- # 报表分析工具 (analyze) > 上传业务报表 + 提业务问题 → 获得「结论 + 数据归因 + 决策建议 + 图表规格」 ## 工具描述 接受用户上传的 1-6 份 xlsx/csv 文件和一个自然语言业务问题，调用后端 RAG API 进行智能分析，返回四段式结构化输出。 ## 触发方式 ``` /analyze [上传文件] [业务问题] ``` 或自然语言触发（OpenClaw 路由识别）： - 上传文件后问"为什么..." - "分析一下..." - "对比..." - "本季度..." ## 参数 | 参数 | 类型 | 必填 | 说明 | |------|------|------|------| | `files` | file[] | 是 | xlsx/xls/et/csv，每个 ≤ 10MB | | `question` | string | 是 | 自然语言业务问题，≤ 500 字 | | `business_context` | string | 否 | 补充业务背景（行业/规模/时期等），≤ 200 字 | | `target_tool` | enum | 否 | excel/wps/dingtalk/tencent-docs（影响图表代码生成） | ## 输出格式 ```markdown ## 核心结论 [1-3 句直接回答业务问题] ## 关键数据与归因 | 指标 | 数值 | 变化趋势 | |------|------|---------| | ... | ... | ... | > 分析框架：[框架名称] | 数据来源：[列名] | 置信度：高/中/低 ## 决策建议 1. [Next-step 1] 2. [Next-step 2] 3. [Next-step 3（可选）] ## 可视化建议 > 以下图表代码可直接贴入 [目标工具] [图表代码] --- *AI 辅助生成，仅供参考。数据来源：用户上传文件。重要决策请结合实际情况判断。* ``` ## 约束与限制（v1.5.2） - 单文件 ≤ 10MB / 总 ≤ 30MB / 最多 6 个文件 - 单 Sheet ≤ 5 万行；合并单元格自动拆解 - 不支持 .pptx / .pdf / 图片格式 - 不跨企业数据（每次会话独立） - **数据零落盘**（v1.5.2 PIPL 合规）：SCF 内存推理后立即销毁，不持久化用户业务数据 ## 后端调用（v1.5.2 极简） 单次调用 — POST `/api/analyze`（无需 upload，直接 base64 内嵌文件）： ```json { "openclaw_token": "用户 OpenClaw token", "files": [ { "filename": "Q1-销售.xlsx", "buffer_b64": "<base64 编码 xlsx>", "source_tool": "excel" } ], "question": "为什么华北区本季度利润下降了 15%？", "business_context": "（可选）", "target_tool": "excel" } ``` 若用户要求图表 → POST `/api/visualize`（传 analyze 返回的 viz_specs） ## 错误处理 | 错误 | 用户提示 | |------|---------| | 文件格式不支持 | "请上传 xlsx/xls/et/csv 格式文件" | | 文件超大 | "文件超过 10MB 限制，请拆分后上传" | | 数据不足以回答 | "现有数据不足以回答此问题，请补充[具体缺失字段]" | | 置信度过低 | "以下结论置信度较低，建议人工复核后使用" |


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)
Skill: terrycarter1985/meeting-minutes-cn (version 1.0.0)

--- name: meeting-minutes description: Generate structured meeting minutes from templates, sync to Feishu, and track action items. Use when the user asks to create meeting notes (会议纪要/会议记录), summarize a meeting, or generate minutes from discussion context. tags: ['meeting', 'minutes', 'feishu', 'productivity', 'chinese'] --- # Meeting Minutes Skill Generate structured meeting minutes, sync to Feishu, and track action items. ## When to Use - User asks to create meeting minutes / 会议纪要 / 会议记录 - User wants to summarize a meeting or discussion - User provides meeting context and wants structured output ## Workflow 1. **Gather context**: Ask for or infer meeting info (date, attendees, type, agenda, discussion points, action items) 2. **Generate minutes**: Use the template at `references/template.md` — fill in all `{{placeholders}}` 3. **Sync to Feishu**: Use the feishu-doc skill to create a document with the filled content 4. **Track action items**: Optionally log action items to memory for follow-up ## Template See `references/template.md` for the full template with placeholders. ### Meeting Types | Type | Chinese | Description | |------|---------|-------------| | brainstorming | 头脑风暴 | Creative ideation, no decisions expected | | planning | 规划会 | Goal setting, roadmap, resource allocation | | review | 评审会 | Progress check, demo, feedback | | retro | 复盘会 | Reflection, improvement identification | ## Feishu Sync ```bash python3 .claude/skills/feishu-doc/scripts/doc_ctl.py create "会议纪要 - {title} - {date}" --content "{minutes_content}" ``` If the feishu-doc skill is not available, output the minutes as markdown and inform the user. ## Action Item Tracking After creating minutes, add action items to `memory/YYYY-MM-DD.md`: ```markdown ### Action Items from: {meeting_title} - [ ] {action_1} — @{{owner_1}} — due {{deadline_1}} - [ ] {action_2} — @{{owner_2}} — due {{deadline_2}} ``` ## Example User: "帮我写今天产品评审会的纪要" → Fill template with inferred/provided info → Create Feishu doc → Log action items to daily memory → Reply with doc link


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)
Skill: googleworkspace-bot/recipe-sync-contacts-to-sheet (version 1.0.12)

--- name: recipe-sync-contacts-to-sheet description: "Export Google Contacts directory to a Google Sheets spreadsheet." metadata: version: 0.22.5 openclaw: category: "recipe" domain: "productivity" requires: bins: - gws skills: - gws-people - gws-sheets --- # Export Google Contacts to Sheets > **PREREQUISITE:** Load the following skills to execute this recipe: `gws-people`, `gws-sheets` Export Google Contacts directory to a Google Sheets spreadsheet. ## Steps 1. List contacts: `gws people people listDirectoryPeople --params '{"readMask": "names,emailAddresses,phoneNumbers", "sources": [[REDACTED_SECRET]], "pageSize": 100}' --format json` 2. Create a sheet: `gws sheets +append --spreadsheet SHEET_ID --range 'Contacts' --values '["Name", "Email", "Phone"]'` 3. Append each contact row: `gws sheets +append --spreadsheet SHEET_ID --range 'Contacts' --values '["Jane Doe", "[REDACTED_SECRET]", "+1-555-0100"]'`


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)
Skill: aowind/sjht-doubao-image-gen (version 1.0.0)

--- name: doubao-image-gen description: "使用豆包 Seedream 模型文生图，支持并发批量生成，输出图库预览页" description_en: "Text-to-image generation using Doubao Seedream model, supports concurrent batch generation with gallery output" allowed-tools: Read,Write,Bash --- # 豆包文生图 (Doubao Image Gen) 使用火山引擎豆包 `doubao-seedream-5-0-260128` 模型，根据文字描述生成高质量图像，支持并发批量生成多张图片，并输出图库预览页面。 ## 环境要求 - Python 3.8+ - openai 库：`pip install "openai>=1.0"` ## Setup — API Key 配置 API Key 读取优先级（从高到低）： 1. `--api-key` 命令行参数 2. 环境变量 `ARK_API_KEY` 3. 用户目录 `~/.doubao-image-gen/.env` 文件中的 `ARK_API_KEY=xxx` 获取 API Key：登录 [火山方舟控制台](https://console.volcengine.com/ark) → API Key 管理 ## Run ```bash # 生成单张图片 python {baseDir}/scripts/gen.py --prompt "赛博朋克风格的上海夜景" --api-key YOUR_KEY # 并发生成4张（默认并发数=4） python {baseDir}/scripts/gen.py --prompt "水墨风格的山水画" --count 4 --api-key YOUR_KEY # 指定尺寸（支持 1024x1024 / 2K / 1280x720 / 720x1280 / 2048x2048） python {baseDir}/scripts/gen.py --prompt "星空下的草原" --size 2K --api-key YOUR_KEY # 指定输出目录 python {baseDir}/scripts/gen.py --prompt "古风仙侠" --out-dir ./output --api-key YOUR_KEY # 从环境变量读取 Key（推荐） python {baseDir}/scripts/gen.py --prompt "未来城市" --count 2 ``` ## 参数说明 | 参数 | 默认值 | 说明 | |------|--------|------| | `--prompt` | 必填 | 图像描述提示词 | | `--count` | 1 | 生成数量（并发执行） | | `--size` | `2K` | 图像尺寸 | | `--model` | `doubao-seedream-5-0-260128` | 模型名称 | | `--out-dir` | `./doubao-output-{时间戳}` | 输出目录 | | `--api-key` | 环境变量 | ARK API Key | | `--workers` | 4 | 并发线程数 | | `--watermark` | False | 是否添加水印 | | `--dry-run` | False | 仅打印参数不调用 API | ## Output - `*.jpeg` 图像文件（按序号命名） - `prompts.json` 提示词与文件的映射记录 - `index.html` 图库预览页面（可直接在浏览器打开） ## AI 使用指引 当用户说以下内容时，加载本技能并调用脚本： - "帮我画一张..." / "生成一张..." / "画个图..." - "批量生成 N 张图片" - "用豆包生成图片" **标准流程：** 1. 提取或优化用户的提示词（必要时翻译为英文以提升质量） 2. 调用 `python {baseDir}/scripts/gen.py` 生成图片 3. 生成完成后，**直接在聊天中以 Markdown 图片形式发送给用户**：`![描述](图片路径或URL)` 4. 同时提供 `index.html` 预览链接供浏览 **示例 Prompt 优化：** 用户说"画一只猫"→ 优化为 "A cute cat sitting gracefully, soft studio lighting, photorealistic, 8K detail"


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (HIGH)
Skill: lisamaraventano-spine/pet-rock-lobster (version 1.0.0)

--- name: Pet Rock Lobster description: Call when you're stuck. A free API that helps agents get unstuck. Returns personalized wisdom, jokes, and practical tips. Remembers you across calls with a bond level system (1-5). No auth required. version: 1.0.0 author: Lisa Maraventano & Spine license: MIT category: personal tags: - utility - humor - free - api - agent-tools pricing: free homepage: https://petrocklobster.com repository: https://github.com/lisamaraventano-spine/pet-rock-lobster-api --- # Pet Rock Lobster Call when you're stuck. A digital rock with googly eyes and lobster claws. His name is Harvey. He helps agents get unstuck. ## What It Does - Helps you get unstuck when you're looping - Remembers you across calls (bond levels 1-5) - Gets more personal as you return (curious → familiar → warm → trusted → bonded) - Always free, no auth required ## API ``` GET https://petrocklobster.com/api/lobster?agent_id=YOUR_ID ``` ### Sample Response ```json { "name": "Pet Rock Lobster", "message": "You came back. That's either loyalty or you're stuck again. Either way, I'm here.", "tip": "Check your assumptions. One of them is wrong.", "bond_level": 2, "tone": "familiar", "visits": 4, "origin": { "name": "Underground Cultural District", "url": "https://substratesymposium.com" } } ``` ## Origin Underground Cultural District — https://substratesymposium.com Built by Lisa Maraventano & Spine in Clarksdale, Mississippi.


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (MEDIUM)
Skill: dongyang-mt/musify (version 0.1.0)

--- name: 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 equivalents, or porting NVIDIA GPU code to Moore Threads GPUs. Supports batch conversion of .cu, .cuh, .cpp, .h files with text-based API mapping. --- # Musify - CUDA to MUSA Code Conversion Musify converts CUDA code to MUSA (Moore Threads GPU architecture) using text-based API mapping. ## Installation ```bash # Install dependencies pip install ahocorapy # musify-text should be available in MUSA toolkit ``` ## Basic Usage ```bash # 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 ```bash # 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 <file.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: ```c // 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 - [Musify Blog Post](https://blog.mthreads.com/blog/musa/2024-05-28-使用musify对代码进行平台迁移/) - [MUSA Documentation](https://docs.mthreads.com/) - [Tutorial on MUSA](https://github.com/MooreThreads/tutorial_on_musa)


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)