Execute shell/bash commands for system operations, file browsing, process management, and general terminal tasks. Shell
通用 Shell 终端技能,可执行各类 Bash/Shell 命令。适用于文件浏览、目录操作、文本处理、进程查看、网络诊断等场景。
文件与目录操作:
ls -la # 列出所有文件(含隐藏文件)
ls -lah --sort=size # 按大小排序
pwd # 当前工作目录
tree -L 2 # 目录树(2层深度)
find . -name "*.py" -type f # 查找Python文件
du -sh * # 各子目录/文件大小
cat filename # 查看文件内容
head -n 20 filename # 查看前20行
tail -n 20 filename # 查看后20行
wc -l filename # 统计行数
mkdir -p path/to/dir # 创建多级目录
cp -r source dest # 复制目录
mv old new # 移动/重命名
文本搜索与处理:
grep -rn "pattern" . # 递归搜索文本
grep -i "pattern" file # 不区分大小写搜索
sed 's/old/new/g' file # 文本替换(显示结果,不修改文件)
awk '{print $1, $3}' file # 提取列
sort file | uniq -c | sort -rn # 统计并排序
系统信息:
uname -a # 系统信息
date # 当前时间
uptime # 运行时间
whoami # 当前用户
df -h # 磁盘空间
free -h # 内存使用(Linux)
ps aux | head -20 # 进程列表
top -bn1 | head -20 # 系统负载(Linux)
网络诊断:
ping -c 4 hostname # 网络连通性
curl -s -o /dev/null -w "%{http_code}" URL # HTTP状态码
netstat -tlnp # 监听端口(Linux)
ss -tlnp # 监听端口(Linux新版)
ip addr # 网络接口
nslookup domain # DNS查询
Python 替代方案(跨平台兼容):
python -c "import os; print(os.getcwd())" # 当前目录
python -c "import os; [print(f) for f in os.listdir('.')]" # 列出文件
python -c "import platform; print(platform.uname())" # 系统信息
python -c "import shutil; u=shutil.disk_usage('/'); print(f'总计:{u.total//2**30}GB 已用:{u.used//2**30}GB 可用:{u.free//2**30}GB')" # 磁盘
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer