Shell script review

From y-miyazaki/terraform-aws-base · View interactive version

Shell script review is an AI agent skill from the GitHub repository y-miyazaki/terraform-aws-base. 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.

How to use this skill

Skill file

Input

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

USE FOR:

DO NOT USE FOR:

Reference Files Guide

Workflow

  1. Read PR context and script intent. If PR context is unavailable, review file diffs only and defer PR-context-dependent checks.
  2. 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.
  3. Exclude generated files and vendored third-party code (for example vendored scripts copied from upstream) from primary findings unless they introduce security-critical risk.
  4. For very large PRs (>50 changed shell scripts), prioritize security/correctness checks first and defer low-risk style checks if evidence is insufficient.
  5. When validation output (companion shell-script-validation report 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 validation Note: name the known overlaps.
  6. Apply the full review checklist and collect failed/deferred ItemIDs.
  7. 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

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.