shell-review — скилл для Claude Code: что делает и как установить
Скилл shell-review аудирует шелл-скрипты на маскировку кодов возврата, переносимость POSIX и безопасность перед коммитом.
MIT 1 установок ★ 350 обновлён 2026-10-29
npx skills add athola/claude-night-market --skill shell-review -a claude-codeЧто делает shell-review
Анализирует CI-пайплайны, хуки Git и скрипты автоматизации с расширением .sh. Скилл проверяет перехват ошибок в конвейерах через pipefail, ищет специфичные для Bash конструкции в скриптах с шебангом #!/bin/sh и фиксирует незакавыченные переменные.
Для работы требуются вспомогательные зависимости imbue:proof-of-work, imbue:review-core и imbue:structured-output. Найденные проблемы скилл сопоставляет с исходным кодом, подтверждает цитатами и сохраняет в .review/findings.json. После правок автор рекомендует запустить shellcheck.
Какие задачи решает
- Выявить потерю кодов возврата при передаче данных через пайплайн
- Найти несовместимый с POSIX синтаксис Bash в скриптах под
#!/bin/sh - Обнаружить незакавыченные переменные и небезопасные переходы по каталогам
- Проверить скрипты хуков Git и пайплайнов CI перед коммитом в репозиторий
Примеры запросов агенту
- /shell-review scripts/deploy.sh
- Проверь хук
scripts/pre-commit.shна ошибки и маскировку кодов возврата - /shell-review ci/build.sh
Как установить shell-review
1Через Skills CLI (Vercel)
npx skills add athola/claude-night-market --skill shell-review -a claude-code2Вручную: положить файлы
~/.claude/skills/shell-review/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/shell-review/
1Через Skills CLI (Vercel)
npx skills add athola/claude-night-market --skill shell-review -a codex2Вручную: положить файлы
.agents/skills/shell-review/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add athola/claude-night-market --skill shell-review -a cursor2Вручную: положить файлы
.cursor/skills/shell-review/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install athola/claude-night-market plugins/pensive/skills/shell-review2Вручную: положить файлы
.github/skills/shell-review/SKILL.md1Через Skills CLI (Vercel)
npx skills add athola/claude-night-market --skill shell-review -a gemini-cli2Командой платформы
gemini skills install https://github.com/athola/claude-night-market --path plugins/pensive/skills/shell-reviewВручную: положить файлы
.devin/skills/shell-review/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add athola/claude-night-market --skill shell-review -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о shell-review
Как установить shell-review в Claude Code?
Выполните команду npx skills add athola/claude-night-market --skill shell-review -a claude-code.
Что проверяет скилл shell-review?
Он анализирует скрипты *.sh на переносимость между оболочками, обработку ошибок, флаги безопасности и корректность структуры функций.
Чем подтверждаются результаты аудита?
Скилл сохраняет отчёт в .review/findings.json с номерами строк и цитатами кода, проверяя их через imbue:review-core.
Исходный текст
SKILL.md · MIT
--- 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: - 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 --- # Shell Script Review Audit shell scripts for correctness, safety, and portability. ## Verification After review, run `shellcheck <script>` to verify fixes address identified issues. ## Testing Run `pytest plugins/pensive/tests/skills/test_shell_review.py -v` to validate review patterns. ## Quick Start ```bash /shell-review path/to/script.sh ``` ## When To Use - CI/CD pipeline scripts - Git hook scripts - Wrapper scripts (run-*.sh) - Build automation scripts - Pre-commit hook implementations ## When NOT To Use - Non-shell scripts (Python, JS, etc.) - One-liner commands that don't need review ## Required Progress Items 1. `shell-review:context-mapped` 2. `shell-review:exit-codes-checked` 3. `shell-review:portability-checked` 4. `shell-review:safety-patterns-verified` 5. `shell-review:structure-checked` 6. `shell-review:evidence-logged` 7. `shell-review:findings-verified` ## Workflow ### Step 1: Map Context (`shell-review:context-mapped`) Identify shell scripts: ```bash # 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: - Script purpose and trigger context - Integration points (make, pre-commit, CI) - Expected inputs and outputs ### Step 2: Exit Code Audit (`shell-review:exit-codes-checked`) @include modules/exit-codes.md ### Step 3: Portability Check (`shell-review:portability-checked`) @include modules/portability.md ### Step 4: Safety Patterns (`shell-review:safety-patterns-verified`) @include modules/safety-patterns.md ### Step 5: Structure Patterns (`shell-review:structure-checked`) @include modules/structure-patterns.md ### Step 6: Evidence Log (`shell-review:evidence-logged`) Use `imbue:proof-of-work` to record findings with file:line references. Summarize: - Critical issues (failures masked, security risks) - Major issues (portability, maintainability) - Minor issues (style, documentation) ## Output Format ```markdown ## 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 ``` ## Verify Findings Are Grounded (`shell-review:findings-verified`) Write findings to `.review/findings.json`, run the citation verifier (`Skill(imbue:review-core)` Step 5), and drop or label `UNVERIFIED` any the verifier rejects. ## Exit Criteria - [ ] Exit code propagation verified (pipelines checked for pipefail or capture-and-check) - [ ] Portability issues documented (Bash-isms in `#!/bin/sh` scripts flagged) - [ ] Safety patterns verified (no echo, braced vars, `:?` expansion, cd in subshells, no basename/dirname) - [ ] Structure patterns verified (library/executable distinction, main call, preamble, depcheck, shfmt formatting) - [ ] Evidence logged with file:line references via `imbue:proof-of-work` - [ ] Every reported finding carries a `Location` + verbatim `Anchor` confirmed by `citation_verifier.py` (exit `0`), or unverified findings were dropped or labeled `UNVERIFIED`
© athola · MIT · athola/claude-night-market