一键导入
shell-review
Audits shell scripts for correctness, portability, and common pitfalls. Use when reviewing shell scripts or before committing shell changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Audits shell scripts for correctness, portability, and common pitfalls. Use when reviewing shell scripts or before committing shell changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Detects AI-generated writing patterns in prose. Use when reviewing docs for slop, vague language, or identity leaks before publishing.
Audits Rust code for unsafe blocks, ownership issues, and Cargo dependency risks. Use when reviewing Rust code or before merging Rust changes.
Recommends context compression strategies for bloated or quota-heavy sessions. Use when context feels sluggish or quota burns faster than expected.
Guide minimal code via a decision ladder with full safety, edge, and negative-case coverage. Use when adding code, choosing a dependency, or auditing a diff.
Optimizes context window via MECW principles and memory tiering. Use when context exceeds 30% or before long multi-step tasks.
Generates or remediates documentation with human-quality writing. Use when creating new docs, rewriting AI-generated content, or applying style profiles.
| name | shell-review |
| description | Audits shell scripts for correctness, portability, and common pitfalls. Use when reviewing shell scripts or before committing shell changes. |
| globs | **/*.sh |
| alwaysApply | false Use when reviewing shell scripts, CI scripts, hook scripts, wrapper scripts. Do not use when creating new scripts - use attune:workflow-setup. |
| category | build |
| tags | ["shell","bash","posix","scripting","ci","hooks"] |
| tools | [] |
| complexity | intermediate |
| model_hint | standard |
| estimated_tokens | 200 |
| progressive_loading | true |
| dependencies | ["pensive:shared","imbue:proof-of-work","imbue:review-core","imbue:structured-output"] |
| modules | ["modules/exit-codes.md","modules/portability.md","modules/safety-patterns.md","modules/structure-patterns.md"] |
| role | entrypoint |
Audit shell scripts for correctness, safety, and portability.
After review, run shellcheck <script> to verify fixes address identified issues.
Run pytest plugins/pensive/tests/skills/test_shell_review.py -v to validate review patterns.
/shell-review path/to/script.sh
shell-review:context-mappedshell-review:exit-codes-checkedshell-review:portability-checkedshell-review:safety-patterns-verifiedshell-review:structure-checkedshell-review:evidence-loggedshell-review:findings-verifiedshell-review:context-mapped)Identify shell scripts:
# Find shell scripts
find . -not -path "*/.venv/*" -not -path "*/__pycache__/*" \
-not -path "*/node_modules/*" -not -path "*/.git/*" \
-name "*.sh" -type f | head -20
# Check shebangs
rg -l "^#!/" scripts/ hooks/ 2>/dev/null | head -10
# fallback: grep -l "^#!/" scripts/ hooks/ 2>/dev/null | head -10
Document:
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)Use imbue:proof-of-work to record findings with file:line references.
Summarize:
## Summary
Shell script review findings
## Scripts Reviewed
- [list with line counts]
## Exit Code Issues
### [E1] Pipeline masks failure
- Location: script.sh:42
- Anchor: `verbatim source text at file:line`
- Pattern: `cmd | grep` loses exit code
- Fix: Use pipefail or capture separately
## Portability Issues
[cross-platform concerns]
## Safety Issues
[unquoted variables, missing set flags]
## Recommendation
Approve / Approve with actions / Block
shell-review:findings-verified)Every finding must cite a real location and a verbatim anchor. Write
findings to .review/findings.json and confirm each citation resolves:
python plugins/imbue/scripts/citation_verifier.py \
--findings .review/findings.json --repo-root .
Drop or label UNVERIFIED any finding the verifier fails (exit 1); only
verified findings enter the report. See Skill(imbue:review-core) Step 5
and Skill(imbue:structured-output) for the schema.
#!/bin/sh scripts flagged):? expansion, cd in
subshells, no basename/dirname)imbue:proof-of-workLocation + verbatim Anchor
confirmed by citation_verifier.py (exit 0), or unverified findings
were dropped or labeled UNVERIFIED