arthai-marketplace

/precheck

Run local tests before pushing. Catches CI failures locally in ~30 seconds instead of a 4-minute CI round-trip.

Synopsis

/precheck [--skip-revert-check]

When to use it

Quickstart

/precheck

What you’ll see: a revert-safety check, then the test suites relevant to your changed files, ending with ✓ Precheck passed (N tests, Xs) — Ready to push. On success it also records a pass marker, then automatically commits, pushes, opens a PR, squash-merges it, and deletes the branch without asking for confirmation. If you want to review the PR on GitHub before it merges, stop the skill after the pass marker is written, or use /pr for a create-only flow.

Examples

/precheck                       # standard run — pick suites from the diff, test, then ship
/precheck --skip-revert-check   # you intentionally deleted recently-merged code (refactor)

Arguments & flags

Flag Values Default What it does
--skip-revert-check : off Skips the accidental-revert detection when a deletion is intentional

What it does

  1. Revert check, runs /revert-check in strict mode to catch stale-buffer or bad-stash-pop changes that would silently undo recently-merged PRs. A failure here stops everything and shows the suspected files.
  2. Detects what changed, diffs your branch against main to find the touched files.
  3. Selects the relevant test suites, only the tests that cover what you changed; falls back to the full mechanical run when changes span multiple areas. Refuses to run on main (asks you to branch first).
  4. Runs the tests and reports pass/fail per suite.
  5. On pass: writes the .claude/.precheck-passed marker (the toolkit’s routing checks this before allowing /pr), then proceeds to the full ship sequence, commit, push, PR, squash-merge, and branch cleanup (git checkout main && git pull && git branch -d {branch}), without re-asking.
  6. On fail: removes any stale pass marker and lists the failing tests. It will not push with failures.

Output & artifacts

Troubleshooting

Problem Fix
Switch to a feature branch first Precheck refuses to run on main: git checkout -b my-change and re-run
Revert check flags files you deleted on purpose Re-run with /precheck --skip-revert-check
Tests pass locally but /pr still complains The pass marker is stale (new commits since the run): re-run /precheck