返回 Skill 列表
extension
分类: 开发与工程无需 API Key

shellck

在编辑脚本或调试shell错误后运行shellcheck。用于仓库中脚本的代码检查(特别是scripts/目录下的),捕获诸如使用set -u时变量未设置、子shell使用不当或引号错误等问题。

person作者: jakexiaohubgithub

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

  1. Ensure shellcheck is installed.
  2. 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.