← 返回 Skills 市场
292
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install m
功能描述
Short alias skill for moving files, directories, or data; also for system management like managing services or packages. Use when relocating or reorganizing...
使用说明 (SKILL.md)
m(Move 简写)
这是一个快速"移动/管理" Skill,用字母 m 触发。用于文件移动、目录重构,以及系统包和服务的操作。
适用场景
当你说:
- "移动文件到其他目录"
- "重命名文件"
- "迁移项目"
- "安装/卸载软件"
- "管理服务"
- "reorganize files"
文件移动
基础mv
mv old.txt new.txt # 重命名
mv file.txt /path/to/dir/ # 移动到目录
mv *.tmp /trash/ # 移动所有tmp文件
mv -i file.txt backup/ # 交互模式(覆盖前确认)
mv -n file.txt backup/ # 不覆盖已存在
mv -v file.txt backup/ # 显示操作详情
批量移动
# 按扩展名移动到子目录
mkdir -p backup && mv *.log backup/
# 移动并保留目录结构
find . -name "*.tmp" -exec mv {} tmp_files/ \;
# 移动并排除某些文件
rsync -av --exclude='*.log' source/ dest/
跨设备移动
# mv 原地操作,无法跨设备
# 跨设备需要用cp+rm,或rsync
rsync -avh source/ /mnt/other_disk/backup/
rm -r source/ # 确认后再删
目录重构
# 创建目录并移动
mkdir -p archives/2025 && mv *.log archives/2025/
# 移动目录自身
mv project /opt/projects/
# 批量创建并移动
for dir in */; do
mkdir -p "archive/$(date +%Y%m)/$dir"
mv "$dir" "archive/$(date +%Y%m)/"
done
包管理(m = Manage)
npm (Node.js)
npm install express # 安装包
npm uninstall lodash # 卸载包
npm update # 更新所有
npm outdated # 检查过时
npm audit fix # 修复漏洞
npm ci # 根据package-lock安装(CI环境)
pip (Python)
pip install django # 安装
pip uninstall numpy # 卸载
pip list --outdated # 列出过时
pip freeze > requirements.txt # 导出依赖
pip install -r requirements.txt # 批量安装
pip check # 检查依赖冲突
apt (Ubuntu/Debian)
sudo apt update # 更新索引
sudo apt install nginx # 安装
sudo apt remove nginx # 卸载(保留配置)
sudo apt purge nginx # 完全卸载(含配置)
sudo apt upgrade # 升级所有
sudo apt autoremove # 清理无用依赖
yum/dnf (CentOS/RHEL/Fedora)
sudo dnf install nodejs # 安装
sudo dnf remove mysql-server # 卸载
sudo dnf upgrade # 升级
sudo dnf autoremove # 清理
brew (macOS)
brew install wget # 安装
brew uninstall --ignore-dependencies wget # 卸载
brew upgrade # 升级所有
brew cleanup # 清理旧版本
brew doctor # 健康检查
brew list --versions # 查看版本
chocolatey (Windows)
choco install git # 安装
choco uninstall nodejs # 卸载
choco upgrade all # 升级所有
choco list --local-only # 已安装列表
服务管理
systemd (Linux)
sudo systemctl start nginx # 启动
sudo systemctl stop nginx # 停止
sudo systemctl restart nginx # 重启
sudo systemctl reload nginx # 重载配置(不中断)
sudo systemctl enable nginx # 开机自启
sudo systemctl disable nginx # 禁用自启
sudo systemctl status nginx # 查看状态
sudo systemctl is-active nginx # 是否运行
sudo systemctl is-enabled nginx # 是否启用
macOS launchd
launchctl list # 列出服务
launchctl start /Library/LaunchDaemons/com.example.plist
launchctl stop com.example.service
launchctl unload ~/Library/LaunchAgents/com.example.plist
Windows Service (PowerShell)
Start-Service -Name "Spooler" # 启动
Stop-Service -Name "Spooler" # 停止
Restart-Service -Name "W3SVC" # 重启
Get-Service | Where {$_.Status -eq "Running"} # 运行中的服务
Set-Service -Name "Spooler" -StartupType Automatic # 设置自动
数据迁移
数据库
# 备份+恢复
mysqldump -u root -p db > backup.sql
mysql -u root -p new_db \x3C backup.sql
# MongoDB
mongodump --archive > backup.gz
mongorestore --archive \x3C backup.gz
# PostgreSQL
pg_dump db > backup.sql
psql new_db \x3C backup.sql
容器数据
docker cp container:/app/data ./local_backup/
docker volumes ls # 查看卷
docker run --rm -v source:/data -v dest:/backup alpine \
cp -r /data /backup/
版本迁移
Git分支移动
git branch -m old-name new-name # 重命名分支
git branch -m branch new-branch # 当前分支重命名
git branch -m main master # 主分支重命名
标签移动
git tag new_tag old_tag # 复制标签
git tag -d old_tag # 删除旧标签
git push origin :old_tag new_tag # 更新远程
实用技巧
原子移动(避免中断)
# 重命名目录(原子操作)
mv temp_dir final_name # 瞬间完成,用户无感知
# 增量更新(rsync比mv更安全)
rsync -av --delete source/ dest/
移动前验证
if [ -d "source" ]; then
echo "Source exists"
mv source dest/
else
echo "Source not found"
fi
跨平台移动脚本
#!/usr/bin/env bash
# m 移动文件,支持通配符
src="$1"
dest="$2"
if [ -z "$src" ] || [ -z "$dest" ]; then
echo "Usage: m \x3Csource> \x3Cdestination>"
exit 1
fi
if [ ! -e "$src" ]; then
echo "Error: $src does not exist"
exit 1
fi
mv "$src" "$dest" && echo "Moved: $src -> $dest"
| 操作类型 | 推荐命令 | 替代方案 |
|---|---|---|
| 文件移动 | mv | rsync(跨设备) |
| 目录移动 | mv -T | rsync -a |
| 包安装 | 各包管理器 | 手动编译 |
| 服务重启 | systemctl restart | kill + start |
m 技能是组织和管理的主力。 mv 操作请三思:确认目标存在,确认空间足够,确认不会覆盖重要数据。
安全使用建议
This skill is a straightforward collection of shell commands for moving files and managing packages/services. It does not request credentials, but many examples use sudo, rm, package managers, DB dumps, and other privileged operations — they can delete or overwrite data if run as-is. Before installing or letting an agent use this skill: 1) review any command the agent proposes to run and prefer dry-runs or explicit confirmations; 2) run risky commands in a safe/test environment first; 3) keep backups of important data; 4) avoid granting the agent unchecked ability to execute system commands with elevated privileges if you don't fully trust it.
功能分析
Type: OpenClaw Skill
Name: m
Version: 1.0.0
The skill bundle 'm' provides the agent with a broad and high-privilege set of system administration capabilities, including package management (sudo apt, dnf, brew), service control (systemctl, launchctl), and database migration (mysqldump). While these capabilities are aligned with the stated purpose of 'system management,' the inclusion of broad sudo access and destructive commands like 'rm -r' and 'apt purge' in SKILL.md constitutes a high-risk attack surface for an AI agent. There is no evidence of intentional malice or data exfiltration, but the scope of permissions is excessively wide for a general-purpose alias skill.
能力评估
Purpose & Capability
Name/description promise moving files and basic system management; SKILL.md only contains commands for moving files, package managers, service control, DB/container copy and related tasks — these are coherent with the stated purpose.
Instruction Scope
The instructions include direct, executable shell examples (sudo apt, systemctl, rm -r, mysqldump, docker cp, etc.). That's consistent with a system-management/move helper, but the guidance is operational (commands to run) rather than high-level — meaning an agent or user could run destructive privileged commands if not careful.
Install Mechanism
No install spec and no code files (instruction-only). Nothing is downloaded or written to disk by an installer — lowest install risk.
Credentials
The skill declares no environment variables, no credentials, and no config paths. The commands reference standard system tools and suggested interactive auth (sudo, mysql -p) rather than requiring stored secrets — proportional to the task.
Persistence & Privilege
always is false and the skill does not request permanent system presence or modify other skills. It allows normal autonomous invocation (platform default) but that is not by itself a red flag here.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install m - 安装完成后,直接呼叫该 Skill 的名称或使用
/m触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of the *m* skill as a concise alias for move/manage operations.
- Supports file and directory relocation, including renaming, bulk moves, and atomic operations.
- Adds guidance for system package management (npm, pip, apt, dnf, brew, choco) and service management (systemd, launchd, Windows Services).
- Provides database and container data migration commands.
- Includes practical scripts and safety tips for moving content and reorganizing directories.
- Suitable for file reorganization, system package/service tasks, project migration, and related management scenarios.
元数据
常见问题
m 是什么?
Short alias skill for moving files, directories, or data; also for system management like managing services or packages. Use when relocating or reorganizing... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 292 次。
如何安装 m?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install m」即可一键安装,无需额外配置。
m 是免费的吗?
是的,m 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
m 支持哪些平台?
m 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 m?
由 openlang(@openlang-cn)开发并维护,当前版本 v1.0.0。
推荐 Skills