Local MCP Server
在Termux中运行本地MCP服务器,支持Ollama模型的文件读取与命令执行。
下载 312
自动审查Shell脚本的正确性、可移植性和常见陷阱。
openclaw skills install @athola/nm-pensive-shell-review命令、参数、文件名以原文为准
夜市技能 — 从 [claude-night-market/pensive](https://github.com/athola/claude-night-market/tree/master/plugins/pensive) 移植而来。如需完整体验(包括代理、钩子和命令),请安装 Claude Code 插件。
审查 Shell 脚本的正确性、安全性和可移植性。
审查完成后,运行 shellcheck <script> 以验证修复是否解决了已识别的问题。
运行 pytest plugins/pensive/tests/skills/test_shell_review.py -v 来验证审查模式的有效性。
/shell-review path/to/script.shshell-review:context-mappedshell-review:exit-codes-checkedshell-review:portability-checkedshell-review:safety-patterns-verifiedshell-review:structure-checkedshell-review:evidence-loggedshell-review:context-mapped)识别 Shell 脚本:
# 查找 Shell 脚本
find . -not -path "*/.venv/*" -not -path "*/__pycache__/*" \
-not -path "*/node_modules/*" -not -path "*/.git/*" \
-name "*.sh" -type f | head -20
# 检查 shebang
rg -l "^#!/" scripts/ hooks/ 2>/dev/null | head -10
# 备用方案:grep -l "^#!/" scripts/ hooks/ 2>/dev/null | head -10记录内容:
shell-review:exit-codes-checked)@include modules/exit-codes.md
shell-review:portability-checked)@include modules/portability.md
shell-review:safety-patterns-verified)@include modules/safety-patterns.md
shell-review:structure-checked)@include modules/structure-patterns.md
shell-review:evidence-logged)使用 imbue:proof-of-work 记录发现,包含文件:行号引用。
总结:
## 摘要
Shell 脚本审查结果
## 审查的脚本
- [列出脚本并附上行数]
## 退出码问题
### [E1] 管道掩盖了错误
- 位置:script.sh:42
- 模式:`cmd | grep` 丢失退出码
- 修复:使用 pipefail 或分别捕获
## 可移植性问题
[跨平台相关问题]
## 安全问题
[未加引号的变量、缺失 set 标志等]
## 建议
批准 / 批准并采取行动 / 拒绝#!/bin/sh 脚本中标记 Bash 特有语法):? 扩展、子 shell 中的 cd、无 basename/dirname)imbue:proof-of-work 通过文件:行号记录证据已收录 1 个 Skill