Toolkit pre-PR checks: $ARGUMENTS
Run the checks AGENTS.md requires for the files this branch changes, and report each result. Fix nothing. The report is the deliverable.
Procedure
- Scope. Confirm the working directory is the ai-toolkit checkout (
.claude-plugin/marketplace.json has "name": "ai-toolkit"). The base ref is the argument, or origin/main when none is given. Run git fetch origin, git diff --name-only <base>...HEAD and git status --porcelain. The version check reads commits only, so list uncommitted files in the report.
- Every change. Run
python3 scripts/build/build.py --check, python3 scripts/ci/check_repo.py, python3 scripts/ci/check_style.py, python3 scripts/ci/check_plugin_versions.py --base <base>, python3 tools/freshness.py and python3 tools/source_anchors.py --lint.
- By changed path. Add the checks this table names for each path the diff touches:
| Changed path |
Also run |
shared/hooks/ or any plugin hooks/ |
python3 -m unittest discover -s shared/tests and bash claude/tests/test-guards.sh |
claude/install.sh or claude/home/ |
python3 -m unittest discover -s claude/tests |
claude/plugins/<name>/ or .claude-plugin/ |
claude plugin validate . --strict and claude plugin validate claude/plugins/<name> --strict |
codex/ |
python3 codex/scripts/validate.py and python3 -m unittest discover -s codex/tests |
antigravity/ |
python3 antigravity/scripts/validate.py and python3 -m unittest discover -s antigravity/tests |
tools/ |
python3 -m unittest discover -s tools/tests |
shared/install_common.py |
python3 -m unittest discover -s shared/tests, python3 -m unittest discover -s codex/tests and python3 -m unittest discover -s antigravity/tests |
src/ or scripts/build/ |
python3 scripts/build/build.py --check and python3 -m unittest discover -s scripts/build/tests |
Run each check as its own command from the repository root, without cd or chaining, so each failure points at one check.
4. Generated files and mirroring. python3 scripts/build/build.py --check fails when a generated file is stale, missing or edited by hand, so a change to a generated path must come from its source under src/ or shared/. For the hand-written per-agent files, such as plugin manifests, hook registration, home instructions and installers, compare the changed paths across claude/, codex/ and antigravity/, and list each layer that has no change where another layer does. The PR description must name anything not mirrored and why.
5. Report. Give a table of check, result (pass, fail or not run) and, for a failure, the first lines of output that show the cause. A check that cannot run, such as one that needs a missing CLI, is "not run" with the reason. Then list the hand-written per-agent files that may need mirroring and the uncommitted files.
Rules of the check
- Run the commands. Never report a check as passing from reading the code.
- Do not edit files, refresh stamps or run any
--write mode. A failure goes in the report for the user to fix.
1---2name: check-53description: "Runs the ai-toolkit pre-PR checks that AGENTS.md requires for the files changed on this branch, and lists the hand-written per-agent files that may need mirroring. Run it from the ai-toolkit checkout before opening a PR. Never runs on its own."4argument-hint: "[base ref, default origin/main]"5disable-model-invocation: true6metadata:7 source: https://skillmd.com/skills/majiayu000/check-58---910# Toolkit pre-PR checks: $ARGUMENTS1112Run the checks `AGENTS.md` requires for the files this branch changes, and report each result. Fix nothing. The report is the deliverable.1314## Procedure151. **Scope.** Confirm the working directory is the ai-toolkit checkout (`.claude-plugin/marketplace.json` has `"name": "ai-toolkit"`). The base ref is the argument, or `origin/main` when none is given. Run `git fetch origin`, `git diff --name-only <base>...HEAD` and `git status --porcelain`. The version check reads commits only, so list uncommitted files in the report.162. **Every change.** Run `python3 scripts/build/build.py --check`, `python3 scripts/ci/check_repo.py`, `python3 scripts/ci/check_style.py`, `python3 scripts/ci/check_plugin_versions.py --base <base>`, `python3 tools/freshness.py` and `python3 tools/source_anchors.py --lint`.173. **By changed path.** Add the checks this table names for each path the diff touches:1819| Changed path | Also run |20|---|---|21| `shared/hooks/` or any plugin `hooks/` | `python3 -m unittest discover -s shared/tests` and `bash claude/tests/test-guards.sh` |22| `claude/install.sh` or `claude/home/` | `python3 -m unittest discover -s claude/tests` |23| `claude/plugins/<name>/` or `.claude-plugin/` | `claude plugin validate . --strict` and `claude plugin validate claude/plugins/<name> --strict` |24| `codex/` | `python3 codex/scripts/validate.py` and `python3 -m unittest discover -s codex/tests` |25| `antigravity/` | `python3 antigravity/scripts/validate.py` and `python3 -m unittest discover -s antigravity/tests` |26| `tools/` | `python3 -m unittest discover -s tools/tests` |27| `shared/install_common.py` | `python3 -m unittest discover -s shared/tests`, `python3 -m unittest discover -s codex/tests` and `python3 -m unittest discover -s antigravity/tests` |28| `src/` or `scripts/build/` | `python3 scripts/build/build.py --check` and `python3 -m unittest discover -s scripts/build/tests` |2930 Run each check as its own command from the repository root, without `cd` or chaining, so each failure points at one check.314. **Generated files and mirroring.** `python3 scripts/build/build.py --check` fails when a generated file is stale, missing or edited by hand, so a change to a generated path must come from its source under `src/` or `shared/`. For the hand-written per-agent files, such as plugin manifests, hook registration, home instructions and installers, compare the changed paths across `claude/`, `codex/` and `antigravity/`, and list each layer that has no change where another layer does. The PR description must name anything not mirrored and why.325. **Report.** Give a table of check, result (pass, fail or not run) and, for a failure, the first lines of output that show the cause. A check that cannot run, such as one that needs a missing CLI, is "not run" with the reason. Then list the hand-written per-agent files that may need mirroring and the uncommitted files.3334## Rules of the check35- Run the commands. Never report a check as passing from reading the code.36- Do not edit files, refresh stamps or run any `--write` mode. A failure goes in the report for the user to fix.