shellcheck-configurationlisted
Install: claude install-skill uwuclxdy/agenticat
# ShellCheck Configuration
## Field Reality
Healthy shell code runs ShellCheck near default: rare directives, each with a reason, not a blanket-exclusion `.shellcheckrc` or a script full of `disable=`.
## `.shellcheckrc`
ShellCheck looks for `.shellcheckrc` (or `shellcheckrc`) in the script's directory, then walks up through parent directories. If none is found it falls back to `~/.shellcheckrc` / `$XDG_CONFIG_HOME/shellcheckrc`. `--norc` skips discovery; `--rcfile PATH` forces one (editors/LSPs that shell out inherit this).
Useful keys (same names as inline directives, applied file-wide):
- `shell=bash|sh|dash|ksh|busybox`: pin the dialect instead of relying on the shebang.
- `source-path=DIR`, repeatable, or `source-path=SCRIPTDIR`: where `source`/`.` statements resolve.
- `external-sources=true`: follow `source` targets outside the files passed on the command line.
- `disable=`, `enable=`: same semantics as the inline forms below.
Severity has no rc key. Gate it with `-S`/`--severity` on the invocation, not in the file.
Minimal, defensible:
```
shell=bash
source-path=SCRIPTDIR
external-sources=true
enable=quote-safe-variables
enable=check-unassigned-uppercase
```
Don't blanket-`disable=` a list of codes with no per-line reason attached.
## Inline Directives
```sh
# shellcheck key=value key=value
command-or-block
```
Placement decides scope. A directive before the first command in the file is file-wide; anywhere else it applies only to the command or block immed