shellck
在编辑脚本或调试shell错误后运行shellcheck。用于检查仓库中的脚本(特别是scripts/目录中的脚本),捕获诸如set -u与未设置的变量、不良子shell使用或引号错误等问题。
📖 中文导读:在编辑脚本或调试shell错误后运行shellcheck。用于检查仓库中的脚本(特别是scripts/目录中的脚本),捕获诸如set -u与未设置的变量、不良子shell使用或引号错误等问题。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: shellck description: Run shellcheck on shell scripts after editing scripts or when debugging shell errors. Use for linting scripts in a repo (especially scripts/), catching issues like set -u with unset vars, bad subshell usage, or quoting mistakes.
Shellck
Overview
Provide a fast, repeatable shellcheck pass for repo scripts. Use this skill after editing shell scripts or when a script fails unexpectedly.
Workflow
- Ensure
shellcheckis installed. - From the repo root, run the helper script.
Quick start
Run against the default scripts/ directory:
$CODEX_HOME/skills/shellck/scripts/run_shellck.sh
Run against specific files or directories:
$CODEX_HOME/skills/shellck/scripts/run_shellck.sh scripts/perf-profiler
$CODEX_HOME/skills/shellck/scripts/run_shellck.sh scripts/ other/dir/some.sh
Behavior
- If no paths are provided, it scans
scripts/for shell scripts. - If paths are provided, it accepts files or directories and filters to shell scripts by extension or shebang.
- Exits non-zero on shellcheck failures.
Resources
scripts/
run_shellck.sh: shellcheck runner with sensible defaults and directory filtering.