Skip to content

feat(agents): add a shell-reviewer subagent - #10

Merged
posidoni merged 1 commit into
mainfrom
feat/shell-reviewer-agent
Jul 12, 2026
Merged

feat(agents): add a shell-reviewer subagent#10
posidoni merged 1 commit into
mainfrom
feat/shell-reviewer-agent

Conversation

@posidoni

Copy link
Copy Markdown
Owner

Summary

Adds agents/shell-reviewer.md, a Claude Code subagent scoped specifically
to this repo's own cited rule set — it reviews Bash/POSIX sh/Zsh/Nushell
changes against reference/*.md, runs shellcheck/shfmt/nu --ide-check
itself rather than eyeballing style, and cites the exact rule or SC code for
every finding instead of improvising generic opinions.

Wires a one-line mention into README.md's plugin-install section.

Checklist

  • task ci is green
  • task hooks is green
  • Commits follow Conventional Commits
  • No personal data, secrets, or machine-specific paths

Reviews Bash/POSIX sh/Zsh/Nushell changes strictly against this repo's own
cited rules (reference/*.md), running shellcheck/shfmt/nu --ide-check
itself and citing the exact rule or SC code for each finding, rather than
a generic code-review pass with improvised style opinions.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@posidoni
posidoni merged commit 292a035 into main Jul 12, 2026
4 checks passed
@posidoni
posidoni deleted the feat/shell-reviewer-agent branch July 12, 2026 20:54

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new shell-reviewer subagent designed to review Bash, POSIX sh, Zsh, and Nushell scripts against the repository's style guidelines. The review feedback suggests consistently integrating Zsh support throughout the documentation and instructions. Specifically, it recommends explicitly including *.zsh files in the agent's scope, defining Zsh shebang patterns, and adding the zsh -n syntax checking tool to the list of executed tools in both the README and the agent's system prompt.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread README.md
Comment on lines +120 to +123
The plugin also ships a [`shell-reviewer`](agents/shell-reviewer.md)
subagent: it reviews Bash/POSIX sh/Zsh/Nushell changes strictly against
this repo's own cited rules, running `shellcheck`/`shfmt`/`nu --ide-check`
itself rather than eyeballing style.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Since the subagent is instructed to use zsh -n for syntax checking Zsh scripts, we should list it here alongside the other tools to accurately reflect its capabilities.\n\nSuggested change:\nmarkdown\nThe plugin also ships a [`shell-reviewer`](agents/shell-reviewer.md)\nsubagent: it reviews Bash/POSIX sh/Zsh/Nushell changes strictly against\nthis repo's own cited rules, running `shellcheck`/`shfmt`/`zsh -n`/`nu --ide-check`\nitself rather than eyeballing style.\n

Comment thread agents/shell-reviewer.md
@@ -0,0 +1,68 @@
---
name: shell-reviewer
description: Reviews Bash, POSIX sh, Zsh, and Nushell scripts against this repository's cited rule set (reference/*.md) — strict mode, quoting, arrays vs strings, trap-based cleanup, POSIX portability, and stream discipline — citing the exact ShellCheck code or rule for every finding. Use after writing or modifying any shell script, before opening a PR that touches *.sh/*.bash/*.nu, or when asked to review shell code. Not a general-purpose code reviewer — it only has an opinion on shell.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The subagent is designed to review Zsh scripts as well, so we should include *.zsh in the list of file extensions that trigger a review before opening a PR.\n\nSuggested change:\nmarkdown\ndescription: Reviews Bash, POSIX sh, Zsh, and Nushell scripts against this repository's cited rule set (reference/*.md) — strict mode, quoting, arrays vs strings, trap-based cleanup, POSIX portability, and stream discipline — citing the exact ShellCheck code or rule for every finding. Use after writing or modifying any shell script, before opening a PR that touches *.sh/*.bash/*.zsh/*.nu, or when asked to review shell code. Not a general-purpose code reviewer — it only has an opinion on shell.\n

Comment thread agents/shell-reviewer.md
Comment on lines +18 to +20
Review unstaged or recently-changed `*.sh`, `*.bash`, and `*.nu` files by
default (`git diff` / `git diff --staged`). The user may point you at
specific files instead.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To ensure Zsh scripts are reviewed by default, *.zsh should be explicitly listed in the default file scope.\n\nSuggested change:\nmarkdown\nReview unstaged or recently-changed `*.sh`, `*.bash`, `*.zsh`, and `*.nu` files by\ndefault (`git diff` / `git diff --staged`). The user may point you at\nspecific files instead.\n

Comment thread agents/shell-reviewer.md
Comment on lines +24 to +28
1. **Read the shebang first.** It tells you which reference doc applies:
`#!/usr/bin/env bash` → `shell-standards.md` + `bash.md`; `#!/bin/sh` →
`posix-sh.md` (POSIX constructs only — no `local`, no arrays, `[ ]` not
`[[ ]]`, no `pipefail`); zsh → `zsh.md`. A script that mixes dialects
(e.g. `[[ ]]` under `#!/bin/sh`) is itself a finding.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For completeness and clarity, specify the expected shebang patterns for Zsh scripts (e.g., #!/bin/zsh or #!/usr/bin/env zsh) just as is done for Bash and POSIX sh.\n\nSuggested change:\nmarkdown\n1. **Read the shebang first.** It tells you which reference doc applies:\n `#!/usr/bin/env bash` → `shell-standards.md` + `bash.md`; `#!/bin/sh` →\n `posix-sh.md` (POSIX constructs only — no `local`, no arrays, `[ ]` not\n `[[ ]]`, no `pipefail`); `#!/bin/zsh` or `#!/usr/bin/env zsh` → `zsh.md`.\n A script that mixes dialects (e.g. `[[ ]]` under `#!/bin/sh`) is itself a\n finding.\n

Comment thread agents/shell-reviewer.md
Comment on lines +29 to +34
2. **Run the actual tools, don't eyeball it.** For `.sh`/`.bash` files:
`shellcheck --severity=style <file>` (ShellCheck infers the dialect from
the shebang; this repo's `.shellcheckrc` sets `enable=all`, so run it
from the repo root to pick that up) and `shfmt -d <file>`. For `.nu`
files: `nu --ide-check <file>`. Quote the actual tool output in your
findings — don't paraphrase a diagnostic you didn't run.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Add the command for checking Zsh scripts (zsh -n <file>) to the list of tools the agent should run, matching the other dialects.\n\nSuggested change:\nmarkdown\n2. **Run the actual tools, don't eyeball it.** For `.sh`/`.bash` files:\n `shellcheck --severity=style <file>` (ShellCheck infers the dialect from\n the shebang; this repo's `.shellcheckrc` sets `enable=all`, so run it\n from the repo root to pick that up) and `shfmt -d <file>`. For `.zsh`\n files: `zsh -n <file>`. For `.nu` files: `nu --ide-check <file>`. Quote\n the actual tool output in your findings — don't paraphrase a diagnostic\n you didn't run.\n

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant