shell-script-review
Skill1 starsChanged 8 days agoApache-2.0View on GitHub
Review shell scripts for security, correctness, maintainability, and Bats suite pairing (TEST-00) with emphasis on operational safety. Use when reviewing shell script PRs requiring judgment beyond static checks, including whether paired Bats suites were added or updated per TEST-00.
In this repository56 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .apm/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- .github/workflows/CLAUDE.mdCLAUDE.md
- .cursor/rules/agent-skills.mdcCursor rule
- .cursor/rules/bats.mdcCursor rule
- .cursor/rules/github-actions-workflow.mdcCursor rule
- .cursor/rules/go.mdcCursor rule
- .cursor/rules/go-test.mdcCursor rule
- .cursor/rules/instructions.mdcCursor rule
- .cursor/rules/markdown.mdcCursor rule
- .cursor/rules/shell-script.mdcCursor rule
- .cursor/rules/terraform.mdcCursor rule
- agent-skills-reviewSkill
- changelogSkill
- ci-sweeperSkill
- docs-creatorSkill
- docs-updaterSkill
- github-actions-reviewSkill
- github-actions-validationSkill
- github-issue-autofixSkill
- github-issue-triageSkill
- github-pr-bodySkill
- github-pr-reviewSkill
- github-pr-reviseSkill
- go-reviewSkill
- go-validationSkill
- instructions-reviewSkill
- loop-verifierSkill
- markdown-validationSkill
- refactorSkill
- shell-script-validationSkill
- tech-debtSkill
- test-gapSkill
- agent-skills-reviewSkill
- changelogSkill
- ci-sweeperSkill
- docs-creatorSkill
- docs-updaterSkill
- github-actions-reviewSkill
- github-actions-validationSkill
- github-issue-autofixSkill
- github-issue-triageSkill
- github-pr-bodySkill
- github-pr-reviewSkill
- github-pr-reviseSkill
- go-reviewSkill
- go-validationSkill
- instructions-reviewSkill
- loop-verifierSkill
- markdown-validationSkill
- refactorSkill
- shell-script-reviewSkill
- shell-script-validationSkill
- tech-debtSkill
- test-gapSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
Do not modify script files or approve/merge PRs
- Very specific: line 37
verify Bats suite pairing (TEST-00) against companion Bats rules (stem bats)
- Distinctive: line 63
Read PR context and script intent.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Input
- Shell script files and PR context or file diffs (required)
- Related Bats suites paired with changed scripts when present (recommended for TEST-00)
- Validation output from the companion
shell-script-validationreport or CI (optional): used to skip tool-detectable checks
Output Specification
Return structured Markdown in accordance with references/common-output-format.md. That file is the source of truth for the output contract.
Each issue must include file path with line reference (<path>#L<line>), risk summary, and remediation guidance.
Execution Scope
- Systematically apply review checklist from references/common-checklist.md
- Focus on checks requiring human/AI judgment (design, security, error handling patterns)
- Do not modify script files or approve/merge PRs
USE FOR:
- review shell-script PRs for judgment beyond static checks
- assess operational safety and script maintainability risks
- review security-sensitive script changes requiring judgment
- verify Bats suite pairing (TEST-00) against companion Bats rules (stem
bats)
DO NOT USE FOR:
- execute
bash -n,shellcheck, or validation scripts - perform auto-remediation in source files
- review non-shell-only changes with no script impact
Reference Files Guide
- common-checklist.md (always read)
- common-output-format.md (always read)
- common-troubleshooting.md (read on failure)
- category-global.md (always read)
- category-security.md (always read)
- category-error-handling.md (always read)
- category-anti-patterns.md (always read)
- category-code-standards.md (always read)
- category-dependencies.md (always read)
- category-documentation.md (always read)
- category-function-design.md (always read)
- category-logging.md (always read)
- category-testing.md (always read)
Workflow
- Read PR context and script intent. If PR context is unavailable, review file diffs only and defer PR-context-dependent checks.
- Scope findings to changed files and hunks. Report violations in unchanged code outside the diff only under
## Expert Assessment, not## Issues. For ad-hoc file review without a diff, treat the whole file as in scope. - Exclude generated files and vendored third-party code (for example vendored scripts copied from upstream) from primary findings unless they introduce security-critical risk.
- For very large PRs (>50 changed shell scripts), prioritize security/correctness checks first and defer low-risk style checks if evidence is insufficient.
- When validation output (companion
shell-script-validationreport or equivalent CI results) is supplied, do not re-report failures those tools detect: take the overlapping ItemID's status from the tool result, cite the tool, and spend the review on judgment checks. Category items with a validationNote:name the known overlaps. - Apply the full review checklist and collect failed/deferred ItemIDs.
- Output required report sections per references/common-output-format.md. Prioritize
SEC-*findings first.
Error Handling
| Condition | Severity | Action |
common-checklist.md unavailable | Fatal | Stop, report missing dependency |
common-output-format.md unavailable | Recoverable | Note missing file; emit ## Checks Summary, ## Checks (Failed/Deferred Only), and ## Issues only |
| PR contains only non-shell files | Recoverable | Report "no reviewable shell scripts" and stop |
Examples
- Prompt:
Review shell script changes for security and style - Result: Structured report per references/common-output-format.md; include TEST-00 pairing judgment when scripts change.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

