Help us improve
Share bugs, ideas, or general feedback.
From coding-workflow
Generates cross-platform commands and scripts for Linux, macOS, and Windows with security validation and compatibility guidance
npx claudepluginhub chaorenex1/coding-workflow --plugin coding-workflowHow this skill is triggered — by the user, by Claude, or both
Slash command
/coding-workflow:cross-platform-command-generatorThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
这个技能为 DevOps、系统运维、软件开发自动化和安全运维提供跨平台命令行和脚本生成能力,支持自然语言描述转换为可执行命令,并提供安全性检查和危险命令预警。
Generates professional bash/shell scripts with Google Shell Style Guide compliance, ShellCheck validation, cross-platform support (Linux/macOS/Windows/containers), POSIX compliance, security hardening, error handling, performance optimization, and BATS testing. Useful for automation, DevOps/CI/CD, build scripts, debugging.
Troubleshoots shell scripts and OS issues across Linux, macOS, and Windows. Automates system administration with bash, ShellCheck linting, and systematic debugging.
Provides shell scripting expertise for bash, zsh, POSIX; CLI tools like jq, yq, fd, rg for JSON/YAML processing, file search, automation, error handling, and cross-platform best practices. Useful for CLI commands, pipes, script development.
Share bugs, ideas, or general feedback.
这个技能为 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(): 推荐替代方案本技能特别适用于以下场景: