Phase 4: Type System Completion (P2) - Add comprehensive Workflow type definitions: - WorkflowStepType: hand, skill, agent, condition, parallel, delay - WorkflowStep: individual step configuration - Workflow: complete workflow definition - WorkflowRunStatus: pending, running, completed, failed, cancelled, paused - WorkflowRun: execution instance tracking - Request/Response types for API operations - Control types for pause/resume/cancel - Update types/index.ts with workflow exports Phase 5: Skills Ecosystem Expansion (P2) - Add 5 new Skills with SKILL.md definitions: - git: Git version control operations - file-operations: File system operations - web-search: Web search capabilities - data-analysis: Data analysis and visualization - shell-command: Shell command execution - Skills coverage now at 9/60+ (15%) Documentation: - Update SYSTEM_ANALYSIS.md Phase 4 & 5 status - Mark Phase 4 as completed - Update Phase 5 progress tracking Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2.7 KiB
2.7 KiB
name, description, triggers, tools
| name | description | triggers | tools | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| shell-command | Shell 命令执行 - 执行终端命令、脚本运行、系统操作 |
|
|
Shell 命令执行
执行终端命令、运行脚本、进行系统操作。
能力
- 命令执行:执行各种 shell 命令
- 脚本运行:运行 bash/python/node 脚本
- 系统操作:文件、进程、网络等系统命令
- 管道操作:使用管道组合命令
- 环境管理:管理环境变量和路径
工具依赖
- bash: 执行 shell 命令
安全原则
- 危险命令确认: 删除、格式化等危险操作需确认
- 权限最小化: 使用最小必要权限
- 命令审查: 执行前检查命令安全性
- 沙箱隔离: 敏感操作在隔离环境执行
常用命令分类
文件操作
# 列出文件
ls -la
# 查找文件
find . -name "*.ts"
# 搜索内容
grep -r "pattern" .
# 文件权限
chmod 755 script.sh
进程管理
# 查看进程
ps aux | grep node
# 终止进程
kill <pid>
# 后台运行
nohup npm start &
# 查看端口占用
lsof -i :3000
网络操作
# HTTP 请求
curl -X GET https://api.example.com
# 下载文件
wget https://example.com/file.zip
# 检查网络
ping google.com
# DNS 查询
nslookup example.com
开发工具
# Node.js
npm install
npm run build
npm test
# Python
pip install -r requirements.txt
python script.py
# Git
git status
git commit -m "message"
系统信息
# 系统版本
uname -a
# 磁盘空间
df -h
# 内存使用
free -m
# CPU 信息
cat /proc/cpuinfo
示例用法
用户: 运行 npm run build 构建项目
助手: 执行构建命令...
$ npm run build
> project@1.0.0 build
> vite build
vite v5.0.0 building for production...
✓ 42 modules transformed.
dist/index.html 0.45 kB
dist/assets/index.js 125.00 kB
dist/assets/index.css 15.00 kB
✓ built in 2.5s
构建成功!输出文件位于 dist/ 目录。
用户: 查看当前目录下最大的 5 个文件
助手: 执行命令...
$ du -ah . | sort -rh | head -5
1.2G ./node_modules
450M ./dist
120M ./coverage
85M ./node_modules/typescript
72M ./node_modules/@types
最大的 5 个文件/目录已列出。
输出规范
- 显示执行的完整命令
- 显示命令的标准输出和错误输出
- 中文描述命令结果
- 错误时提供可能的原因和解决方案
- 长输出进行适当截断和摘要
错误处理
遇到命令执行失败时:
- 显示完整的错误信息
- 分析可能的原因
- 提供解决建议
- 如需要,提供替代方案