一键导入
cross-platform-command-generator
Generates cross-platform commands and scripts for Linux, macOS, and Windows with security validation and compatibility guidance
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generates cross-platform commands and scripts for Linux, macOS, and Windows with security validation and compatibility guidance
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | cross-platform-command-generator |
| description | Generates cross-platform commands and scripts for Linux, macOS, and Windows with security validation and compatibility guidance |
这个技能为 DevOps、系统运维、软件开发自动化和安全运维提供跨平台命令行和脚本生成能力,支持自然语言描述转换为可执行命令,并提供安全性检查和危险命令预警。
自然语言命令生成: 根据用户描述生成适用于多操作系统的命令行
脚本文件生成: 创建完整的跨平台脚本文件
.sh - Shell 脚本 (Linux/macOS).ps1 - PowerShell 脚本 (Windows).bat/.cmd - 批处理脚本 (Windows)安全性检查: 危险命令检测和风险评估
兼容性分析: 提供跨平台兼容性建议
参数验证: 命令参数合法性检查和错误处理
用户提供以下信息:
输入格式支持:
{
"task_description": "原始任务描述",
"platforms": {
"linux": {
"command": "生成的 Linux 命令",
"description": "命令说明",
"requires_sudo": false,
"safety_level": "safe"
},
"macos": {
"command": "生成的 macOS 命令",
"description": "命令说明",
"requires_sudo": false,
"safety_level": "safe"
},
"windows": {
"powershell": "PowerShell 命令",
"cmd": "CMD 命令",
"description": "命令说明",
"requires_admin": false,
"safety_level": "safe"
}
},
"compatibility_notes": [
"跨平台兼容性说明"
],
"security_warnings": [
"安全风险提示 (如有)"
]
}
生成的脚本文件包含:
文件清单:
script_linux.sh - Linux/Unix Shell 脚本script_macos.sh - macOS Shell 脚本script_windows.ps1 - Windows PowerShell 脚本script_windows.bat - Windows 批处理脚本README.md - 脚本使用说明基础用例:
@cross-platform-command-generator
生成跨平台命令: 查找当前目录下所有大于 100MB 的文件
目标平台: Linux, macOS, Windows
安全运维用例:
@cross-platform-command-generator
生成命令: 检查系统中所有监听端口和对应的进程
目标平台: 所有平台
安全级别: 需要管理员权限
自动化部署脚本:
@cross-platform-command-generator
生成部署脚本:
- 功能: 自动化应用部署
- 平台: Linux, Windows
- 包含: 参数解析、环境检查、备份机制、回滚功能、日志记录
- 安全: 需要权限检查和危险操作确认
系统健康检查脚本:
@cross-platform-command-generator
生成健康检查脚本:
- 检查 CPU/内存/磁盘使用率
- 检查关键服务运行状态
- 生成报告并发送邮件通知
- 平台: Linux, macOS, Windows
核心命令生成引擎,包含:
PlatformCommandGenerator 类: 根据任务描述生成特定平台命令cross_platform_translate(): 自然语言到命令的转换逻辑安全检查模块,包含:
SecurityValidator 类: 命令安全性验证check_dangerous_commands(): 危险命令检测assess_risk_level(): 风险等级评估 (safe/warning/dangerous)privilege_required(): 权限需求检查脚本文件生成器,包含:
ScriptBuilder 类: 多平台脚本构建generate_bash_script(): 生成 Shell 脚本generate_powershell_script(): 生成 PowerShell 脚本generate_batch_script(): 生成批处理脚本兼容性分析器,包含:
CompatibilityChecker 类: 跨平台兼容性检查find_equivalent_commands(): 查找等效命令suggest_alternatives(): 推荐替代方案本技能特别适用于以下场景:
Use this skill when the user asks to review performance hotspots, algorithmic complexity, memory usage, latency, caching opportunities, or concurrency tradeoffs. It performs evidence-based performance review and separates obvious fixes from issues that should be profiled first.
Use this skill when the user asks to review formatting, naming conventions, language idioms, lint/style consistency, or import organization. It checks style against project conventions and distinguishes auto-fixable issues from manual fixes.
Bridge between Claude Code and OpenAI Codex CLI - generates AGENTS.md from CLAUDE.md, provides Codex CLI execution helpers, and enables seamless interoperability between both tools
根据用户需求检索项目代码,提取事实、模式、决策链条,并以自然语言生成一个或多个非代码知识文档到 /docs/kb/
Execute AI tasks (codex/claude/gemini) with memory and resume support via memex-cli stdin protocol.
Fallback to memex-cli when codeagent-wrapper is unavailable. Automatically converts codeagent-wrapper syntax to memex-cli stdin protocol and executes.