AGENT SKILL

check-ci-locally

暂无简介

License 许可
Apache-2.0
最近更新
2026-11-02
Stars
★ 8
Forks
1

03 SKILL.md 正文

Before You Start

  • .github/workflows/test.yml — the syntax job (runs before test job)
  • Makefile — check target (mirrors what CI does)

Steps

Run the check

make check

This runs:

  1. bash -n on all .sh files (excluding ./test-repos/*)
  2. jq empty on all schemas/*.json

Equivalent manual commands:

# Shell syntax check
find . -name '*.sh' -not -path './test-repos/*' | xargs bash -n

# Schema JSON validity
for f in schemas/*.json; do
    jq empty "$f" && echo "OK: $f" || echo "FAIL: $f"
done

Interpret failures

bash -n failure:

./lib/agent.sh: line 42: unexpected end of file

Means a syntax error at line 42 of lib/agent.sh. bash -n checks syntax only — it does not execute the script, so functions and variables are not evaluated.

jq empty failure:

jq: error: schemas/identity.json: Invalid numeric literal

Means schemas/identity.json is not valid JSON. Use python3 -m json.tool schemas/identity.json for a more informative error with line numbers.

Additional check: bundle.sh delimiter conflicts

If you changed any file in lib/, prompts/, scripts/, or added new files:

grep '__EOF_LIB_' lib/*.sh scripts/*.sh prompts/*.md 2>/dev/null

Any match means a file contains the exact heredoc delimiter used by bundle.sh, which will cause the bundle to self-truncate silently.

Verify

make check
echo "Exit code: $?"

Exit 0 = CI syntax job will pass. Then run make test-all for the full picture.

04 同仓库更多 Skills